diff --git a/src/mame/sega/hshavoc.cpp b/src/mame/sega/hshavoc.cpp index 6c58894834c..ea552fc47ba 100644 --- a/src/mame/sega/hshavoc.cpp +++ b/src/mame/sega/hshavoc.cpp @@ -64,7 +64,7 @@ public: }; -static INPUT_PORTS_START( hshavoc ) +INPUT_PORTS_START( hshavoc ) PORT_START("IN0") // 16 bit PORT_DIPNAME( 0x0001, 0x0000, DEF_STR( Unknown ) ) PORT_DIPSETTING( 0x0001, DEF_STR( Off ) ) diff --git a/src/mame/sega/megadriv_acbl.cpp b/src/mame/sega/megadriv_acbl.cpp index 0823b3019e3..abb62544ec1 100644 --- a/src/mame/sega/megadriv_acbl.cpp +++ b/src/mame/sega/megadriv_acbl.cpp @@ -274,13 +274,69 @@ void md_boot_state::md_bootleg_map(address_map &map) map(0x200000, 0x2023ff).ram(); // Tested } -void md_boot_state::md_bootleg(machine_config &config) +void md_boot_state::topshoot_68k_map(address_map &map) +{ + md_bootleg_map(map); + + // these are shared RAM, MCU puts the inputs here + map(0x200042, 0x200043).portr("IN0"); + map(0x200044, 0x200045).portr("IN1"); + map(0x200046, 0x200047).portr("IN2"); + map(0x200048, 0x200049).portr("IN3"); + map(0x200050, 0x200051).r(FUNC(md_boot_state::topshoot_200051_r)); +} + +void md_boot_state::sbubsm_68k_map(address_map &map) +{ + topshoot_68k_map(map); + + // these are shared RAM, MCU puts the inputs here + map(0x20007e, 0x20007f).portr("IN4"); + + // needed to boot, somme kind of hardware ident? + map(0x400000, 0x400001).r(FUNC(md_boot_state::sbubsm_400000_r)); + map(0x400002, 0x400003).r(FUNC(md_boot_state::sbubsm_400002_r)); +} + +void md_boot_6button_state::ssf2mdb_68k_map(address_map &map) +{ + megadriv_68k_map(map); + + map(0x400000, 0x5fffff).rom().region("maincpu", 0x400000).unmapw(); + map(0x770070, 0x770075).r(FUNC(md_boot_6button_state::dsw_r)); + map(0xa130f0, 0xa130ff).nopw(); // custom banking is disabled (!) +} + + +void md_boot_state::megadrvb(machine_config &config) { md_ntsc(config); + m_ioports[2]->set_in_handler(NAME([this] () { return m_io_exp.read_safe(0x3f); })); +} + +void md_boot_state::md_bootleg(machine_config &config) +{ + megadrvb(config); + m_maincpu->set_addrmap(AS_PROGRAM, &md_boot_state::md_bootleg_map); } +void md_boot_state::topshoot(machine_config &config) +{ + megadrvb(config); + + m_maincpu->set_addrmap(AS_PROGRAM, &md_boot_state::topshoot_68k_map); +} + +void md_boot_state::sbubsm(machine_config &config) +{ + megadrvb(config); + + m_maincpu->set_addrmap(AS_PROGRAM, &md_boot_state::sbubsm_68k_map); +} + + /************************************* * * Games memory handlers @@ -411,77 +467,6 @@ uint16_t md_boot_state::sbubsm_400002_r() return 0x0f00; } -// jzth protection -void md_boot_state::bl_710000_w(offs_t offset, uint16_t data, uint16_t mem_mask) -{ - int pc = m_maincpu->pc(); - - logerror("%06x writing to bl_710000_w %04x %04x\n", pc, data, mem_mask); - - // protection value is read from 0x710000 after a series of writes.. and stored at ff0007 - // startup - /* - 059ce0 writing to bl_710000_w ff08 ffff - 059d04 writing to bl_710000_w 000a ffff - 059d04 writing to bl_710000_w 000b ffff - 059d04 writing to bl_710000_w 000c ffff - 059d04 writing to bl_710000_w 000f ffff - 059d1c writing to bl_710000_w ff09 ffff - 059d2a reading from bl_710000_r (wants 0xe) - 059ce0 writing to bl_710000_w ff08 ffff - 059d04 writing to bl_710000_w 000a ffff - 059d04 writing to bl_710000_w 000b ffff - 059d04 writing to bl_710000_w 000c ffff - 059d04 writing to bl_710000_w 000f ffff - 059d1c writing to bl_710000_w ff09 ffff - 059d2a reading from bl_710000_r (wants 0xe) - */ - // before lv stage 3 - /* - 059ce0 writing to bl_710000_w 0008 ffff - 059d04 writing to bl_710000_w 000b ffff - 059d04 writing to bl_710000_w 000f ffff - 059d1c writing to bl_710000_w ff09 ffff - 059d2a reading from bl_710000_r (wants 0x4) - */ - // start level 3 - /* - 059ce0 writing to bl_710000_w ff08 ffff - 059d04 writing to bl_710000_w 000b ffff - 059d04 writing to bl_710000_w 000c ffff - 059d04 writing to bl_710000_w 000e ffff - 059d1c writing to bl_710000_w ff09 ffff - 059d2a reading from bl_710000_r (wants 0x5) - - // after end sequence - 059ce0 writing to bl_710000_w 0008 ffff - 059d04 writing to bl_710000_w 000a ffff - 059d04 writing to bl_710000_w 000b ffff - 059d04 writing to bl_710000_w 000c ffff - 059d04 writing to bl_710000_w 000f ffff - 059d1c writing to bl_710000_w ff09 ffff - 059d2a reading from bl_710000_r (wants 0xe) - - */ - m_protcount++; -} - - -uint16_t md_boot_state::bl_710000_r() -{ - uint16_t ret; - int pc = m_maincpu->pc(); - logerror("%06x reading from bl_710000_r\n", pc); - - if (m_protcount==6) { ret = 0xe; } - else if (m_protcount==5) { ret = 0x5; } - else if (m_protcount==4) { ret = 0x4; } - else ret = 0xf; - - m_protcount = 0; - return ret; -} - /************************************* * @@ -1115,14 +1100,6 @@ INPUT_PORTS_END * *************************************/ -void md_boot_state::megadrvb(machine_config &config) -{ - md_ntsc(config); - - m_ioports[2]->set_in_handler(NAME([this] () { return m_io_exp.read_safe(0x3f); })); -} - - void md_boot_6button_state::machine_start() { md_boot_state::machine_start(); @@ -1140,6 +1117,13 @@ void md_boot_6button_state::megadrvb_6b(machine_config &config) m_ioports[1]->set_out_handler(FUNC(md_boot_6button_state::ioport_out_6button<1>)); } +void md_boot_6button_state::ssf2mdb(machine_config &config) +{ + megadrvb_6b(config); + + m_maincpu->set_addrmap(AS_PROGRAM, &md_boot_6button_state::ssf2mdb_68k_map); +} + /************************************* @@ -1153,10 +1137,10 @@ void md_boot_6button_state::megadrvb_6b(machine_config &config) void md_boot_state::init_aladmdb() { // Game does a check @ 1afc00 with work RAM fff57c that makes it play like the original console version (i.e. 8 energy hits instead of 2) - #if ENERGY_CONSOLE_MODE +#if ENERGY_CONSOLE_MODE uint16_t *rom = (uint16_t *)memregion("maincpu")->base(); rom[0x1afc08/2] = 0x6600; - #endif +#endif // 220000 = writes to mcu? 330000 = reads? m_maincpu->space(AS_PROGRAM).install_write_handler(0x220000, 0x220001, write16smo_delegate(*this, FUNC(md_boot_state::aladmdb_w))); @@ -1213,16 +1197,6 @@ void md_boot_6button_state::init_mk3mdb() init_megadriv(); } -void md_boot_6button_state::init_ssf2mdb() -{ - m_maincpu->space(AS_PROGRAM).nop_write(0xa130f0, 0xa130ff); // custom banking is disabled (!) - m_maincpu->space(AS_PROGRAM).install_rom(0x400000, 0x5fffff, memregion( "maincpu" )->base() + 0x400000); - m_maincpu->space(AS_PROGRAM).unmap_write(0x400000, 0x5fffff); - m_maincpu->space(AS_PROGRAM).install_read_handler(0x770070, 0x770075, read16sm_delegate(*this, FUNC(md_boot_6button_state::dsw_r))); - - init_megadrij(); -} - void md_boot_state::init_srmdb() { uint8_t* rom = memregion("maincpu")->base(); @@ -1251,37 +1225,6 @@ void md_boot_state::init_srmdb() init_megadriv(); } -void md_boot_state::init_topshoot() -{ - - // these are shared RAM, MCU puts the inputs here - m_maincpu->space(AS_PROGRAM).install_read_handler(0x200050, 0x200051, read16smo_delegate(*this, FUNC(md_boot_state::topshoot_200051_r))); - m_maincpu->space(AS_PROGRAM).install_read_port(0x200042, 0x200043, "IN0"); - m_maincpu->space(AS_PROGRAM).install_read_port(0x200044, 0x200045, "IN1"); - m_maincpu->space(AS_PROGRAM).install_read_port(0x200046, 0x200047, "IN2"); - m_maincpu->space(AS_PROGRAM).install_read_port(0x200048, 0x200049, "IN3"); - - init_megadriv(); -} - - -void md_boot_state::init_sbubsm() -{ - // needed to boot, somme kind of hardware ident? - m_maincpu->space(AS_PROGRAM).install_read_handler(0x400000, 0x400001, read16smo_delegate(*this, FUNC(md_boot_state::sbubsm_400000_r))); - m_maincpu->space(AS_PROGRAM).install_read_handler(0x400002, 0x400003, read16smo_delegate(*this, FUNC(md_boot_state::sbubsm_400002_r))); - - // these are shared RAM, MCU puts the inputs here - m_maincpu->space(AS_PROGRAM).install_read_handler(0x200050, 0x200051, read16smo_delegate(*this, FUNC(md_boot_state::topshoot_200051_r))); // needed for coins to work - m_maincpu->space(AS_PROGRAM).install_read_port(0x200042, 0x200043, "IN0"); - m_maincpu->space(AS_PROGRAM).install_read_port(0x200044, 0x200045, "IN1"); - m_maincpu->space(AS_PROGRAM).install_read_port(0x200046, 0x200047, "IN2"); - m_maincpu->space(AS_PROGRAM).install_read_port(0x200048, 0x200049, "IN3"); - m_maincpu->space(AS_PROGRAM).install_read_port(0x20007e, 0x20007f, "IN4"); - - init_megadriv(); -} - void md_boot_state::init_barek2() { @@ -1578,10 +1521,10 @@ ROM_END GAME( 1993, aladmdb, 0, megadrvb, aladmdb, md_boot_state, init_aladmdb, ROT0, "bootleg / Sega", "Aladdin (bootleg of Japanese Mega Drive version)", 0 ) GAME( 1996, mk3mdb, 0, megadrvb_6b, mk3mdb, md_boot_6button_state, init_mk3mdb, ROT0, "bootleg / Midway", "Mortal Kombat 3 (bootleg of Mega Drive version)", 0 ) -GAME( 1994, ssf2mdb, 0, megadrvb_6b, ssf2mdb, md_boot_6button_state, init_ssf2mdb, ROT0, "bootleg / Capcom", "Super Street Fighter II - The New Challengers (bootleg of Japanese Mega Drive version)", 0 ) +GAME( 1994, ssf2mdb, 0, ssf2mdb, ssf2mdb, md_boot_6button_state, init_megadrij, ROT0, "bootleg / Capcom", "Super Street Fighter II - The New Challengers (bootleg of Japanese Mega Drive version)", 0 ) GAME( 1993, srmdb, 0, megadrvb, srmdb, md_boot_state, init_srmdb, ROT0, "bootleg / Konami", "Sunset Riders (bootleg of Mega Drive version)", 0 ) -GAME( 1995, topshoot, 0, md_bootleg, topshoot, md_boot_state, init_topshoot, ROT0, "Sun Mixing", "Top Shooter", 0 ) -GAME( 1996, sbubsm, 0, md_bootleg, sbubsm, md_boot_state, init_sbubsm, ROT0, "Sun Mixing", "Super Bubble Bobble (Sun Mixing, Mega Drive clone hardware)", 0 ) +GAME( 1995, topshoot, 0, topshoot, topshoot, md_boot_state, init_megadriv, ROT0, "Sun Mixing", "Top Shooter", 0 ) +GAME( 1996, sbubsm, 0, sbubsm, sbubsm, md_boot_state, init_megadriv, ROT0, "Sun Mixing", "Super Bubble Bobble (Sun Mixing, Mega Drive clone hardware)", 0 ) GAME( 1993, sonic2mb, 0, md_bootleg, sonic2mb, md_boot_state, init_sonic2mb, ROT0, "bootleg / Sega", "Sonic The Hedgehog 2 (bootleg of Mega Drive version)", 0 ) // Flying wires going through the empty PIC space aren't completely understood GAME( 1993, sonic3mb, 0, md_bootleg, sonic3mb, md_sonic3bl_state, init_sonic3mb, ROT0, "bootleg / Sega", "Sonic The Hedgehog 3 (bootleg of Mega Drive version)", MACHINE_UNEMULATED_PROTECTION | MACHINE_NOT_WORKING ) // undumped PIC GAME( 1994, barek2mb, 0, md_bootleg, barek2, md_boot_state, init_barek2, ROT0, "bootleg / Sega", "Bare Knuckle II (bootleg of Mega Drive version)", MACHINE_UNEMULATED_PROTECTION | MACHINE_NOT_WORKING ) // Needs PIC hook up diff --git a/src/mame/sega/megadriv_acbl.h b/src/mame/sega/megadriv_acbl.h index 9b3e2595175..87036021190 100644 --- a/src/mame/sega/megadriv_acbl.h +++ b/src/mame/sega/megadriv_acbl.h @@ -16,28 +16,24 @@ public: void megadrvb(machine_config &config); void md_bootleg(machine_config &config); - void puckpkmn(machine_config &config); - void jzth(machine_config &config); - void puckpkmna(machine_config &config); + void topshoot(machine_config &config); + void sbubsm(machine_config &config); void init_aladmdb(); void init_srmdb(); - void init_topshoot(); - void init_puckpkmn(); void init_barek2(); void init_barek2ch(); void init_barek3(); void init_sonic2mb(); void init_twinktmb(); void init_jparkmb(); - void init_sbubsm(); protected: uint16_t dsw_r(offs_t offset); + void md_bootleg_map(address_map &map); + private: - void bl_710000_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); - uint16_t bl_710000_r(); void aladmdb_w(uint16_t data); uint16_t aladmdb_r(); uint16_t barek2mb_r(); @@ -46,20 +42,14 @@ private: uint16_t topshoot_200051_r(); uint16_t sbubsm_400000_r(); uint16_t sbubsm_400002_r(); - uint16_t puckpkmna_70001c_r(); - uint16_t puckpkmna_4b2476_r(); - void jzth_map(address_map &map); - void md_bootleg_map(address_map &map); - void puckpkmn_map(address_map &map); - void puckpkmna_map(address_map &map); + void topshoot_68k_map(address_map &map); + void sbubsm_68k_map(address_map &map); optional_ioport m_io_exp; // bootleg specific int m_aladmdb_mcu_port = 0; - - int m_protcount = 0; }; class md_sonic3bl_state : public md_boot_state @@ -92,14 +82,17 @@ public: } void megadrvb_6b(machine_config &config); + void ssf2mdb(machine_config &config); void init_mk3mdb(); - void init_ssf2mdb(); void init_bk3ssrmb(); void init_barekch(); protected: virtual void machine_start() override; + +private: + void ssf2mdb_68k_map(address_map &map); }; #endif // MAME_INCLUDES_MEGADRIV_ACBL_H diff --git a/src/mame/sega/puckpkmn.cpp b/src/mame/sega/puckpkmn.cpp index 9e9881bca07..ae1ccc04354 100644 --- a/src/mame/sega/puckpkmn.cpp +++ b/src/mame/sega/puckpkmn.cpp @@ -45,7 +45,7 @@ Notes: */ #include "emu.h" -#include "megadriv_acbl.h" +#include "megadriv.h" #include "cpu/m68000/m68000.h" #include "sound/okim6295.h" @@ -53,8 +53,37 @@ Notes: #include "sound/ymopn.h" +namespace { + +class puckpkmn_state : public md_base_state +{ +public: + puckpkmn_state(const machine_config &mconfig, device_type type, const char *tag) : + md_base_state(mconfig, type, tag) + { } + + void puckpkmn(machine_config &config); + void puckpkmna(machine_config &config); + void jzth(machine_config &config); + + void init_puckpkmn(); + +private: + uint16_t puckpkmna_70001c_r(); + uint16_t puckpkmna_4b2476_r(); + void bl_710000_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); + uint16_t bl_710000_r(); + + void jzth_map(address_map &map); + void puckpkmn_map(address_map &map); + void puckpkmna_map(address_map &map); + + int m_protcount = 0; +}; + + /* Puckman Pockimon Input Ports */ -static INPUT_PORTS_START( puckpkmn ) +INPUT_PORTS_START( puckpkmn ) PORT_START("P2") /* $700011.b */ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) @@ -130,7 +159,7 @@ INPUT_PORTS_END -static INPUT_PORTS_START( jzth ) +INPUT_PORTS_START( jzth ) PORT_START("P2") /* $700011.b */ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) @@ -213,7 +242,7 @@ static INPUT_PORTS_START( jzth ) INPUT_PORTS_END -void md_boot_state::puckpkmn_map(address_map &map) +void puckpkmn_state::puckpkmn_map(address_map &map) { map(0x000000, 0x3fffff).rom(); /* Main 68k Program Roms */ map(0x700010, 0x700011).portr("P2"); @@ -222,7 +251,7 @@ void md_boot_state::puckpkmn_map(address_map &map) map(0x700016, 0x700017).portr("DSW1"); map(0x700018, 0x700019).portr("DSW2"); map(0x700023, 0x700023).rw("oki", FUNC(okim6295_device::read), FUNC(okim6295_device::write)); - map(0xa04000, 0xa04003).rw(FUNC(md_boot_state::megadriv_68k_YM2612_read), FUNC(md_boot_state::megadriv_68k_YM2612_write)); + map(0xa04000, 0xa04003).rw(FUNC(puckpkmn_state::megadriv_68k_YM2612_read), FUNC(puckpkmn_state::megadriv_68k_YM2612_write)); map(0xc00000, 0xc0001f).rw(m_vdp, FUNC(sega315_5313_device::vdp_r), FUNC(sega315_5313_device::vdp_w)); map(0xe00000, 0xe0ffff).ram().mirror(0x1f0000); @@ -238,7 +267,7 @@ void md_boot_state::puckpkmn_map(address_map &map) } -void md_boot_state::jzth_map(address_map &map) +void puckpkmn_state::jzth_map(address_map &map) { map(0x000000, 0x3fffff).rom(); map(0x700010, 0x700011).portr("P2"); @@ -247,7 +276,7 @@ void md_boot_state::jzth_map(address_map &map) map(0x700016, 0x700017).portr("DSW1"); map(0x700018, 0x700019).portr("DSW2"); map(0x700023, 0x700023).rw("oki", FUNC(okim6295_device::read), FUNC(okim6295_device::write)); - map(0xa04000, 0xa04003).rw(FUNC(md_boot_state::megadriv_68k_YM2612_read), FUNC(md_boot_state::megadriv_68k_YM2612_write)); + map(0xa04000, 0xa04003).rw(FUNC(puckpkmn_state::megadriv_68k_YM2612_read), FUNC(puckpkmn_state::megadriv_68k_YM2612_write)); map(0xc00000, 0xc0001f).rw(m_vdp, FUNC(sega315_5313_device::vdp_r), FUNC(sega315_5313_device::vdp_w)); map(0xe00000, 0xe0ffff).ram().mirror(0x1f0000); @@ -256,33 +285,105 @@ void md_boot_state::jzth_map(address_map &map) map(0xA11100, 0xA11101).noprw(); - map(0x710000, 0x710001).rw(FUNC(md_boot_state::bl_710000_r), FUNC(md_boot_state::bl_710000_w)); // protection, will erase the VDP address causing writes to 0 unless this returns 0xe + map(0x710000, 0x710001).rw(FUNC(puckpkmn_state::bl_710000_r), FUNC(puckpkmn_state::bl_710000_w)); // protection, will erase the VDP address causing writes to 0 unless this returns 0xe } -uint16_t md_boot_state::puckpkmna_70001c_r() +uint16_t puckpkmn_state::puckpkmna_70001c_r() { return 0x0e; } -uint16_t md_boot_state::puckpkmna_4b2476_r() +uint16_t puckpkmn_state::puckpkmna_4b2476_r() { if (!strcmp(machine().system().name, "puckpkmnb")) return 0x3100; return 0x3400; } -void md_boot_state::puckpkmna_map(address_map &map) + +// jzth protection +void puckpkmn_state::bl_710000_w(offs_t offset, uint16_t data, uint16_t mem_mask) { - puckpkmn_map(map); - map(0x4b2476, 0x4b2477).r(FUNC(md_boot_state::puckpkmna_4b2476_r)); - map(0x70001c, 0x70001d).r(FUNC(md_boot_state::puckpkmna_70001c_r)); + int pc = m_maincpu->pc(); + + logerror("%06x writing to bl_710000_w %04x %04x\n", pc, data, mem_mask); + + // protection value is read from 0x710000 after a series of writes.. and stored at ff0007 + // startup + /* + 059ce0 writing to bl_710000_w ff08 ffff + 059d04 writing to bl_710000_w 000a ffff + 059d04 writing to bl_710000_w 000b ffff + 059d04 writing to bl_710000_w 000c ffff + 059d04 writing to bl_710000_w 000f ffff + 059d1c writing to bl_710000_w ff09 ffff + 059d2a reading from bl_710000_r (wants 0xe) + 059ce0 writing to bl_710000_w ff08 ffff + 059d04 writing to bl_710000_w 000a ffff + 059d04 writing to bl_710000_w 000b ffff + 059d04 writing to bl_710000_w 000c ffff + 059d04 writing to bl_710000_w 000f ffff + 059d1c writing to bl_710000_w ff09 ffff + 059d2a reading from bl_710000_r (wants 0xe) + */ + // before lv stage 3 + /* + 059ce0 writing to bl_710000_w 0008 ffff + 059d04 writing to bl_710000_w 000b ffff + 059d04 writing to bl_710000_w 000f ffff + 059d1c writing to bl_710000_w ff09 ffff + 059d2a reading from bl_710000_r (wants 0x4) + */ + // start level 3 + /* + 059ce0 writing to bl_710000_w ff08 ffff + 059d04 writing to bl_710000_w 000b ffff + 059d04 writing to bl_710000_w 000c ffff + 059d04 writing to bl_710000_w 000e ffff + 059d1c writing to bl_710000_w ff09 ffff + 059d2a reading from bl_710000_r (wants 0x5) + + // after end sequence + 059ce0 writing to bl_710000_w 0008 ffff + 059d04 writing to bl_710000_w 000a ffff + 059d04 writing to bl_710000_w 000b ffff + 059d04 writing to bl_710000_w 000c ffff + 059d04 writing to bl_710000_w 000f ffff + 059d1c writing to bl_710000_w ff09 ffff + 059d2a reading from bl_710000_r (wants 0xe) + + */ + m_protcount++; } -void md_boot_state::puckpkmn(machine_config &config) +uint16_t puckpkmn_state::bl_710000_r() +{ + uint16_t ret; + int pc = m_maincpu->pc(); + logerror("%06x reading from bl_710000_r\n", pc); + + if (m_protcount==6) { ret = 0xe; } + else if (m_protcount==5) { ret = 0x5; } + else if (m_protcount==4) { ret = 0x4; } + else ret = 0xf; + + m_protcount = 0; + return ret; +} + + +void puckpkmn_state::puckpkmna_map(address_map &map) +{ + puckpkmn_map(map); + map(0x4b2476, 0x4b2477).r(FUNC(puckpkmn_state::puckpkmna_4b2476_r)); + map(0x70001c, 0x70001d).r(FUNC(puckpkmn_state::puckpkmna_70001c_r)); +} + +void puckpkmn_state::puckpkmn(machine_config &config) { md_ntsc(config); - m_maincpu->set_addrmap(AS_PROGRAM, &md_boot_state::puckpkmn_map); + m_maincpu->set_addrmap(AS_PROGRAM, &puckpkmn_state::puckpkmn_map); config.device_remove("genesis_snd_z80"); @@ -291,18 +392,18 @@ void md_boot_state::puckpkmn(machine_config &config) oki.add_route(ALL_OUTPUTS, "rspeaker", 0.25); } -void md_boot_state::puckpkmna(machine_config &config) +void puckpkmn_state::puckpkmna(machine_config &config) { puckpkmn(config); - m_maincpu->set_addrmap(AS_PROGRAM, &md_boot_state::puckpkmna_map); + m_maincpu->set_addrmap(AS_PROGRAM, &puckpkmn_state::puckpkmna_map); } -void md_boot_state::jzth(machine_config &config) +void puckpkmn_state::jzth(machine_config &config) { puckpkmn(config); - m_maincpu->set_addrmap(AS_PROGRAM, &md_boot_state::jzth_map); + m_maincpu->set_addrmap(AS_PROGRAM, &puckpkmn_state::jzth_map); } /* Genie's Hardware (contains no real sega parts) */ @@ -376,7 +477,7 @@ ROM sockets U63 & U64 empty ****************************************************************************/ -void md_boot_state::init_puckpkmn() +void puckpkmn_state::init_puckpkmn() { uint8_t *rom = memregion("maincpu")->base(); const size_t len = memregion("maincpu")->bytes(); @@ -484,8 +585,11 @@ ROM_START( jzth ) ROM_CONTINUE(0x40000,0x40000) ROM_END +} // anonymous namespace + + /* Genie Hardware (uses Genesis VDP) also has 'Sun Mixing Co' put into tile ram */ // is 'Genie 2000' part of the title, and the parent set a bootleg? -GAME( 2000, puckpkmn, 0, puckpkmn, puckpkmn, md_boot_state, init_puckpkmn, ROT0, "Genie", "Puckman Pockimon (set 1)", 0 ) -GAME( 2000, puckpkmna, puckpkmn, puckpkmna, puckpkmn, md_boot_state, init_puckpkmn, ROT0, "IBS", "Puckman Pockimon (set 2)", 0 ) -GAME( 2000, puckpkmnb, puckpkmn, puckpkmna, puckpkmn, md_boot_state, init_puckpkmn, ROT0, "Sun Mixing", "Puckman Pockimon (set 3)", 0 ) -GAME( 2000, jzth, 0, jzth, jzth, md_boot_state, init_puckpkmn, ROT0, "", "Juezhan Tianhuang", MACHINE_IMPERFECT_SOUND ) +GAME( 2000, puckpkmn, 0, puckpkmn, puckpkmn, puckpkmn_state, init_puckpkmn, ROT0, "Genie", "Puckman Pockimon (set 1)", 0 ) +GAME( 2000, puckpkmna, puckpkmn, puckpkmna, puckpkmn, puckpkmn_state, init_puckpkmn, ROT0, "IBS", "Puckman Pockimon (set 2)", 0 ) +GAME( 2000, puckpkmnb, puckpkmn, puckpkmna, puckpkmn, puckpkmn_state, init_puckpkmn, ROT0, "Sun Mixing", "Puckman Pockimon (set 3)", 0 ) +GAME( 2000, jzth, 0, jzth, jzth, puckpkmn_state, init_puckpkmn, ROT0, "", "Juezhan Tianhuang", MACHINE_IMPERFECT_SOUND )