Skip to content

Commit 17adb7e

Browse files
committed
sega/megadriv_acbl.cpp: add coin NMI for standalone Connie games
1 parent dcc316a commit 17adb7e

1 file changed

Lines changed: 62 additions & 11 deletions

File tree

src/mame/sega/megadriv_acbl.cpp

Lines changed: 62 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -281,17 +281,31 @@ class md_boot_6button_state : public md_boot_state
281281
void ssf2mdb_68k_map(address_map &map) ATTR_COLD;
282282
};
283283

284-
class md_connie_3in1_state : public md_boot_state
284+
class md_connie_state : public md_boot_state
285+
{
286+
public:
287+
md_connie_state(const machine_config& mconfig, device_type type, const char* tag) :
288+
md_boot_state(mconfig, type, tag)
289+
{
290+
}
291+
292+
void connie(machine_config &config) ATTR_COLD;
293+
DECLARE_INPUT_CHANGED_MEMBER(coin_inserted);
294+
295+
protected:
296+
void md_connie_map(address_map &map) ATTR_COLD;
297+
};
298+
299+
class md_connie_3in1_state : public md_connie_state
285300
{
286301
public:
287302
md_connie_3in1_state(const machine_config& mconfig, device_type type, const char* tag) :
288-
md_boot_state(mconfig, type, tag),
303+
md_connie_state(mconfig, type, tag),
289304
m_gamebank(*this, "gamebank")
290305
{
291306
}
292307

293308
void connie3in1(machine_config &config) ATTR_COLD;
294-
DECLARE_INPUT_CHANGED_MEMBER(coin_inserted);
295309

296310
protected:
297311
virtual void machine_start() override ATTR_COLD;
@@ -338,6 +352,16 @@ void md_boot_6button_state::ssf2mdb_68k_map(address_map &map)
338352
map(0xa130f0, 0xa130ff).nopw(); // custom banking is disabled (!)
339353
}
340354

355+
void md_connie_state::md_connie_map(address_map &map)
356+
{
357+
megadriv_68k_map(map);
358+
359+
map(0x000000, 0x3fffff).rom();
360+
361+
map(0x800000, 0x800001).portr("DSW");
362+
map(0x840000, 0x840001).portr("COINS");
363+
}
364+
341365
void md_connie_3in1_state::md_connie_3in1_map(address_map &map)
342366
{
343367
megadriv_68k_map(map);
@@ -1170,13 +1194,33 @@ INPUT_PORTS_START( biohzdmb )
11701194
INPUT_PORTS_END
11711195

11721196
// coin timing is very specific: wants two NMIs, one for chute press, the other for release.
1173-
// Gunstar Heroes and Joe & Mac are very timing sensitive: a different timing will give more or less credits
1174-
// Snake Rattle n Roll doesn't care, also because that game doesn't use irqs at all.
1175-
INPUT_CHANGED_MEMBER(md_connie_3in1_state::coin_inserted)
1197+
// For 3in1mbc:
1198+
// - Gunstar Heroes and Joe & Mac are very timing sensitive: a different timing will give more or less credits
1199+
// - Snake Rattle n Roll doesn't care, also because that game doesn't use irqs at all.
1200+
INPUT_CHANGED_MEMBER(md_connie_state::coin_inserted)
11761201
{
11771202
m_maincpu->pulse_input_line(INPUT_LINE_NMI, attotime::from_usec(1000));
11781203
}
11791204

1205+
INPUT_PORTS_START( connie )
1206+
PORT_INCLUDE( md_common )
1207+
1208+
PORT_START("COINS")
1209+
PORT_BIT( 0x0001, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, FUNC(md_connie_state::coin_inserted), 0) PORT_IMPULSE(1)
1210+
PORT_BIT( 0xfffe, IP_ACTIVE_HIGH, IPT_UNKNOWN )
1211+
1212+
PORT_START("DSW")
1213+
PORT_DIPUNKNOWN_DIPLOC(0x01, 0x01, "DSW:1")
1214+
PORT_DIPUNKNOWN_DIPLOC(0x02, 0x02, "DSW:2")
1215+
PORT_DIPUNKNOWN_DIPLOC(0x04, 0x04, "DSW:3")
1216+
PORT_DIPUNKNOWN_DIPLOC(0x08, 0x08, "DSW:4")
1217+
PORT_DIPUNKNOWN_DIPLOC(0x10, 0x10, "DSW:5")
1218+
PORT_DIPUNKNOWN_DIPLOC(0x20, 0x20, "DSW:6")
1219+
PORT_DIPUNKNOWN_DIPLOC(0x40, 0x40, "DSW:7")
1220+
PORT_DIPUNKNOWN_DIPLOC(0x80, 0x80, "DSW:8")
1221+
PORT_BIT(0xff00, IP_ACTIVE_LOW, IPT_UNUSED )
1222+
INPUT_PORTS_END
1223+
11801224
INPUT_PORTS_START( connie3in1 )
11811225
PORT_INCLUDE( md_common )
11821226

@@ -1224,6 +1268,13 @@ void md_boot_state::md_bootleg(machine_config &config)
12241268
m_maincpu->set_addrmap(AS_PROGRAM, &md_boot_state::md_bootleg_map);
12251269
}
12261270

