diff options
Diffstat (limited to 'src/mame/sega/megadriv_acbl.cpp')
| -rw-r--r-- | src/mame/sega/megadriv_acbl.cpp | 101 |
1 files changed, 95 insertions, 6 deletions
diff --git a/src/mame/sega/megadriv_acbl.cpp b/src/mame/sega/megadriv_acbl.cpp index c8a44932efd..6ac250512cd 100644 --- a/src/mame/sega/megadriv_acbl.cpp +++ b/src/mame/sega/megadriv_acbl.cpp @@ -281,6 +281,29 @@ private: void ssf2mdb_68k_map(address_map &map) ATTR_COLD; }; +class md_connie_3in1_state : public md_boot_state +{ +public: + md_connie_3in1_state(const machine_config& mconfig, device_type type, const char* tag) : + md_boot_state(mconfig, type, tag), + m_gamebank(*this, "gamebank") + { + } + + void connie3in1(machine_config &config) ATTR_COLD; + DECLARE_INPUT_CHANGED_MEMBER(coin_inserted); + +protected: + virtual void machine_start() override ATTR_COLD; + virtual void machine_reset() override ATTR_COLD; + + void md_connie_3in1_map(address_map &map) ATTR_COLD; + +private: + required_memory_bank m_gamebank; +}; + + /************************************ Mega Drive Bootlegs *************************************/ // smaller ROM region because some bootlegs check for RAM there (used by topshoot and hshavoc) @@ -315,6 +338,19 @@ void md_boot_6button_state::ssf2mdb_68k_map(address_map &map) map(0xa130f0, 0xa130ff).nopw(); // custom banking is disabled (!) } +void md_connie_3in1_state::md_connie_3in1_map(address_map &map) +{ + megadriv_68k_map(map); + map(0x000000, 0x0fffff).bankr(m_gamebank); + + map(0x800000, 0x800001).portr("DSW"); + map(0x820000, 0x820000).lw8(NAME([this] (offs_t offset, u8 data) { + logerror("$820000 game_bank_w: %02x\n", data); + m_gamebank->set_entry(data & 3); + })); + map(0x840000, 0x840001).portr("COINS"); +} + /************************************* * * Games memory handlers @@ -1133,6 +1169,37 @@ INPUT_PORTS_START( biohzdmb ) PORT_DIPUNKNOWN_DIPLOC(0x80, 0x80, "DSWC:8") INPUT_PORTS_END +// coin timing is very specific: wants two NMIs, one for chute press, the other for release. +// Gunstar Heroes and Joe & Mac are very timing sensitive: a different timing will give more or less credits +// Snake Rattle n Roll doesn't care, also because that game doesn't use irqs at all. +INPUT_CHANGED_MEMBER(md_connie_3in1_state::coin_inserted) +{ + m_maincpu->pulse_input_line(INPUT_LINE_NMI, attotime::from_usec(1000)); +} + +INPUT_PORTS_START( connie3in1 ) + PORT_INCLUDE( md_common ) + + PORT_START("COINS") + PORT_BIT( 0x0001, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, FUNC(md_connie_3in1_state::coin_inserted), 0) PORT_IMPULSE(1) + PORT_BIT( 0xfffe, IP_ACTIVE_HIGH, IPT_UNKNOWN ) + + // dips are read on-the-fly by individual games + PORT_START("DSW") + PORT_DIPUNKNOWN_DIPLOC(0x01, 0x01, "DSW:1") + PORT_DIPUNKNOWN_DIPLOC(0x02, 0x02, "DSW:2") + // Joe & Mac at PC=d06, $a011a8 (Z80 space!?) + PORT_DIPUNKNOWN_DIPLOC(0x04, 0x04, "DSW:3") + PORT_DIPUNKNOWN_DIPLOC(0x08, 0x08, "DSW:4") + // Snake Rattle n Roll at PC=8c0, $ff0a94 (and-ed with $30) + PORT_DIPUNKNOWN_DIPLOC(0x10, 0x10, "DSW:5") + PORT_DIPUNKNOWN_DIPLOC(0x20, 0x20, "DSW:6") + PORT_DIPUNKNOWN_DIPLOC(0x40, 0x40, "DSW:7") + PORT_DIPUNKNOWN_DIPLOC(0x80, 0x80, "DSW:8") + PORT_BIT(0xff00, IP_ACTIVE_LOW, IPT_UNUSED ) +INPUT_PORTS_END + + /************************************* * @@ -1157,6 +1224,25 @@ void md_boot_state::md_bootleg(machine_config &config) m_maincpu->set_addrmap(AS_PROGRAM, &md_boot_state::md_bootleg_map); } +void md_connie_3in1_state::connie3in1(machine_config &config) +{ + megadrvb(config); + + m_maincpu->set_addrmap(AS_PROGRAM, &md_connie_3in1_state::md_connie_3in1_map); +} + +void md_connie_3in1_state::machine_start() +{ + md_boot_state::machine_start(); + m_gamebank->configure_entries(0, 4, memregion("maincpu")->base(), 0x100000); +} + +void md_connie_3in1_state::machine_reset() +{ + md_boot_state::machine_reset(); + m_gamebank->set_entry(1); +} + void md_boot_mcu_state::md_boot_mcu(machine_config &config) { megadrvb(config); @@ -1657,13 +1743,16 @@ ROM_START( contrambc ) ROM_END ROM_START( 3in1mbc ) - ROM_REGION( 0x400000, "maincpu", 0 ) - ROM_LOAD16_BYTE( "rom6.bin", 0x000000, 0x080000, CRC(7e333c36) SHA1(db2dc129d96a31bc1021cc7ce9538f3b2a9306bb) ) - ROM_LOAD16_BYTE( "rom3.bin", 0x000001, 0x080000, CRC(7e3bded6) SHA1(1073c73535e89211b3d329f1119cc95a9d522686) ) - ROM_LOAD16_BYTE( "rom5.bin", 0x100000, 0x080000, CRC(f869f746) SHA1(0a7ac33fd844732a5384f173f422213134211d75) ) - ROM_LOAD16_BYTE( "rom2.bin", 0x100001, 0x080000, CRC(de60da62) SHA1(62d811dda61390e8d89b52c4a77d94f209cfcc72) ) + ROM_REGION( 0x400000, "maincpu", ROMREGION_ERASEFF ) + // Gunstar Heroes + ROM_LOAD16_BYTE( "rom6.bin", 0x100000, 0x080000, CRC(7e333c36) SHA1(db2dc129d96a31bc1021cc7ce9538f3b2a9306bb) ) + ROM_LOAD16_BYTE( "rom3.bin", 0x100001, 0x080000, CRC(7e3bded6) SHA1(1073c73535e89211b3d329f1119cc95a9d522686) ) + // Snake Rattle n Roll ROM_LOAD16_BYTE( "rom4.bin", 0x200000, 0x080000, CRC(6faf99cd) SHA1(fa8960afd5200c230cdc19801114169fbb87cdea) ) // 1xxxxxxxxxxxxxxxxxx = 0x00 ROM_LOAD16_BYTE( "rom1.bin", 0x200001, 0x080000, CRC(a7d2adb9) SHA1(3b6a1c6fb26303594da166f3d5b8542da1e949cb) ) // 1xxxxxxxxxxxxxxxxxx = 0x00 + // Joe & Mac + ROM_LOAD16_BYTE( "rom5.bin", 0x300000, 0x080000, CRC(f869f746) SHA1(0a7ac33fd844732a5384f173f422213134211d75) ) + ROM_LOAD16_BYTE( "rom2.bin", 0x300001, 0x080000, CRC(de60da62) SHA1(62d811dda61390e8d89b52c4a77d94f209cfcc72) ) ROM_END ROM_START( barek3mbc ) @@ -1722,7 +1811,7 @@ GAME( 1995, biohzdmb, 0, megadrvb, biohzdmb, md_boot_state, // Conny bootlegs with Mega Drive bootleg chipset marked TA-04, TA-05 and TA-06. 1 DIP switch bank. 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 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 -GAME( 1995, 3in1mbc, 0, megadrvb, biohzdmb, md_boot_state, init_conny_bit7<0x880000>, ROT0, "bootleg", "Gunstar Heroes / Snake Rattle n' Roll / Joe & Mac (Conny bootleg of Mega Drive versions)", MACHINE_NOT_WORKING ) // no coins, no game switching +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) 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 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 // Samurai Spirits and Kuhga PCBs have also been seen |
