Hi my name is Juan Carlos a lot games have a protection of SRAM :
Look this driver :
/* hacks to make the games which do protection checks run in arcade mode */
/* we write protect a SRAM location so it cannot be set to 1 */
sram_protection_hack = ~0;
if ( !strcmp(Machine->gamedrv->name,"fatfury3") ||
!strcmp(Machine->gamedrv->name,"samsho3") ||
!strcmp(Machine->gamedrv->name,"samsho4") ||
!strcmp(Machine->gamedrv->name,"aof3") ||
!strcmp(Machine->gamedrv->name,"rbff1") ||
!strcmp(Machine->gamedrv->name,"rbffspec") ||
!strcmp(Machine->gamedrv->name,"kof95") ||
!strcmp(Machine->gamedrv->name,"kof96") ||
!strcmp(Machine->gamedrv->name,"kof97") ||
!strcmp(Machine->gamedrv->name,"kof97a") ||
!strcmp(Machine->gamedrv->name,"kof98") ||
!strcmp(Machine->gamedrv->name,"kof98a") ||
!strcmp(Machine->gamedrv->name,"kof99") ||
!strcmp(Machine->gamedrv->name,"kof99e") ||
!strcmp(Machine->gamedrv->name,"kof99n") ||
!strcmp(Machine->gamedrv->name,"kof99p") ||
!strcmp(Machine->gamedrv->name,"kof2000") ||
!strcmp(Machine->gamedrv->name,"kof2000n") ||
!strcmp(Machine->gamedrv->name,"kizuna") ||
!strcmp(Machine->gamedrv->name,"lastblad") ||
!strcmp(Machine->gamedrv->name,"lastblda") ||
!strcmp(Machine->gamedrv->name,"lastbld2") ||
!strcmp(Machine->gamedrv->name,"rbff2") ||
!strcmp(Machine->gamedrv->name,"rbff2a") ||
!strcmp(Machine->gamedrv->name,"mslug2") ||
!strcmp(Machine->gamedrv->name,"mslug3") ||
!strcmp(Machine->gamedrv->name,"garou") ||
!strcmp(Machine->gamedrv->name,"garouo") ||
!strcmp(Machine->gamedrv->name,"garoup"))
sram_protection_hack = 0x100/2;
if (!strcmp(Machine->gamedrv->name,"pulstar"))
sram_protection_hack = 0x35a/2;
if (!strcmp(Machine->gamedrv->name,"ssideki"))
{
/* patch out protection check */
/* the protection routines are at 0x25dcc and involve reading and writing */
/* addresses in the 0x2xxxxx range */
data16_t *mem16 = (data16_t *)memory_region(REGION_CPU1);
mem16[0x2240/2] = 0x4e71;
}
/* Hacks the program rom of Fatal Fury 2, needed either in arcade or console mode */
/* otherwise at level 2 you cannot hit the opponent and other problems */
if (!strcmp(Machine->gamedrv->name,"fatfury2"))
{
/* there seems to also be another protection check like the countless ones */
/* patched above by protecting a SRAM location, but that trick doesn't work */
/* here (or maybe the SRAM location to protect is different), so I patch out */
/* the routine which trashes memory. Without this, the game goes nuts after */
/* the first bonus stage. */
data16_t *mem16 = (data16_t *)memory_region(REGION_CPU1);
mem16[0xb820/2] = 0x4e71;
mem16[0xb822/2] = 0x4e71;
/* again, the protection involves reading and writing addresses in the */
/* 0x2xxxxx range. There are several checks all around the code. */
install_mem_read16_handler(0, 0x200000, 0x2fffff, fatfury2_protection_16_r);
install_mem_write16_handler(0, 0x200000, 0x2fffff, fatfury2_protection_16_w);
}
if (!strcmp(Machine->gamedrv->name,"fatfury3"))
{
/* patch the first word, it must be 0x0010 not 0x0000 (initial stack pointer) */
data16_t *mem16 = (data16_t *)memory_region(REGION_CPU1);
mem16[0x0000/2] = 0x0010;
}
if (!strcmp(Machine->gamedrv->name,"mslugx"))
{
/* patch out protection checks */
int i;
data16_t *mem16 = (data16_t *)memory_region(REGION_CPU1);
for (i = 0;i < (0x100000/2) - 4;i++)
{
if (mem16[i+0] == 0x0243 &&
mem16[i+1] == 0x0001 && /* andi.w #$1, D3 */
mem16[i+2] == 0x6600) /* bne xxxx */
{
mem16[i+2] = 0x4e71;
mem16[i+3] = 0x4e71;
}
}
mem16[0x3bdc/2] = 0x4e71;
mem16[0x3bde/2] = 0x4e71;
mem16[0x3be0/2] = 0x4e71;
mem16[0x3c0c/2] = 0x4e71;
mem16[0x3c0e/2] = 0x4e71;
mem16[0x3c10/2] = 0x4e71;
mem16[0x3c36/2] = 0x4e71;
mem16[0x3c38/2] = 0x4e71;
}
{
Pepone , You could hack the sram or put the console by console defect not arcade? Is imposible put in the ini. Dont work....
Thanks for you great emulator .
JC
Look this driver :
/* hacks to make the games which do protection checks run in arcade mode */
/* we write protect a SRAM location so it cannot be set to 1 */
sram_protection_hack = ~0;
if ( !strcmp(Machine->gamedrv->name,"fatfury3") ||
!strcmp(Machine->gamedrv->name,"samsho3") ||
!strcmp(Machine->gamedrv->name,"samsho4") ||
!strcmp(Machine->gamedrv->name,"aof3") ||
!strcmp(Machine->gamedrv->name,"rbff1") ||
!strcmp(Machine->gamedrv->name,"rbffspec") ||
!strcmp(Machine->gamedrv->name,"kof95") ||
!strcmp(Machine->gamedrv->name,"kof96") ||
!strcmp(Machine->gamedrv->name,"kof97") ||
!strcmp(Machine->gamedrv->name,"kof97a") ||
!strcmp(Machine->gamedrv->name,"kof98") ||
!strcmp(Machine->gamedrv->name,"kof98a") ||
!strcmp(Machine->gamedrv->name,"kof99") ||
!strcmp(Machine->gamedrv->name,"kof99e") ||
!strcmp(Machine->gamedrv->name,"kof99n") ||
!strcmp(Machine->gamedrv->name,"kof99p") ||
!strcmp(Machine->gamedrv->name,"kof2000") ||
!strcmp(Machine->gamedrv->name,"kof2000n") ||
!strcmp(Machine->gamedrv->name,"kizuna") ||
!strcmp(Machine->gamedrv->name,"lastblad") ||
!strcmp(Machine->gamedrv->name,"lastblda") ||
!strcmp(Machine->gamedrv->name,"lastbld2") ||
!strcmp(Machine->gamedrv->name,"rbff2") ||
!strcmp(Machine->gamedrv->name,"rbff2a") ||
!strcmp(Machine->gamedrv->name,"mslug2") ||
!strcmp(Machine->gamedrv->name,"mslug3") ||
!strcmp(Machine->gamedrv->name,"garou") ||
!strcmp(Machine->gamedrv->name,"garouo") ||
!strcmp(Machine->gamedrv->name,"garoup"))
sram_protection_hack = 0x100/2;
if (!strcmp(Machine->gamedrv->name,"pulstar"))
sram_protection_hack = 0x35a/2;
if (!strcmp(Machine->gamedrv->name,"ssideki"))
{
/* patch out protection check */
/* the protection routines are at 0x25dcc and involve reading and writing */
/* addresses in the 0x2xxxxx range */
data16_t *mem16 = (data16_t *)memory_region(REGION_CPU1);
mem16[0x2240/2] = 0x4e71;
}
/* Hacks the program rom of Fatal Fury 2, needed either in arcade or console mode */
/* otherwise at level 2 you cannot hit the opponent and other problems */
if (!strcmp(Machine->gamedrv->name,"fatfury2"))
{
/* there seems to also be another protection check like the countless ones */
/* patched above by protecting a SRAM location, but that trick doesn't work */
/* here (or maybe the SRAM location to protect is different), so I patch out */
/* the routine which trashes memory. Without this, the game goes nuts after */
/* the first bonus stage. */
data16_t *mem16 = (data16_t *)memory_region(REGION_CPU1);
mem16[0xb820/2] = 0x4e71;
mem16[0xb822/2] = 0x4e71;
/* again, the protection involves reading and writing addresses in the */
/* 0x2xxxxx range. There are several checks all around the code. */
install_mem_read16_handler(0, 0x200000, 0x2fffff, fatfury2_protection_16_r);
install_mem_write16_handler(0, 0x200000, 0x2fffff, fatfury2_protection_16_w);
}
if (!strcmp(Machine->gamedrv->name,"fatfury3"))
{
/* patch the first word, it must be 0x0010 not 0x0000 (initial stack pointer) */
data16_t *mem16 = (data16_t *)memory_region(REGION_CPU1);
mem16[0x0000/2] = 0x0010;
}
if (!strcmp(Machine->gamedrv->name,"mslugx"))
{
/* patch out protection checks */
int i;
data16_t *mem16 = (data16_t *)memory_region(REGION_CPU1);
for (i = 0;i < (0x100000/2) - 4;i++)
{
if (mem16[i+0] == 0x0243 &&
mem16[i+1] == 0x0001 && /* andi.w #$1, D3 */
mem16[i+2] == 0x6600) /* bne xxxx */
{
mem16[i+2] = 0x4e71;
mem16[i+3] = 0x4e71;
}
}
mem16[0x3bdc/2] = 0x4e71;
mem16[0x3bde/2] = 0x4e71;
mem16[0x3be0/2] = 0x4e71;
mem16[0x3c0c/2] = 0x4e71;
mem16[0x3c0e/2] = 0x4e71;
mem16[0x3c10/2] = 0x4e71;
mem16[0x3c36/2] = 0x4e71;
mem16[0x3c38/2] = 0x4e71;
}
{
Pepone , You could hack the sram or put the console by console defect not arcade? Is imposible put in the ini. Dont work....
Thanks for you great emulator .
JC