1271+
void md_connie_state::connie(machine_config &config)
1272+
{
1273+
megadrvb(config);
1274+
1275+
m_maincpu->set_addrmap(AS_PROGRAM, &md_connie_state::md_connie_map);
1276+
}
1277+
12271278
void md_connie_3in1_state::connie3in1(machine_config &config)
12281279
{
12291280
megadrvb(config);
@@ -1809,9 +1860,9 @@ GAME( 1994, barek2ch, 0, md_bootleg, barek2ch, md_boot_state,
18091860
GAME( 1995, biohzdmb, 0, megadrvb, biohzdmb, md_boot_state, init_biohzdmb, ROT0, "bootleg / Sega", "Bio-Hazard Battle (scrambled bootleg of Mega Drive version)", 0 )
18101861

18111862
// Conny bootlegs with Mega Drive bootleg chipset marked TA-04, TA-05 and TA-06. 1 DIP switch bank.
1812-
GAME( 1995, contrambc, 0, megadrvb, biohzdmb, md_boot_state, init_bushack<0x860000>, ROT0, "bootleg / Konami", "Contra (Conny bootleg of Mega Drive version)", MACHINE_UNEMULATED_PROTECTION | MACHINE_NOT_WORKING ) // doesn't seem to like megadriv_68k_check_z80_bus(), no coins
1813-
GAME( 1995, sidepmbc, 0, megadrvb, biohzdmb, md_boot_state, init_conny_bit7<0x8a0000>, ROT0, "bootleg / Data East", "Side Pocket (Conny bootleg of Mega Drive version)", MACHINE_NOT_WORKING ) // no coins
1814-
GAME( 1995, 3in1mbc, 0, connie3in1, connie3in1,md_connie_3in1_state, init_conny_bit7<0x880000>, ROT0, "bootleg", "Gunstar Heroes / Snake Rattle n' Roll / Joe & Mac (Conny bootleg of Mega Drive versions)", MACHINE_NOT_WORKING ) // pressing buttons during attract bankswitch between games. Gunstar Heroes crashes doing so during title screen anim (with irq 4 enabled, verify)
1815-
GAME( 1995, barek3mbc, 0, megadrvb, biohzdmb, md_boot_state, init_conny_bit6<0x820000>, ROT0, "bootleg (Sega)", "Bare Knuckle III (Conny bootleg of Mega Drive version)", MACHINE_NOT_WORKING ) // no coins
1816-
GAME( 1996, mickeycmb, 0, megadrvb, biohzdmb, md_boot_state, init_bushack<0x8c0000>, ROT0, "bootleg (Conny)", "The Great Hongyun Shu 1996 (Conny bootleg of Mega Drive version)", MACHINE_NOT_WORKING ) // no coins
1863+
GAME( 1995, contrambc, 0, connie, connie, md_connie_state, init_bushack<0x860000>, ROT0, "bootleg / Konami", "Contra (Conny bootleg of Mega Drive version)", MACHINE_UNEMULATED_PROTECTION | MACHINE_NOT_WORKING ) // doesn't seem to like megadriv_68k_check_z80_bus(), crashes after title, doesn't read start button even if credits are in.
1864+
GAME( 1995, sidepmbc, 0, connie, connie, md_connie_state, init_conny_bit7<0x8a0000>, ROT0, "bootleg / Data East", "Side Pocket (Conny bootleg of Mega Drive version)", MACHINE_NOT_WORKING ) // buggy when pressing start with no credit (verify), test me
1865+
GAME( 1995, 3in1mbc, 0, connie3in1, connie3in1,md_connie_3in1_state, init_conny_bit7<0x880000>, ROT0, "bootleg", "Gunstar Heroes / Snake Rattle n' Roll / Joe & Mac (Conny bootleg of Mega Drive versions)", MACHINE_NOT_WORKING ) // pressing buttons during attract bankswitch between games. Gunstar Heroes crashes doing so during title screen anim (with irq 4 enabled, verify), credits aren't preserved when switching from/to Joe & Mac (verify)
1866+
GAME( 1995, barek3mbc, 0, connie, connie, md_connie_state, init_conny_bit6<0x820000>, ROT0, "bootleg (Sega)", "Bare Knuckle III (Conny bootleg of Mega Drive version)", MACHINE_NOT_WORKING ) // test me
1867+
GAME( 1996, mickeycmb, 0, connie, connie, md_connie_state, init_bushack<0x8c0000>, ROT0, "bootleg (Conny)", "The Great Hongyun Shu 1996 (Conny bootleg of Mega Drive version)", MACHINE_NOT_WORKING ) // test me
18171868
// Samurai Spirits and Kuhga PCBs have also been seen

0 commit comments

Comments
 (0)