From 2bce3077f550d80422238c43a060ab018a9d2a7d Mon Sep 17 00:00:00 2001 From: Ivan Vangelista Date: Thu, 31 Jan 2019 18:11:59 +0100 Subject: new working clone -------------------------------- Ghost Chaser Densei (SNES bootleg, set 2) [iq_132, Jorge Silva, The Dumping Union] --- src/mame/drivers/snesb.cpp | 105 +++++++++++++++++++++++++++++++++++++++------ src/mame/mame.lst | 1 + 2 files changed, 94 insertions(+), 12 deletions(-) diff --git a/src/mame/drivers/snesb.cpp b/src/mame/drivers/snesb.cpp index ef32ac969d6..52adb10016e 100644 --- a/src/mame/drivers/snesb.cpp +++ b/src/mame/drivers/snesb.cpp @@ -15,6 +15,7 @@ - Gundam Wing: Endless Duel - Legend - Rushing Beat + - Venom & Spider-Man - Separation Anxiety Not dumped: - Final Fight 3 @@ -22,14 +23,15 @@ TODO: - all games : (re)add PORT_DIPLOCATION - - kiinstb : fix gfx glitches, missing texts + - kinstb : fix gfx glitches, missing texts - ffight2b : remove hack for starting credits (RAM - mainly 0x7eadce where credits are stored - is filled with 0x55, so you are awarded 55 credits on a hard reset) - sblast2b : dipswitches - sblast2b : pressing start during gameplay changes the character used. Intentional? - - denseib : fix gfx glitches, missing texts + - denseib,2: fix gfx glitches, missing texts - legendsb : dipswitches - rushbets : everything + - venom : gfx glitches on second level *************************************************************************** @@ -167,6 +169,7 @@ public: void init_iron(); void init_denseib(); + void init_denseib2(); void init_kinstb(); void init_sblast2b(); void init_ffight2b(); @@ -934,6 +937,68 @@ void snesb_state::init_denseib() init_snes_hirom(); } +void snesb_state::init_denseib2() +{ + uint8_t *src = memregion("user7")->base(); + uint8_t *dst = memregion("user3")->base(); + + static const uint8_t address_tab_high[0x40] = { + 0x0b, 0x1d, 0x05, 0x15, 0x09, 0x19, 0x04, 0x13, 0x02, 0x1f, 0x07, 0x17, 0x0d, 0x11, 0x0a, 0x1a, + 0x14, 0x0e, 0x18, 0x06, 0x1e, 0x01, 0x10, 0x0c, 0x1b, 0x0f, 0x16, 0x00, 0x12, 0x08, 0x1c, 0x03, + 0x2b, 0x3d, 0x25, 0x35, 0x29, 0x39, 0x24, 0x33, 0x22, 0x3f, 0x27, 0x37, 0x2d, 0x31, 0x2a, 0x3a, + 0x34, 0x2e, 0x38, 0x26, 0x3e, 0x21, 0x30, 0x2c, 0x3b, 0x2f, 0x36, 0x20, 0x32, 0x28, 0x3c, 0x23 + }; + + static const uint8_t address_tab_low[0x40] = { + 0x14, 0x1d, 0x11, 0x3c, 0x0a, 0x29, 0x2d, 0x2e, 0x30, 0x32, 0x16, 0x36, 0x05, 0x25, 0x26, 0x37, + 0x20, 0x21, 0x27, 0x28, 0x33, 0x34, 0x23, 0x12, 0x1e, 0x1f, 0x3b, 0x24, 0x2c, 0x35, 0x38, 0x39, + 0x3d, 0x0c, 0x2a, 0x0d, 0x22, 0x18, 0x19, 0x1a, 0x03, 0x08, 0x04, 0x3a, 0x0b, 0x0f, 0x15, 0x17, + 0x1b, 0x13, 0x00, 0x1c, 0x2b, 0x01, 0x06, 0x2f, 0x07, 0x09, 0x02, 0x31, 0x10, 0x0e, 0x3f, 0x3e + }; + + static const uint8_t data_high[16] = { + 0x03, 0x04, 0x85, 0x01, 0x81, 0x87, 0x07, 0x05, 0x86, 0x00, 0x02, 0x82, 0x84, 0x83, 0x06, 0x80 + }; + + static const uint8_t data_low[16] = { + 0x30, 0x40, 0x58, 0x10, 0x18, 0x78, 0x70, 0x50, 0x68, 0x00, 0x20, 0x28, 0x48, 0x38, 0x60, 0x08 + }; + + for (int i = 0; i < 0x200000; i++) + { + int j = (address_tab_high[i >> 15] << 15) + (i & 0x7fc0) + address_tab_low[i & 0x3f]; + + dst[i] = data_high[src[j]>>4] | data_low[src[j]&0xf]; + + if (i >= 0x00000 && i < 0x10000) { + dst[i] = bitswap<8>(dst[i],2,1,3,0,7,4,5,6) ^ 0xff; + } + + if (i >= 0x10000 && i < 0x20000) { + dst[i] = bitswap<8>(dst[i],1,7,4,5,6,0,3,2); + } + + if (i >= 0x20000 && i < 0x30000) { + dst[i] = bitswap<8>(dst[i],0,2,6,7,5,3,4,1) ^ 0xff; + } + + if (i >= 0x30000 && i < 0x40000) { + dst[i] = bitswap<8>(dst[i],6,5,0,3,1,7,2,4) ^ 0xff; + } + } + + /* boot vector */ + dst[0xfffc] = 0x40; + dst[0xfffd] = 0xf7; + + /* extra inputs */ + m_maincpu->space(AS_PROGRAM).install_read_handler(0x770071, 0x770071, read8_delegate(FUNC(snesb_state::snesb_dsw1_r),this)); + m_maincpu->space(AS_PROGRAM).install_read_handler(0x770073, 0x770073, read8_delegate(FUNC(snesb_state::snesb_dsw2_r),this)); + m_maincpu->space(AS_PROGRAM).install_read_handler(0x770079, 0x770079, read8_delegate(FUNC(snesb_state::snesb_coin_r),this)); + + init_snes_hirom(); +} + void snesb_state::init_legendsb() { u8 *rom = memregion("user3")->base(); @@ -1352,6 +1417,21 @@ ROM_START( denseib ) ROM_REGION(0x800, "user6", ROMREGION_ERASEFF) ROM_END +ROM_START( denseib2 ) + ROM_REGION( 0x200000, "user3", ROMREGION_ERASEFF ) + + ROM_REGION(0x100, "sound_ipl", 0) + ROM_LOAD("spc700.rom", 0, 0x40, CRC(44bb3a40) SHA1(97e352553e94242ae823547cd853eecda55c20f0) ) + + ROM_REGION(0x800, "user6", ROMREGION_ERASEFF) + + ROM_REGION( 0x200000, "user7", 0 ) + ROM_LOAD( "u31.bin", 0x000000, 0x080000, CRC(834723a8) SHA1(3f56bba5017f77147e7d52618678f1e2eff4991b) ) + ROM_LOAD( "u32.bin", 0x080000, 0x080000, CRC(9748e86b) SHA1(68a62e0961d735602ae6ebd1aca5990c588ccbb1) ) + ROM_LOAD( "u33.bin", 0x100000, 0x080000, CRC(abcc6b61) SHA1(ef90f23b674f6dd36b3d60c9c395a1d4bc853798) ) + ROM_LOAD( "u34.bin", 0x180000, 0x080000, CRC(0a16ac96) SHA1(ddc11009d4b35a151aa7e357346f3ac109e112ef) ) +ROM_END + ROM_START( sblast2b ) ROM_REGION( 0x180000, "user3", ROMREGION_ERASEFF ) @@ -1455,13 +1535,14 @@ ROM_START( venom ) ROM_LOAD( "u34.bin", 0x280000, 0x0080000, CRC(7a09c9e0) SHA1(794965d5501ec0e21f1f3a8cb8fd66f913d42760) ) ROM_END -GAME( 199?, kinstb, 0, kinstb, kinstb, snesb_state, init_kinstb, ROT0, "bootleg", "Killer Instinct (SNES bootleg)", MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS ) -GAME( 199?, mk3snes, 0, mk3snes, kinstb, snesb_state, init_mk3snes, ROT0, "bootleg", "Mortal Kombat 3 (SNES bootleg)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS ) -GAME( 1996, ffight2b, 0, ffight2b, ffight2b, snesb_state, init_ffight2b, ROT0, "bootleg", "Final Fight 2 (SNES bootleg)", MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS ) -GAME( 1996, iron, 0, kinstb, iron, snesb_state, init_iron, ROT0, "bootleg", "Iron (SNES bootleg)", MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS ) -GAME( 1996, denseib, 0, kinstb, denseib, snesb_state, init_denseib, ROT0, "bootleg", "Ghost Chaser Densei (SNES bootleg)", MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS ) -GAME( 1997, sblast2b, 0, kinstb, sblast2b, snesb_state, init_sblast2b, ROT0, "bootleg", "Sonic Blast Man 2 Special Turbo (SNES bootleg)", MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS) -GAME( 1996, endless, 0, kinstb, endless, snesb_state, init_endless, ROT0, "bootleg", "Gundam Wing: Endless Duel (SNES bootleg)", MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS ) -GAME( 1996, legendsb, 0, kinstb, kinstb, snesb_state, init_legendsb, ROT0, "bootleg", "Legend (SNES bootleg)", MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS ) -GAME( 1997, rushbets, 0, kinstb, kinstb, snesb_state, init_rushbets, ROT0, "bootleg", "Rushing Beat Shura (SNES bootleg)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS ) -GAME( 1997, venom, 0, kinstb, venom, snesb_state, init_venom, ROT0, "bootleg", "Venom & Spider-Man - Separation Anxiety (SNES bootleg)", MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS ) +GAME( 199?, kinstb, 0, kinstb, kinstb, snesb_state, init_kinstb, ROT0, "bootleg", "Killer Instinct (SNES bootleg)", MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS ) +GAME( 199?, mk3snes, 0, mk3snes, kinstb, snesb_state, init_mk3snes, ROT0, "bootleg", "Mortal Kombat 3 (SNES bootleg)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS ) +GAME( 1996, ffight2b, 0, ffight2b, ffight2b, snesb_state, init_ffight2b, ROT0, "bootleg", "Final Fight 2 (SNES bootleg)", MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS ) +GAME( 1996, iron, 0, kinstb, iron, snesb_state, init_iron, ROT0, "bootleg", "Iron (SNES bootleg)", MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS ) +GAME( 1996, denseib, 0, kinstb, denseib, snesb_state, init_denseib, ROT0, "bootleg", "Ghost Chaser Densei (SNES bootleg, set 1)", MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS ) +GAME( 1996, denseib2, denseib, kinstb, denseib, snesb_state, init_denseib2, ROT0, "bootleg", "Ghost Chaser Densei (SNES bootleg, set 2)", MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS ) +GAME( 1997, sblast2b, 0, kinstb, sblast2b, snesb_state, init_sblast2b, ROT0, "bootleg", "Sonic Blast Man 2 Special Turbo (SNES bootleg)", MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS) +GAME( 1996, endless, 0, kinstb, endless, snesb_state, init_endless, ROT0, "bootleg", "Gundam Wing: Endless Duel (SNES bootleg)", MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS ) +GAME( 1996, legendsb, 0, kinstb, kinstb, snesb_state, init_legendsb, ROT0, "bootleg", "Legend (SNES bootleg)", MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS ) +GAME( 1997, rushbets, 0, kinstb, kinstb, snesb_state, init_rushbets, ROT0, "bootleg", "Rushing Beat Shura (SNES bootleg)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS ) +GAME( 1997, venom, 0, kinstb, venom, snesb_state, init_venom, ROT0, "bootleg", "Venom & Spider-Man - Separation Anxiety (SNES bootleg)", MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS ) diff --git a/src/mame/mame.lst b/src/mame/mame.lst index b25e852e7a0..eadb0e053ae 100644 --- a/src/mame/mame.lst +++ b/src/mame/mame.lst @@ -35513,6 +35513,7 @@ snespal // Nintendo Super Nintendo PAL @source:snesb.cpp denseib // bootleg +denseib2 // bootleg endless // bootleg ffight2b // bootleg iron // bootleg -- cgit v1.2.3