Skip to content

Commit 17af2e7

Browse files
committed
- igs/igs_m027_033vid.cpp: hooked up hopper
- skeleton/boramz80.cpp: hooked up coin counters New working clones ------------------ In The Hunt (Korea?) [nnap] Systems promoted to working --------------------------- Huahua Shijie 5 / Feixing Shijie (V107CN) [David Haywood, Ivan Vangelista] Qiji 6 (V118CN) [David Haywood, Ivan Vangelista]
1 parent 720609f commit 17af2e7

File tree

4 files changed

+73
-16
lines changed

4 files changed

+73
-16
lines changed

src/mame/igs/igs_m027_033vid.cpp

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ Main components for the IGS PCB-0405-02-FZ are:
1616
TODO:
1717
- IGS 033 appears to encapsulate the behavior of the video/interface chip found in igspoker.cpp
1818
so could be turned into a device, possibly shared
19-
- complete inputs / outputs / hopper
20-
- huahuas5 needs correct Oki banking
19+
- verify possibly incomplete inputs
20+
- lamps / layout
2121
*/
2222

2323
#include "emu.h"
@@ -60,13 +60,14 @@ class igs_m027_033vid_state : public driver_device
6060
driver_device(mconfig, type, tag),
6161
m_external_rom(*this, "user1"),
6262
m_nvram(*this, "nvram"),
63+
m_bg_videoram(*this, "bg_videoram"),
64+
m_bg_attr_videoram(*this, "bg_attr_videoram"),
6365
m_maincpu(*this, "maincpu"),
66+
m_hopper(*this, "hopper"),
6467
m_screen(*this, "screen"),
6568
m_palette(*this, "palette"),
6669
m_gfxdecode(*this, "gfxdecode"),
67-
m_oki(*this, "oki"),
68-
m_bg_videoram(*this, "bg_videoram"),
69-
m_bg_attr_videoram(*this, "bg_attr_videoram")
70+
m_oki(*this, "oki")
7071
{ }
7172

7273
void m027_033vid(machine_config &config) ATTR_COLD;
@@ -82,14 +83,15 @@ class igs_m027_033vid_state : public driver_device
8283
private:
8384
required_region_ptr<u32> m_external_rom;
8485
required_shared_ptr<u32> m_nvram;
86+
required_shared_ptr<u32> m_bg_videoram;
87+
required_shared_ptr<u32> m_bg_attr_videoram;
8588

8689
required_device<igs027a_cpu_device> m_maincpu;
90+
required_device<hopper_device> m_hopper;
8791
required_device<screen_device> m_screen;
8892
required_device<palette_device> m_palette;
8993
required_device<gfxdecode_device> m_gfxdecode;
9094
required_device<okim6295_device> m_oki;
91-
required_shared_ptr<u32> m_bg_videoram;
92-
required_shared_ptr<u32> m_bg_attr_videoram;
9395

9496
u32 m_xor_table[0x100];
9597
tilemap_t *m_bg_tilemap = nullptr;
@@ -173,7 +175,7 @@ void igs_m027_033vid_state::bg_attr_videoram_w(offs_t offset, u32 data, u32 mem_
173175

174176
void igs_m027_033vid_state::out_port_w(u8 data)
175177
{
176-
if (data & 0xea)
178+
if (data & 0xe8)
177179
logerror("%s IGS027A out port w: %02X\n", machine().describe_context(), data);
178180

179181
m_video_enable = BIT(data, 0);
@@ -202,6 +204,7 @@ void igs_m027_033vid_state::m027_map(address_map &map) // TODO: some unknown wri
202204
map(0x3800'3000, 0x3800'30ff).ram().w(m_palette, FUNC(palette_device::write32_ext)).share("palette_ext");
203205

204206
map(0x3800'4000, 0x3800'4003).portr("DSW");
207+
map(0x3800'5003, 0x3800'5003).lw8(NAME([this] (uint8_t data) { m_hopper->motor_w(BIT(data, 0)); }));
205208
map(0x3800'5010, 0x3800'5013).umask32(0x0000'00ff).rw("oki", FUNC(okim6295_device::read), FUNC(okim6295_device::write));
206209
map(0x3800'5030, 0x3800'5033).rw("ppi", FUNC(i8255_device::read), FUNC(i8255_device::write));
207210

@@ -232,7 +235,7 @@ INPUT_PORTS_START( qiji6 ) // TODO: complete
232235
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_GAMBLE_HIGH )
233236
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_GAMBLE_LOW )
234237
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_GAMBLE_KEYOUT )
235-
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
238+
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_READ_LINE_DEVICE_MEMBER("hopper", FUNC(hopper_device::line_r))
236239

