Jump to content

a few more drivers


Recommended Posts

ROM_START( kof2k3up ) /* Ultra Plus Hack */
ROM_REGION( 0x800000, REGION_CPU1, 0 ) 
ROM_LOAD16_WORD_SWAP( "271-p1up.bin", 0x000000, 0x800000, CRC(87294c01) SHA1(21420415a6b2ba1b43ecc1934270dc085d6bd7d9) )

NEO_SFIX_128K( "271-s1up.bin", CRC(e5708c0c) SHA1(5649446d3b0b1bd138b5a8b40b96a6d0f892f4d8) )

NEO_BIOS_SOUND_512K( "271-m1d.bin", CRC(0e86af8f) SHA1(769102b67bb1a699cfa5674d66cdb46ae633cb65) )

ROM_REGION( 0x1000000, REGION_SOUND1, ROMREGION_SOUNDONLY )
/* decrypted */
ROM_LOAD( "271-v1d.bin", 0x000000, 0x1000000, CRC(2964f36e) SHA1(bfc52f81354eb57e27acb3b80fe1547b9e070293) )

NO_DELTAT_REGION

ROM_REGION( 0x6000000, REGION_GFX3, 0 )
/* decrypted */
ROM_LOAD16_BYTE( "271-c1d.bin", 0x0000000, 0x1000000, CRC(c29acd28) SHA1(8a10409c5a9ad95fa9b56e94c14f1b96101fb179) ) /* Plane 0,1 */
ROM_LOAD16_BYTE( "271-c2d.bin", 0x0000001, 0x1000000, CRC(328e80b1) SHA1(c7f8069488be1a88a2ea03718b6a131f5c96bd3f) ) /* Plane 2,3 */
ROM_LOAD16_BYTE( "271-c3d.bin", 0x2000000, 0x1000000, CRC(020a11f1) SHA1(85cfae76234f72b0039ebc02f931bb2a9c10b1af) ) /* Plane 0,1 */
ROM_LOAD16_BYTE( "271-c4d.bin", 0x2000001, 0x1000000, CRC(991b5ed2) SHA1(99c4c470bc9cb388773e27de6df4a16803fc7b45) ) /* Plane 2,3 */
ROM_END




DRIVER_INIT( kof2k3up )
{
/* Codes by HalRIN,IQ_132,bms1221 Modified By James hehe */
/* Descramble P1 (bring part 8 to the front) */
int ofst;
int i;
UINT8 *rom = memory_region( REGION_CPU1 ) + 0xfe000;
UINT8 *buf = memory_region( REGION_CPU1 ) + 0xd0610;
UINT8 *src = memory_region(REGION_CPU1);
UINT8 *srom = memory_region( REGION_GFX1 );
int rom_size = memory_region_length( REGION_GFX1 );
memcpy(src+0x100000, src, 0x600000);
memcpy(src, src+0x700000, 0x100000);

for( i = 0; i < 0x2000 / 2; i++ ){
ofst = (i & 0xff00) + BITSWAP8( (i & 0x00ff), 7, 6, 0, 4, 3, 2, 1, 5 );
memcpy( &rom[ i * 2 ], &buf[ ofst * 2 ], 2 );
}

for( i = 0; i < rom_size; i++ ){
srom[ i ] = BITSWAP8( srom[ i ], 7, 6, 0, 4, 3, 2, 1, 5 );
}
neogeo_fix_bank_type = 2;
init_neogeo();
}



GAMEB( 2003, kof2k3up, kof2003,	neogeo, neogeo, neogeo, kof2k3up, ROT0, "Playmore Corporation", "The King of Fighters 2003 Ultra Plus (Hack)", 0 )

 

 

Next part goes in machine\neogeo.c

Ignore the other rom names if you do not have those rom sets. It should still compile

 

/* PCB init info */
static unsigned short CartRAM[0x1000];

unsigned char pvc_r8(unsigned int address)
{
return *(((unsigned char *)CartRAM)+((address^1)-0x2fe000));
}

void pvc_w8(unsigned int address, unsigned char data)
{
*(((unsigned char *)CartRAM)+((address^1)-0x2fe000))=data;
}

// These perform some palette calculations
// Unpack palette word to RGB dword, thanks to bms888
void pvc_prot1( void ) // on writes to e0/e1
{
unsigned char b1, b2;
b1 = pvc_r8(0x2fffe0);
b2 = pvc_r8(0x2fffe1);

pvc_w8(0x2fffe3,(((b2>>0)&0xf)<<1)|((b1>>4)&1));
pvc_w8(0x2fffe2,(((b2>>4)&0xf)<<1)|((b1>>5)&1));
pvc_w8(0x2fffe5,(((b1>>0)&0xf)<<1)|((b1>>6)&1));
pvc_w8(0x2fffe4, (b1>>7));
}

