Emulate protection in sf2rb, sf2rb2's (cps1.c) and ichirjbl (segac2.c) rather than simply patch it out. [IQ_132]

New games promoted from NOT_WORKING status
------------------------------------------
Fighting Fantasy (bootleg with 68705)  [IQ_132]


New clones added
----------------
The King of Fighters '97 Oroshi Plus 2003 (bootleg)  [The Dumping Union, Smitdogg, IQ_132]
This commit is contained in:
Scott Stone 2012-10-25 16:48:32 +00:00
parent 3ef10c9080
commit 69a501e040
10 changed files with 182 additions and 23 deletions

View File

@ -10683,7 +10683,6 @@ ROM_END
DRIVER_INIT_MEMBER(cps_state,forgottn)
{
/* Forgotten Worlds has a NEC uPD4701AC on the B-board handling dial inputs from the CN-MOWS connector. */
/* The memory mapping is handled by PAL LWIO */
machine().device("maincpu")->memory().space(AS_PROGRAM).install_write_handler(0x800040, 0x800041, write16_delegate(FUNC(cps_state::forgottn_dial_0_reset_w),this));
@ -10699,6 +10698,48 @@ DRIVER_INIT_MEMBER(cps_state,forgottn)
DRIVER_INIT_CALL(cps1);
}
READ16_MEMBER(cps_state::sf2rb_prot_r)
{
switch (offset)
{
case 0x01201/2:
return 0x0002;
case 0x81201/2:
return 0x0040;
}
return 0;
}
DRIVER_INIT_MEMBER(cps_state,sf2rb)
{
machine().device("maincpu")->memory().space(AS_PROGRAM).install_read_handler(0x200000, 0x2fffff, read16_delegate(FUNC(cps_state::sf2rb_prot_r),this));
DRIVER_INIT_CALL(cps1);
}
READ16_MEMBER(cps_state::sf2rb2_prot_r)
{
switch (offset)
{
case 0x01201/2:
return 0x0000;
case 0x81201/2:
return 0x0040;
}
return 0;
}
DRIVER_INIT_MEMBER(cps_state,sf2rb2)
{
machine().device("maincpu")->memory().space(AS_PROGRAM).install_read_handler(0x200000, 0x2fffff, read16_delegate(FUNC(cps_state::sf2rb2_prot_r),this));
DRIVER_INIT_CALL(cps1);
}
DRIVER_INIT_MEMBER(cps_state,sf2ee)
{
/* This specific revision of SF2 has the CPS-B custom mapped at a different address. */
@ -10921,8 +10962,8 @@ GAME( 1992, sf2ceuc, sf2ce, cps1_12MHz, sf2, cps_state, cps1,
GAME( 1992, sf2ceja, sf2ce, cps1_12MHz, sf2, cps_state, cps1, ROT0, "Capcom", "Street Fighter II': Champion Edition (Japan 920322)", GAME_SUPPORTS_SAVE )
GAME( 1992, sf2cejb, sf2ce, cps1_12MHz, sf2, cps_state, cps1, ROT0, "Capcom", "Street Fighter II': Champion Edition (Japan 920513)", GAME_SUPPORTS_SAVE )
GAME( 1992, sf2cejc, sf2ce, cps1_12MHz, sf2, cps_state, cps1, ROT0, "Capcom", "Street Fighter II': Champion Edition (Japan 920803)", GAME_SUPPORTS_SAVE )
GAME( 1992, sf2rb, sf2ce, cps1_12MHz, sf2, cps_state, cps1, ROT0, "bootleg", "Street Fighter II': Champion Edition (Rainbow set 1, bootleg)", GAME_SUPPORTS_SAVE ) // 920322 - based on World version
GAME( 1992, sf2rb2, sf2ce, cps1_12MHz, sf2, cps_state, cps1, ROT0, "bootleg", "Street Fighter II': Champion Edition (Rainbow set 2, bootleg)", GAME_SUPPORTS_SAVE ) // 920322 - based on World version
GAME( 1992, sf2rb, sf2ce, cps1_12MHz, sf2, cps_state, sf2rb, ROT0, "bootleg", "Street Fighter II': Champion Edition (Rainbow set 1, bootleg)", GAME_SUPPORTS_SAVE ) // 920322 - based on World version
GAME( 1992, sf2rb2, sf2ce, cps1_12MHz, sf2, cps_state, sf2rb2, ROT0, "bootleg", "Street Fighter II': Champion Edition (Rainbow set 2, bootleg)", GAME_SUPPORTS_SAVE ) // 920322 - based on World version
GAME( 1992, sf2rb3, sf2ce, cps1_12MHz, sf2, cps_state, cps1, ROT0, "bootleg", "Street Fighter II': Champion Edition (Rainbow set 3, bootleg)", GAME_SUPPORTS_SAVE ) // 920322 - based on World version
GAME( 1992, sf2red, sf2ce, cps1_12MHz, sf2, cps_state, cps1, ROT0, "bootleg", "Street Fighter II': Champion Edition (Red Wave, bootleg)", GAME_SUPPORTS_SAVE ) // 920313 - based on World version
GAME( 1992, sf2v004, sf2ce, cps1_12MHz, sf2, cps_state, cps1, ROT0, "bootleg", "Street Fighter II': Champion Edition (V004, bootleg)", GAME_SUPPORTS_SAVE ) // 102092 !!! - based on (heavily modified) World version

View File

@ -1004,7 +1004,18 @@ static INPUT_PORTS_START( ffantasy )
PORT_DIPNAME( 0x4000, 0x4000, "Enemy Power Decrease on Continue" ) PORT_DIPLOCATION("SW2:7")
PORT_DIPSETTING( 0x4000, "2 Dots" ) // 2 Dots less
PORT_DIPSETTING( 0x0000, DEF_STR( None ) ) // 0 Dot less
INPUT_PORTS_END
static INPUT_PORTS_START( ffantasybl )
PORT_INCLUDE( hippodrm )
PORT_MODIFY("DSW")
PORT_DIPNAME( 0x4000, 0x4000, "Enemy Power Decrease on Continue" ) PORT_DIPLOCATION("SW2:7")
PORT_DIPSETTING( 0x4000, "2 Dots" ) // 2 Dots less
PORT_DIPSETTING( 0x0000, DEF_STR( None ) ) // 0 Dot less
PORT_MODIFY("SYSTEM")
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN ) // Game does not want vblank here
INPUT_PORTS_END
static INPUT_PORTS_START( slyspy )
@ -1638,6 +1649,31 @@ static MACHINE_CONFIG_DERIVED( hippodrm, dec0_base_sound )
MCFG_SCREEN_UPDATE_DRIVER(dec0_state, screen_update_hippodrm)
MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( ffantasybl, dec0_base_sound )
/* basic machine hardware */
MCFG_CPU_ADD("maincpu", M68000, XTAL_20MHz / 2)
MCFG_CPU_PROGRAM_MAP(dec0_map)
MCFG_CPU_VBLANK_INT_DRIVER("screen", dec0_state, irq6_line_assert)/* VBL */
MCFG_CPU_ADD("audiocpu", M6502, XTAL_12MHz / 8)
MCFG_CPU_PROGRAM_MAP(dec0_s_map)
// MCFG_CPU_ADD("sub", H6280, XTAL_21_4772MHz / 16)
// MCFG_CPU_PROGRAM_MAP(hippodrm_sub_map)
// MCFG_QUANTUM_TIME(attotime::from_hz(300)) /* Interleave between H6280 & 68000 */
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
// MCFG_SCREEN_REFRESH_RATE(57.41)
// MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(529) /* 57.41 Hz, 529us Vblank */)
MCFG_SCREEN_RAW_PARAMS(DEC0_PIXEL_CLOCK,DEC0_HTOTAL,DEC0_HBEND,DEC0_HBSTART,DEC0_VTOTAL,DEC0_VBEND,DEC0_VBSTART)
// MCFG_SCREEN_SIZE(32*8, 32*8)
// MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 1*8, 31*8-1)
MCFG_SCREEN_UPDATE_DRIVER(dec0_state, screen_update_hippodrm)
MACHINE_CONFIG_END
MACHINE_RESET_MEMBER(dec0_state,slyspy)
{
// set initial memory map
@ -3049,6 +3085,32 @@ DRIVER_INIT_MEMBER(dec0_state,midresb)
machine().device("maincpu")->memory().space(AS_PROGRAM).install_write_handler(0x00180014, 0x00180015, write16_delegate(FUNC(dec0_state::midres_sound_w),this));
}
READ16_MEMBER(dec0_state::ffantasybl_242024_r)
{
/*
000152: 41F9 0024 2020 lea $242020.l, A0
000158: 4A68 0004 tst.w ($4,A0)
00015C: 6700 00A0 beq $1fe
This allows us to at insert a coin...
*/
return 0xffff;
}
READ16_MEMBER(dec0_state::ffantasybl_vblank_r)
{
return ioport("VBLANK")->read();
}
DRIVER_INIT_MEMBER(dec0_state,ffantasybl)
{
machine().device("maincpu")->memory().space(AS_PROGRAM).install_ram(0x24c880, 0x24cbff); // what is this? layer 3-related??
machine().device("maincpu")->memory().space(AS_PROGRAM).install_read_handler(0x00242024, 0x00242025, read16_delegate(FUNC(dec0_state::ffantasybl_242024_r),this));
machine().device("maincpu")->memory().space(AS_PROGRAM).install_read_handler(0x00ff87ee, 0x00ff87ef, read16_delegate(FUNC(dec0_state::ffantasybl_vblank_r),this));
}
/******************************************************************************/
// YEAR, NAME, PARENT, MACHINE, INPUT, INIT, MONITOR,COMPANY,FULLNAME,FLAGS
@ -3082,7 +3144,7 @@ GAME( 1988, drgninjab, baddudes, baddudes, drgninja, dec0_state, baddudes, ROT0
// this is a common bootleg board
GAME( 1989, midresb, midres, midresb, midresb, dec0_state, midresb, ROT0, "bootleg", "Midnight Resistance (bootleg with 68705)", 0 ) // need to hook up 68705?
GAME( 1989, ffantasybl, hippodrm, midres, midres, driver_device, 0, ROT0, "bootleg", "Fighting Fantasy (bootleg with 68705)", GAME_NOT_WORKING ) // 68705 not dumped, might be the same as midresb
GAME( 1989, ffantasybl, hippodrm, ffantasybl, ffantasybl, dec0_state, ffantasybl, ROT0, "bootleg", "Fighting Fantasy (bootleg with 68705)", GAME_IMPERFECT_GRAPHICS ) // 68705 not dumped, might be the same as midresb
/* A Bad Dudes bootleg with 68705 like the midres and ffantasy ones exists, but is not dumped */
// these are different to the above but quite similar to each other

View File

@ -7992,6 +7992,35 @@ ROM_START( kof97pls )
ROM_LOAD16_BYTE( "232-c6.c6", 0x2000001, 0x400000, CRC(4ff4d47b) SHA1(4d5689ede24a5fe4330bd85d4d3f4eb2795308bb) ) /* Plane 2,3 */ /* TC5332205 */
ROM_END
ROM_START( kof97oro )
ROM_REGION( 0x500000, "maincpu", 0 )
ROM_LOAD16_WORD_SWAP( "orochi-p1.bin", 0x0000000, 0x100000, CRC(6dcb2946) SHA1(3ccb3fdf3d32a75c7fcfefff5db1f3c75054731f) )
ROM_LOAD16_WORD_SWAP( "orochi-p21.bin", 0x0200000, 0x100000, CRC(6e1c4d8c) SHA1(f514638a599a8a582c5f4df72f6a957bab776b7e) )
ROM_CONTINUE( 0x100000, 0x100000 )
ROM_LOAD16_WORD_SWAP( "orochi-p29.bin", 0x0400000, 0x100000, CRC(4c7c0221) SHA1(fdd05927743cb12210b74768155bb3f59bff01b5) )
ROM_CONTINUE( 0x300000, 0x100000 )
NEO_SFIX_128K( "orochi-s1.bin", CRC(4ee2149a) SHA1(180a1a90021031eac1a643b769d9cdeda56518f5) )
NEO_BIOS_AUDIO_128K( "orochi-m1.bin", CRC(45348747) SHA1(ed77cbae2b208d1177a9f5f6e8cd57070e90b65b) )
ROM_REGION( 0xc00000, "ymsnd", 0 )
ROM_LOAD( "orochi-v1.bin", 0x000000, 0x0400000, CRC(22a2b5b5) SHA1(ebdbc977332e6d93e266755000b43857e0082965) )
ROM_LOAD( "orochi-v2.bin", 0x400000, 0x0400000, CRC(2304e744) SHA1(98d283e2bcc9291a53f52afd35ef76dfb0828432) )
ROM_LOAD( "orochi-v3.bin", 0x800000, 0x0400000, CRC(759eb954) SHA1(54e77c4e9e6b89458e59824e478ddc33a9c72655) )
NO_DELTAT_REGION
ROM_REGION( 0x2800000, "sprites", 0 )
// The C1 and C2 here are reconstructed but very likely to be correct.
ROM_LOAD16_BYTE( "orochi-c1.bin", 0x0000000, 0x1000000, BAD_DUMP CRC(f13e841c) SHA1(e24b3fb5f7e1c1f4752cad382c264f5f93e737a0) ) /* Plane 0,1 */
ROM_LOAD16_BYTE( "orochi-c2.bin", 0x0000001, 0x1000000, BAD_DUMP CRC(2db1f6d3) SHA1(13d957c04bd69f0db140e4633c39db4a9e44eab8) ) /* Plane 2,3 */
ROM_LOAD16_BYTE( "orochi-c51.bin", 0x2000000, 0x0200000, CRC(a90340cb) SHA1(97eaa89f0e860e2c591ca3a995fd910d8116347d) ) /* Plane 0,1 */
ROM_LOAD16_BYTE( "orochi-c61.bin", 0x2000001, 0x0200000, CRC(188e351a) SHA1(ab724250bc07ace0873fc825b798ace934260988) ) /* Plane 2,3 */
ROM_LOAD16_BYTE( "orochi-c52.bin", 0x2400000, 0x0200000, CRC(d4eec50a) SHA1(0930cce5346fbbd5c1524f9148d0577cbe634420) ) /* Plane 0,1 */
ROM_LOAD16_BYTE( "orochi-c62.bin", 0x2400001, 0x0200000, CRC(031b1ad5) SHA1(d47b3452953b553348be0a55473b863ce2872f6e) ) /* Plane 2,3 */
ROM_END
ROM_START( kog )
ROM_REGION( 0x600000, "maincpu", 0 )
ROM_LOAD16_WORD_SWAP( "5232-p1.bin", 0x000000, 0x200000, CRC(d2413ec6) SHA1(c0bf409d1e714cba5fdc6f79e4c2aec805316634) )
@ -9812,6 +9841,14 @@ DRIVER_INIT_MEMBER(neogeo_state,vliner)
DRIVER_INIT_CALL(neogeo);
}
DRIVER_INIT_MEMBER(neogeo_state,kof97oro)
{
kof97oro_px_decode(machine());
neogeo_bootleg_sx_decrypt(machine(), 1);
neogeo_bootleg_cx_decrypt(machine());
DRIVER_INIT_CALL(neogeo);
}
DRIVER_INIT_MEMBER(neogeo_state,kog)
{
/* overlay cartridge ROM */
@ -9921,6 +9958,7 @@ void neogeo_state::mvs_install_protection(device_image_interface& image)
if(strcmp(crypt_feature,"mslugx_prot") == 0) { DRIVER_INIT_CALL(mslugx); }
else if(strcmp(crypt_feature,"fatfury2_prot") == 0) { DRIVER_INIT_CALL(fatfury2); }
else if(strcmp(crypt_feature,"kog_prot") == 0) { DRIVER_INIT_CALL(kog); }
else if(strcmp(crypt_feature,"kof97oro_prot") == 0) { DRIVER_INIT_CALL(kof97oro); }
else if(strcmp(crypt_feature,"kof98_prot") == 0) { DRIVER_INIT_CALL(kof98); }
else if(strcmp(crypt_feature,"kof99_prot") == 0) { DRIVER_INIT_CALL(kof99); }
else if(strcmp(crypt_feature,"kof99k_prot") == 0) { DRIVER_INIT_CALL(kof99k); }
@ -10069,7 +10107,8 @@ GAME( 1997, kof97, neogeo, neogeo, neogeo, neogeo_state, neogeo, RO
GAME( 1997, kof97h, kof97, neogeo, neogeo, neogeo_state, neogeo, ROT0, "SNK", "The King of Fighters '97 (NGH-2320)", GAME_SUPPORTS_SAVE )
GAME( 1997, kof97k, kof97, neogeo, neogeo, neogeo_state, neogeo, ROT0, "SNK", "The King of Fighters '97 (Korean release)", GAME_SUPPORTS_SAVE )
GAME( 1997, kof97pls, kof97, neogeo, neogeo, neogeo_state, neogeo, ROT0, "bootleg", "The King of Fighters '97 Plus (bootleg)", GAME_SUPPORTS_SAVE )
GAME( 1997, kog, kof97, neogeo, kog, neogeo_state, kog, ROT0, "bootleg", "King of Gladiator (The King of Fighters '97 bootleg)", GAME_NOT_WORKING | GAME_SUPPORTS_SAVE ) // protected bootleg
GAME( 1997, kof97oro, kof97, neogeo, neogeo, neogeo_state, kof97oro, ROT0, "bootleg", "The King of Fighters '97 Oroshi Plus 2003 (bootleg)", GAME_SUPPORTS_SAVE )
GAME( 1997, kog, kof97, neogeo, kog, neogeo_state, kog, ROT0, "bootleg", "King of Gladiator (The King of Fighters '97 bootleg)", GAME_NOT_WORKING | GAME_SUPPORTS_SAVE ) // protected bootleg
GAME( 1997, lastblad, neogeo, neogeo, neogeo, neogeo_state, neogeo, ROT0, "SNK", "The Last Blade / Bakumatsu Roman - Gekka no Kenshi (NGM-2340)", GAME_SUPPORTS_SAVE )
GAME( 1997, lastbladh, lastblad, neogeo, neogeo, neogeo_state, neogeo, ROT0, "SNK", "The Last Blade / Bakumatsu Roman - Gekka no Kenshi (NGH-2340)", GAME_SUPPORTS_SAVE )
GAME( 1997, lastsold, lastblad, neogeo, neogeo, neogeo_state, neogeo, ROT0, "SNK", "The Last Soldier (Korean release of The Last Blade)", GAME_SUPPORTS_SAVE )

View File

@ -2186,13 +2186,16 @@ DRIVER_INIT_MEMBER(segac2_state,ichirj)
segac2_common_init(machine(), prot_func_ichirj);
}
static READ16_HANDLER( ichirjbl_prot_r )
{
return 0x00f5;
}
DRIVER_INIT_MEMBER(segac2_state,ichirjbl)
{
/* when did this actually work? - the protection is patched but the new check fails? */
UINT16 *rom = (UINT16 *)machine().root_device().memregion("maincpu")->base();
rom[0x390/2] = 0x6600;
segac2_common_init(machine(), NULL);
machine().device("maincpu")->memory().space(AS_PROGRAM).install_legacy_read_handler(0x840108, 0x840109, FUNC(ichirjbl_prot_r) );
}
DRIVER_INIT_MEMBER(segac2_state,puyopuy2)

View File

@ -159,6 +159,8 @@ public:
DECLARE_WRITE16_MEMBER(qsound_sharedram2_w);
DECLARE_WRITE8_MEMBER(qsound_banksw_w);
DECLARE_READ16_MEMBER(sf2mdt_r);
DECLARE_READ16_MEMBER(sf2rb_prot_r);
DECLARE_READ16_MEMBER(sf2rb2_prot_r);
DECLARE_READ16_MEMBER(cps1_dsw_r);
DECLARE_WRITE16_MEMBER(cps1_coinctrl_w);
DECLARE_READ16_MEMBER(qsound_sharedram1_r);
@ -173,6 +175,8 @@ public:
DECLARE_WRITE16_MEMBER(cps2_objram1_w);
DECLARE_WRITE16_MEMBER(cps2_objram2_w);
DECLARE_WRITE8_MEMBER(cps1_oki_pin7_w);
DECLARE_DRIVER_INIT(sf2rb);
DECLARE_DRIVER_INIT(sf2rb2);
DECLARE_DRIVER_INIT(sf2thndr);
DECLARE_DRIVER_INIT(dinohunt);
DECLARE_DRIVER_INIT(forgottn);

View File

@ -62,6 +62,8 @@ public:
DECLARE_WRITE16_MEMBER(dec0_paletteram_rg_w);
DECLARE_WRITE16_MEMBER(dec0_paletteram_b_w);
DECLARE_WRITE16_MEMBER(dec0_priority_w);
DECLARE_READ16_MEMBER(ffantasybl_242024_r);
DECLARE_READ16_MEMBER(ffantasybl_vblank_r);
DECLARE_DRIVER_INIT(robocop);
DECLARE_DRIVER_INIT(hippodrm);
DECLARE_DRIVER_INIT(hbarrel);
@ -69,6 +71,7 @@ public:
DECLARE_DRIVER_INIT(birdtry);
DECLARE_DRIVER_INIT(baddudes);
DECLARE_DRIVER_INIT(midresb);
DECLARE_DRIVER_INIT(ffantasybl);
DECLARE_VIDEO_START(dec0);
DECLARE_MACHINE_RESET(slyspy);
DECLARE_VIDEO_START(dec0_nodma);

View File

@ -201,6 +201,7 @@ public:
DECLARE_DRIVER_INIT(jockeygp);
DECLARE_DRIVER_INIT(vliner);
DECLARE_DRIVER_INIT(kog);
DECLARE_DRIVER_INIT(kof97oro);
DECLARE_DRIVER_INIT(lans2004);
DECLARE_DRIVER_INIT(sbp);
DECLARE_DRIVER_INIT(mvs);
@ -277,6 +278,7 @@ void install_pvc_protection(running_machine &machine);
/*----------- defined in machine/neoboot.c -----------*/
void kog_px_decrypt(running_machine &machine);
void kof97oro_px_decode( running_machine &machine );
void neogeo_bootleg_cx_decrypt(running_machine &machine);
void install_kof10th_protection(running_machine &machine);
void decrypt_kof10th(running_machine &machine);

View File

@ -130,6 +130,24 @@ void kog_px_decrypt( running_machine &machine )
}
/* The King of Fighters '97 Oroshi Plus 2003 (bootleg) */
void kof97oro_px_decode( running_machine &machine )
{
int i;
UINT16 *tmp = auto_alloc_array(machine, UINT16, 0x500000 );
UINT16 *src = (UINT16*)machine.root_device().memregion("maincpu")->base();
for (i = 0; i < 0x500000/2; i++) {
tmp[i] = src[i ^ 0x7ffef];
}
memcpy (src, tmp, 0x500000);
auto_free (machine, tmp);
}
/* The King of Fighters 10th Anniversary (The King of Fighters 2002 bootleg) */

View File

@ -7096,6 +7096,7 @@ kof97 // 0232 (c) 1997 SNK
kof97h // 0232 (c) 1997 SNK
kof97k // 0232 (c) 1997 SNK
kof97pls // bootleg of kof97
kof97oro // bootleg of kof97
kog // bootleg of kof97
magdrop3 // 0233 (c) 1997 Data East Corporation
lastblad // 0234 (c) 1997 SNK

View File

@ -1516,20 +1516,6 @@ MACHINE_RESET_MEMBER(cps_state,cps)
m_game_config = pCFG;
}
if (strcmp(gamename, "sf2rb") == 0)
{
/* Patch out protection check */
UINT16 *rom = (UINT16 *)machine().root_device().memregion("maincpu")->base();
rom[0xe5464 / 2] = 0x6012;
}
if (strcmp(gamename, "sf2rb2") == 0)
{
/* Patch out protection check */
UINT16 *rom = (UINT16 *)machine().root_device().memregion("maincpu")->base();
rom[0xe5332 / 2] = 0x6014;
}
#if 0
if (strcmp(gamename, "sf2accp2") == 0)
{