237240
PORT_START("IN1")
238241
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN )
@@ -389,6 +392,8 @@ void igs_m027_033vid_state::m027_033vid(machine_config &config)
389392
ppi.out_pb_callback().set([this] (u8 data) { LOGPORTS("%s: PPI port B write %02x\n", machine().describe_context(), data); });
390393
ppi.out_pc_callback().set([this] (u8 data) { LOGPORTS("%s: PPI port C write %02x\n", machine().describe_context(), data); });
391394

395+
HOPPER(config, m_hopper, attotime::from_msec(50));
396+
392397
SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
393398
m_screen->set_refresh_hz(60);
394399
m_screen->set_vblank_time(ATTOSECONDS_IN_USEC(1000));
@@ -482,6 +487,6 @@ void igs_m027_033vid_state::init_huahuas5()
482487
***************************************************************************/
483488

484489
// internal ROM date is 2002, external software revision could be later
485-
GAME( 2002, qiji6, 0, m027_033vid, qiji6, igs_m027_033vid_state, init_qiji6, ROT0, "IGS", "Qiji 6 (V118CN)", MACHINE_NOT_WORKING ) // lacks hopper support
490+
GAME( 2002, qiji6, 0, m027_033vid, qiji6, igs_m027_033vid_state, init_qiji6, ROT0, "IGS", "Qiji 6 (V118CN)", MACHINE_SUPPORTS_SAVE )
486491
// internal ROM date is 2004, external software revision could be later
487-
GAME( 2004, huahuas5, 0, huahuas5, huahuas5, igs_m027_033vid_state, init_huahuas5, ROT0, "IGS", "Huahua Shijie 5 / Feixing Shijie (V107CN)", MACHINE_NOT_WORKING ) // lacks hopper support
492+
GAME( 2004, huahuas5, 0, huahuas5, huahuas5, igs_m027_033vid_state, init_huahuas5, ROT0, "IGS", "Huahua Shijie 5 / Feixing Shijie (V107CN)", MACHINE_SUPPORTS_SAVE )

src/mame/irem/m92.cpp

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1619,6 +1619,41 @@ ROM_START( kaiteids ) // M92-E-B 05C04238B1 ROM board
16191619
ROM_LOAD( "m92_e-4k-.ic29", 0x0a00, 0x0117, CRC(506a0e20) SHA1(f10eaf694667239f7cd5209dfcb12d656c697074) ) // PAL16L8 - bruteforced
16201620
ROM_END
16211621