void pvc_prot2( void ) // on writes to e8/e9/ea/eb
{
unsigned char b1, b2, b3, b4;
b1 = pvc_r8(0x2fffe8);
b2 = pvc_r8(0x2fffe9);
b3 = pvc_r8(0x2fffea);
b4 = pvc_r8(0x2fffeb);

pvc_w8(0x2fffed,(b2>>1)|((b1>>1)<<4));
pvc_w8(0x2fffec,(b4>>1)|((b2&1)<<4)|((b1&1)<<5)|((b4&1)<<6)|((b3&1)<<7));
}

void pvc_write_bankswitch( void )
{
UINT32 bankaddress;
bankaddress = ((CartRAM[0xff8]>>8)|(CartRAM[0xff9]<<8))+0x100000;
neogeo_set_cpu1_second_bank(bankaddress);
}

static WRITE16_HANDLER( pvc_prot_w )
{
COMBINE_DATA( &CartRAM[ offset ] );

if (offset == 0xFF0)pvc_prot1();
else if(offset >= 0xFF4 && offset <= 0xFF5)pvc_prot2();
else if(offset >= 0xFF8 && offset <= 0xFF9)pvc_write_bankswitch();
}

static READ16_HANDLER( pvc_prot_r ) 
{ 
    if (offset >= 0xFF8) 
    { 
         if(CartRAM[0xFF8] == 0xffff) 
         { 
              CartRAM[0xFF8] = 0xfea0; 
              CartRAM[0xFF9] = 0x7fff; 
         } 
         if(CartRAM[0xFF8] == 0x0000) 
         { 
              CartRAM[0xFF8] = 0x00a0; 
         } 
    } 
    return CartRAM[ offset ]; 
}


/* kof2003 bootleg init info */
static READ16_HANDLER( kof2003b_prot_r )
{
return CartRAM[0xff9];
}




if (!strcmp(Machine->gamedrv->name,"kof2003b") ||
!strcmp(Machine->gamedrv->name,"kof2003a") ||
!strcmp(Machine->gamedrv->name,"kof2k3up") ||
!strcmp(Machine->gamedrv->name,"kf2k3ba"))
{
 memory_install_read16_handler(0, ADDRESS_SPACE_PROGRAM, 0x2fe000, 0x2fffff, 0, 0, pvc_prot_r);
 memory_install_write16_handler(0, ADDRESS_SPACE_PROGRAM, 0x2fe000, 0x2fffff, 0, 0, pvc_prot_w);

 memory_install_read16_handler(0, ADDRESS_SPACE_PROGRAM, 0x058196, 0x058197, 0, 0, kof2003b_prot_r);
}

 

 

 

ack gosh darn damn...

the machine/neogeo.c causes segfaults with the game.. now my kof2003b that was working segfaults also... i tried in klugdes and individu */lndividual games can go here.. */ could you be more specific?

Link to comment
Share on other sites

  • Replies 36
  • Created
  • Last Reply

Top Posters In This Topic

I followed the instructions and it worked !!

 

The title screen says King of Fighters 2004 EX @@ PLUS

(the @ signs are really some asian characters)

Should it say something different?

Link to comment
Share on other sites

i still have no clue why i'm still having issues crc's are completlely correct maybe some thing in.087?

..after >>

static int prot_data;

 

static READ16_HANDLER( fatfury2_protection_16_r )

{

data16_t res = (prot_data >> 24) & 0xff;

 

switch (offset)

{

case 0x55550/2:

case 0xffff0/2:

case 0x00000/2:

case 0xff000/2:

case 0x36000/2:

case 0x36008/2:

return res;

 

case 0x36004/2:

case 0x3600c/2:

return ((res & 0xf0) >> 4) | ((res & 0x0f) << 4);

 

default:

logerror("unknown protection read at pc %06x, offset %08x\n",activecpu_get_pc(),offset<<1);

return 0;

}

}

 

static WRITE16_HANDLER( fatfury2_protection_16_w )

