From a63e82c5d7a0471f5e31c823641966c23a458339 Mon Sep 17 00:00:00 2001 From: Ivan Vangelista Date: Sat, 4 Dec 2021 12:18:22 +0100 Subject: New machines marked as NOT_WORKING ---------------------------------- Sonic The Hedgehog 3 (bootleg of Megadrive version) [Victor Fernandez (City Game)] --- src/mame/drivers/megadriv_acbl.cpp | 30 ++++++++++++++++++++++++++++++ src/mame/includes/megadriv_acbl.h | 2 ++ src/mame/mame.lst | 1 + 3 files changed, 33 insertions(+) diff --git a/src/mame/drivers/megadriv_acbl.cpp b/src/mame/drivers/megadriv_acbl.cpp index 3183a590535..dd43b3eb00e 100644 --- a/src/mame/drivers/megadriv_acbl.cpp +++ b/src/mame/drivers/megadriv_acbl.cpp @@ -12,6 +12,7 @@ * Jurassic Park * Mortal Kombat 3 * Sonic The Hedgehog 2 + * Sonic The Hedgehog 3 * Super Street Fighter II - The New Challengers * Sunset Riders * Top Shooter @@ -366,6 +367,15 @@ uint16_t md_boot_state::barek2mb_r() return 0x0000; } +uint16_t md_boot_state::sonic3mb_r() +{ + if (m_maincpu->pc() == 0x1688) return 0x0300; // TODO: should work but doesn't? debug: just put 0x0300 at 0xfffffc during the first startup check to succesfully boot. Coins are stored in the same location + + // logerror("sonic3mb_r : %06x\n", m_maincpu->pc()); + + return 0x0000; +} + uint16_t md_boot_state::dsw_r(offs_t offset) { static const char *const dswname[3] = { "DSWA", "DSWB", "DSWC" }; @@ -1321,6 +1331,14 @@ void md_boot_state::init_sonic2mb() init_megadrij(); } +void md_boot_state::init_sonic3mb() +{ + // m_maincpu->space(AS_PROGRAM).install_write_handler(0x200000, 0x200001, write16smo_delegate(*this, FUNC(md_boot_state::sonic3mb_w))); // seems to write to PIC from here + m_maincpu->space(AS_PROGRAM).install_read_handler(0x300000, 0x300001, read16smo_delegate(*this, FUNC(md_boot_state::sonic3mb_r))); // reads from PIC from here + + init_megadrij(); +} + void md_boot_state::init_twinktmb() { // boot vectors don't seem to be valid, so they are patched... @@ -1428,6 +1446,17 @@ ROM_START( sonic2mb ) ROM_LOAD16_BYTE( "m2", 0x000000, 0x080000, CRC(84b3f758) SHA1(19846b9d951db6f78f3e155d33f1b6349fb87f1a) ) ROM_END +ROM_START( sonic3mb ) + ROM_REGION( 0x400000, "maincpu", 0 ) // 68000 Code + ROM_LOAD16_BYTE( "sonic3-4.bin", 0x000000, 0x080000, CRC(b7318bb8) SHA1(1707b563794c3ab4a1f04cb449efdd6f817317fb) ) + ROM_LOAD16_BYTE( "sonic3-3.bin", 0x000001, 0x080000, CRC(1898479f) SHA1(5f1c581157959e11979882d2180ae4b98c6a89d5) ) + ROM_LOAD16_BYTE( "sonic3-2.bin", 0x100000, 0x080000, CRC(02232f45) SHA1(8cdcb156603108ac9d3ef888f75adb5327abce1a) ) + ROM_LOAD16_BYTE( "sonic3-1.bin", 0x100001, 0x080000, CRC(cee2f679) SHA1(4cc7a8a228f7fc4f7a38c69a65585765751a49e5) ) + + ROM_REGION( 0x1000, "pic", ROMREGION_ERASE00 ) + ROM_LOAD( "pic16c57xtp", 0x0000, 0x1000, NO_DUMP ) +ROM_END + ROM_START( barek2mb ) ROM_REGION( 0x200000, "maincpu", 0 ) ROM_LOAD16_BYTE( "m1.bin", 0x000001, 0x080000, CRC(1c1fa718) SHA1(393488f7747478728eb4f20c10b0cfce3b188719) ) @@ -1512,6 +1541,7 @@ GAME( 1993, srmdb, 0, megadrvb, srmdb, md_boot_state, init_srmdb, R 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, Megadrive clone hardware)", 0 ) GAME( 1993, sonic2mb, 0, md_bootleg, sonic2mb, md_boot_state, init_sonic2mb, ROT0, "bootleg / Sega", "Sonic The Hedgehog 2 (bootleg of Megadrive version)", 0 ) // Flying wires going through the empty PIC space aren't completely understood +GAME( 1993, sonic3mb, 0, md_bootleg, twinktmb, md_boot_state, init_sonic3mb, ROT0, "bootleg / Sega", "Sonic The Hedgehog 3 (bootleg of Megadrive 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 Megadrive version)", MACHINE_UNEMULATED_PROTECTION | MACHINE_NOT_WORKING ) // Needs PIC hook up GAME( 1994, barek3mb, 0, megadrvb, barek3, md_boot_state, init_barek3, ROT0, "bootleg / Sega", "Bare Knuckle III (bootleg of Megadrive version)", 0 ) GAME( 1994, bk3ssrmb, 0, megadrvb_6b, bk3ssrmb, md_boot_6button_state, init_bk3ssrmb, ROT0, "bootleg / Sega", "Bare Knuckle III / Sunset Riders (bootleg of Megadrive versions)", MACHINE_NOT_WORKING ) // Currently boots as Bare Knuckle III, mechanism to switch game not found yet diff --git a/src/mame/includes/megadriv_acbl.h b/src/mame/includes/megadriv_acbl.h index 579a028450b..51a534a468e 100644 --- a/src/mame/includes/megadriv_acbl.h +++ b/src/mame/includes/megadriv_acbl.h @@ -29,6 +29,7 @@ public: void init_barekch(); void init_bk3ssrmb(); void init_sonic2mb(); + void init_sonic3mb(); void init_twinktmb(); void init_jparkmb(); void init_sbubsm(); @@ -40,6 +41,7 @@ private: uint16_t aladmdb_r(); uint16_t barek2mb_r(); uint16_t jparkmb_r(); + uint16_t sonic3mb_r(); uint16_t twinktmb_r(); uint16_t dsw_r(offs_t offset); uint16_t topshoot_200051_r(); diff --git a/src/mame/mame.lst b/src/mame/mame.lst index a91816e720a..8700dd3273b 100644 --- a/src/mame/mame.lst +++ b/src/mame/mame.lst @@ -22805,6 +22805,7 @@ jparkmb // MegaDrive-based hack mk3mdb // MegaDrive-based hack sbubsm // (c) 1996 Sun Mixing sonic2mb // MegaDrive-based hack +sonic3mb // MegaDrive-based hack srmdb // MegaDrive-based hack ssf2mdb // MegaDrive-based hack topshoot // (c) 1995 Sun Mixing -- cgit v1.2.3