1622+
ROM_START( inthuntk ) // M92-E-B 05C04238B1 ROM board
1623+
ROM_REGION( 0x100000, "maincpu", 0 ) // red blank labels
1624+
ROM_LOAD16_BYTE( "ic28", 0x000001, 0x040000, CRC(90f82ea3) SHA1(0f42367f5c4ba67254bc4e19d30ebd81a45d9f3c) )
1625+
ROM_LOAD16_BYTE( "ic39", 0x000000, 0x040000, CRC(4bf419c0) SHA1(1de52b4a69d0f36cc308f9d448b7ab2b32343486) )
1626+
ROM_LOAD16_BYTE( "ic38", 0x080001, 0x020000, CRC(fc2899df) SHA1(f811ff5fd55655afdb25950d317db85c8091b6d6) )
1627+
ROM_LOAD16_BYTE( "ic27", 0x080000, 0x020000, CRC(955a605a) SHA1(2515accc2f4a06b07418e45eb62e746d09c81720) )
1628+
1629+
ROM_REGION( 0x20000, "soundcpu", 0 ) // Irem D8000011A1, red blank labels
1630+
ROM_LOAD16_BYTE( "ic30", 0x00001, 0x10000, CRC(209c8b7f) SHA1(eaf4a6d9222fe181df65cea1f13c3f2ebff2ec5b) )
1631+
ROM_LOAD16_BYTE( "ic31", 0x00000, 0x10000, CRC(18472d65) SHA1(2705e94ee350ffda272c50ea3bf605826aa19978) )
1632+
1633+
ROM_REGION( 0x200000, "gfx1", 0 ) // Tiles
1634+
ROM_LOAD( "ith_-c0-.ic26", 0x000000, 0x080000, CRC(4c1818cf) SHA1(fc8c2ae640bc3504a52736be46febb92c998fd7d) )
1635+
ROM_LOAD( "ith_-c1-.ic25", 0x080000, 0x080000, CRC(91145bae) SHA1(71b2695575f189a2fc72635831ba408f824d4928) )
1636+
ROM_LOAD( "ith_-c2-.ic24", 0x100000, 0x080000, CRC(fc03fe3b) SHA1(7e34220b9b21b82e012dcbf3052cccb118e3c382) )
1637+
ROM_LOAD( "ith_-c3-.ic23", 0x180000, 0x080000, CRC(ee156a0a) SHA1(4a303ed292ce79e3f990139c35b921213eb2711d) )
1638+
1639+
ROM_REGION( 0x400000, "gfx2", 0 ) // Sprites
1640+
ROM_LOAD( "ith_-000-.ic34", 0x000000, 0x100000, CRC(a019766e) SHA1(59012a41d152a471a95f1f86b6b1e0f9dd3f9711) )
1641+
ROM_LOAD( "ith_-010-.ic35", 0x100000, 0x100000, CRC(3fca3073) SHA1(bdae171cb7705647f28354ca83ecdea3a15f6e22) )
1642+
ROM_LOAD( "ith_-020-.ic36", 0x200000, 0x100000, CRC(20d1b28b) SHA1(290947d77242e837444766ff5d420bc9b53b5b01) )
1643+
ROM_LOAD( "ith_-030-.ic37", 0x300000, 0x100000, CRC(90b6fd4b) SHA1(99237ebab7cf4689e06965bd546cd80a825ab024) )
1644+
1645+
ROM_REGION( 0x80000, "irem", 0 ) // Samples
1646+
ROM_LOAD( "ith_-da-.ic9", 0x000000, 0x080000, CRC(318ee71a) SHA1(e6f49a7adf7155ba40c4f33a8fdc9553c00f5e3d) )
1647+
1648+
ROM_REGION( 0x0c00, "plds", 0 )
1649+
ROM_LOAD( "m92_a-3m-.ic11", 0x0000, 0x0117, CRC(fc718efe) SHA1(d554dd74cecd95754a1e6e24c6a207d6d3428253) ) // PAL16L8 - bruteforced
1650+
ROM_LOAD( "m92_a-7j-.ic41", 0x0200, 0x0117, CRC(5730b25a) SHA1(1877b807f6a94f6d515afc940e1d615a453490fd) ) // PAL16L8 - bruteforced
1651+
ROM_LOAD( "m92_a-9j-.ic51", 0x0400, 0x0117, CRC(92d477cf) SHA1(6a1e9bfdb367384e8611f46300f378730817514b) ) // PAL16L8 - bruteforced
1652+
ROM_LOAD( "m92_e-3k-.ic20", 0x0600, 0x0117, CRC(52ecf083) SHA1(1a1819e572f7fdd5aab2caeca8741441ffbea01d) ) // PAL16L8 - bruteforced
1653+
ROM_LOAD( "m92_e-3p-.ic21", 0x0800, 0x0117, CRC(67a4cc04) SHA1(0cd035852cc0b9f803ade56529645e052a13b752) ) // PAL16L8 - bruteforced
1654+
ROM_LOAD( "m92_e-4k-.ic29", 0x0a00, 0x0117, CRC(506a0e20) SHA1(f10eaf694667239f7cd5209dfcb12d656c697074) ) // PAL16L8 - bruteforced
1655+
ROM_END
1656+
16221657