{

switch (offset)

{

case 0x55552/2: /* data == 0x5555; read back from 55550, ffff0, 00000, ff000 */

prot_data = 0xff00ff00;

break;

 

case 0x56782/2: /* data == 0x1234; read back from 36000 *or* 36004 */

prot_data = 0xf05a3601;

break;

 

case 0x42812/2: /* data == 0x1824; read back from 36008 *or* 3600c */

prot_data = 0x81422418;

break;

 

case 0x55550/2:

case 0xffff0/2:

case 0xff000/2:

case 0x36000/2:

case 0x36004/2:

case 0x36008/2:

case 0x3600c/2:

prot_data <<= 8;

break;

 

default:

logerror("unknown protection write at pc %06x, offset %08x, data %02x\n",activecpu_get_pc(),offset,data);

break;

}

}

 

static READ16_HANDLER( popbounc_sfix_16_r )

{

if (activecpu_get_pc()==0x6b10)

return 0;

return neogeo_ram16[0x4fbc/2];

}

 

 

 

i have >>

/* PCB init info */

static unsigned short CartRAM[0x1000];

 

unsigned char pvc_r8(unsigned int address)

{

return *(((unsigned char *)CartRAM)+((address^1)-0x2fe000));

}

 

void pvc_w8(unsigned int address, unsigned char data)

{

*(((unsigned char *)CartRAM)+((address^1)-0x2fe000))=data;

}

 

// These perform some palette calculations

// Unpack palette word to RGB dword, thanks to bms888

void pvc_prot1( void ) // on writes to e0/e1

{

unsigned char b1, b2;

b1 = pvc_r8(0x2fffe0);

b2 = pvc_r8(0x2fffe1);

 

pvc_w8(0x2fffe3,(((b2>>0)&0xf)<<1)|((b1>>4)&1));

pvc_w8(0x2fffe2,(((b2>>4)&0xf)<<1)|((b1>>5)&1));

pvc_w8(0x2fffe5,(((b1>>0)&0xf)<<1)|((b1>>6)&1));

pvc_w8(0x2fffe4, (b1>>7));

}

 

void pvc_prot2( void ) // on writes to e8/e9/ea/eb

{

unsigned char b1, b2, b3, b4;

b1 = pvc_r8(0x2fffe8);

b2 = pvc_r8(0x2fffe9);

b3 = pvc_r8(0x2fffea);

b4 = pvc_r8(0x2fffeb);

 

pvc_w8(0x2fffed,(b2>>1)|((b1>>1)<<4));

pvc_w8(0x2fffec,(b4>>1)|((b2&1)<<4)|((b1&1)<<5)|((b4&1)<<6)|((b3&1)<<7));

}

 

void pvc_write_bankswitch( void )

{

UINT32 bankaddress;

bankaddress = ((CartRAM[0xff8]>>:(|(CartRAM[0xff9]<<:blink:)+0x100000;

neogeo_set_cpu1_second_bank(bankaddress);

}

 

static WRITE16_HANDLER( pvc_prot_w )

{

COMBINE_DATA( &CartRAM[ offset ] );

 

if (offset == 0xFF0)pvc_prot1();

else if(offset >= 0xFF4 && offset <= 0xFF5)pvc_prot2();

else if(offset >= 0xFF8 && offset <= 0xFF9)pvc_write_bankswitch();

}

 

static READ16_HANDLER( pvc_prot_r )

{

if (offset >= 0xFF8)

{

if(CartRAM[0xFF8] == 0xffff)

{

CartRAM[0xFF8] = 0xfea0;

CartRAM[0xFF9] = 0x7fff;

}

if(CartRAM[0xFF8] == 0x0000)

{

CartRAM[0xFF8] = 0x00a0;

}

}

return CartRAM[ offset ];

}

 

 

 

/* kof2003 bootleg init info */

static READ16_HANDLER( kof2003b_prot_r )

{

return CartRAM[0xff9];

}

 

 

 

 

after kludges i have

 

 

 

 

if (!strcmp(Machine->gamedrv->name,"kof2003b") ||

!strcmp(Machine->gamedrv->name,"kof2003a") ||

!strcmp(Machine->gamedrv->name,"kof2k3up") ||

!strcmp(Machine->gamedrv->name,"kf2k3ba"))

{

memory_install_read16_handler(0, ADDRESS_SPACE_PROGRAM, 0x2fe000, 0x2fffff, 0, 0, pvc_prot_r);

memory_install_write16_handler(0, ADDRESS_SPACE_PROGRAM, 0x2fe000, 0x2fffff, 0, 0, pvc_prot_w);

 

memory_install_read16_handler(0, ADDRESS_SPACE_PROGRAM, 0x058196, 0x058197, 0, 0, kof2003b_prot_r);

}

 

 

 

crcs are correct but game crashes and reboots

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...