16231658
ROM_START( hook ) // M92-D-A 05C04230A1 ROM board
16241659
ROM_REGION( 0x100000, "maincpu", 0 )
@@ -2615,6 +2650,7 @@ GAME( 1992, rtypeleoj, rtypeleo, rtypeleo, rtypeleo, m92_state, empty_in
26152650
GAME( 1993, inthunt, 0, inthunt, inthunt, m92_state, empty_init, ROT0, "Irem", "In The Hunt (World)", MACHINE_SUPPORTS_SAVE | MACHINE_NO_COCKTAIL)
26162651
GAME( 1993, inthuntu, inthunt, inthunt, inthunt, m92_state, empty_init, ROT0, "Irem America", "In The Hunt (US)", MACHINE_SUPPORTS_SAVE | MACHINE_NO_COCKTAIL)
26172652
GAME( 1993, kaiteids, inthunt, inthunt, inthunt, m92_state, empty_init, ROT0, "Irem", "Kaitei Daisensou (Japan)", MACHINE_SUPPORTS_SAVE | MACHINE_NO_COCKTAIL )
2653+
GAME( 1993, inthuntk, inthunt, inthunt, inthunt, m92_state, empty_init, ROT0, "Irem", "In The Hunt (Korea)", MACHINE_SUPPORTS_SAVE | MACHINE_NO_COCKTAIL)
26182654

26192655
GAME( 1993, nbbatman, 0, nbbatman, nbbatman, m92_state, init_bank, ROT0, "Irem", "Ninja Baseball Bat Man (World)", MACHINE_SUPPORTS_SAVE | MACHINE_IMPERFECT_GRAPHICS | MACHINE_NO_COCKTAIL )
26202656
GAME( 1993, nbbatmanu, nbbatman, nbbatman, nbbatman, m92_state, init_bank, ROT0, "Irem America", "Ninja Baseball Bat Man (US)", MACHINE_SUPPORTS_SAVE | MACHINE_IMPERFECT_GRAPHICS | MACHINE_NO_COCKTAIL)

src/mame/mame.lst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21954,6 +21954,7 @@ hook
2195421954
hookj
2195521955
hooku
2195621956
inthunt
21957+
inthuntk
2195721958
inthuntu
2195821959
kaiteids
2195921960
leaguemn

src/mame/skeleton/boramz80.cpp

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ class boramz80_state : public driver_device
7878
uint8_t m_input_matrix = 0xff;
7979

8080
uint8_t input_r();
81+
void output_w(uint8_t data);
8182

8283
uint32_t screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
8384
void charram_w(offs_t offset, uint8_t data);
@@ -153,6 +154,20 @@ uint8_t boramz80_state::input_r()
153154
return res;
154155
}
155156

157+
void boramz80_state::output_w(uint8_t data)
158+
{
159+
// bits 0-3 are coin counters
160+
for (int i = 0; i < 4; i++)
161+
machine().bookkeeping().coin_counter_w(i, BIT(data, i));
162+
163+
if (data & 0xf0)
164+
logerror("%s output_w: %02x\n", machine().describe_context(), data);
165+
166+
// bit 6 is used often
167+
168+
// bit 7 is probably hopper motor
169+
}
170+
156171

157172
void boramz80_state::program_map(address_map &map)
158173
{
@@ -171,12 +186,12 @@ void boramz80_state::io_map(address_map &map)
171186
map(0x00, 0x03).rw("ppi", FUNC(i8255_device::read), FUNC(i8255_device::write));
172187
map(0x20, 0x20).portr("COIN");
173188
map(0x40, 0x40).r(FUNC(boramz80_state::input_r));
174-
map(0x60, 0x60).portr("DSW4");
189+
map(0x60, 0x60).portr("DSW4"); // TODO: write?
175190
map(0x80, 0x81).w("aysnd", FUNC(ay8910_device::data_address_w));
176191
map(0x81, 0x81).r("aysnd", FUNC(ay8910_device::data_r));
177192
//map(0xa0, 0xa0).r();
178-
map(0xc0, 0xc0).w("crtc", FUNC(mc6845_device::address_w));
179-
map(0xc1, 0xc1).w("crtc", FUNC(mc6845_device::register_w));
193+
map(0xc0, 0xc0).w("crtc", FUNC(hd6845s_device::address_w));
194+
map(0xc1, 0xc1).w("crtc", FUNC(hd6845s_device::register_w));
180195
}
181196

182197

@@ -450,7 +465,7 @@ const gfx_layout gfx_8x8x8_planar =
450465
};
451466

452467

453-
static GFXDECODE_START( gfx_boram ) // TODO
468+
static GFXDECODE_START( gfx_boram )
454469
GFXDECODE_ENTRY( "chars", 0, gfx_8x8x2_planar, 0x000, 16 )
455470
GFXDECODE_ENTRY( "tiles", 0, gfx_8x8x8_planar, 0x200, 16 )
456471
GFXDECODE_END
@@ -467,7 +482,7 @@ void boramz80_state::pk(machine_config &config)
467482
ppi.in_pa_callback().set_ioport("DSW1");
468483
ppi.in_pb_callback().set_ioport("DSW2");
469484
ppi.in_pc_callback().set([this] () { logerror("%s: PPI port C read\n", machine().describe_context()); return 0; });
470-
ppi.out_pc_callback().set([this] (uint8_t data) { logerror("%s: PPI port C write %02x\n", machine().describe_context(), data); });
485+
ppi.out_pc_callback().set(FUNC(boramz80_state::output_w));
471486

472487
screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
473488
screen.set_refresh_hz(60);

0 commit comments

Comments
 (0)