Author Topic: New NEOGEO romsets need drivers  (Read 5390 times)

Offline novaa

  • Newbies
  • *
  • Posts: 10
  • Karma: +0/-1
New NEOGEO romsets need drivers
« on: January 02, 2008, 10:52:14 AM »
Hi all due to new neogeo sets , can
someone post drivers for mame for
these new sets please ??? thank you

Offline iq_132

  • Administrator
  • *****
  • Posts: 3728
  • Karma: +411/-0
  • Definitely not Dink!
    • NeoSource
Re: New NEOGEO romsets need drivers
« Reply #1 on: January 02, 2008, 02:51:20 PM »
Check how fatfursa's px roms are loaded.

This is what I'm using for kof2003h
Code: [Select]
void kof2003h_decrypt_68k(void)
{
static const UINT8 xor1[0x20] = { 0xc2, 0x4b, 0x74, 0xfd, 0x0b, 0x34, 0xeb, 0xd7, 0x10, 0x6d, 0xf9, 0xce, 0x5d, 0xd5, 0x61, 0x29, 0xf5, 0xbe, 0x0d, 0x82, 0x72, 0x45, 0x0f, 0x24, 0xb3, 0x34, 0x1b, 0x99, 0xea, 0x09, 0xf3, 0x03 };
static const UINT8 xor2[0x20] = { 0x2b, 0x09, 0xd0, 0x7f, 0x51, 0x0b, 0x10, 0x4c, 0x5b, 0x07, 0x70, 0x9d, 0x3e, 0x0b, 0xb0, 0xb6, 0x54, 0x09, 0xe0, 0xcc, 0x3d, 0x0d, 0x80, 0x99, 0x87, 0x03, 0x90, 0x82, 0xfe, 0x04, 0x20, 0x18 };
int i;
int ofst;
int rom_size = 0x900000;
UINT8 *rom = memory_region( NEOGEO_REGION_MAIN_CPU_CARTRIDGE );
UINT8 *buf = malloc_or_die( rom_size );

for (i = 0; i < 0x100000; i++)
{
rom[ 0x800000 + i ] ^= rom[ 0x100002 | BYTE_XOR_LE(i) ];
}
for( i = 0; i < 0x100000; i++)
{
rom[ i ] ^= xor1[ (BYTE_XOR_LE(i) % 0x20) ];
}
for( i = 0x100000; i < 0x800000; i++)
{
rom[ i ] ^= xor2[ (BYTE_XOR_LE(i) % 0x20) ];
}
for( i = 0x100000; i < 0x800000; i += 4)
{
UINT16 rom16;
rom16 = rom[BYTE_XOR_LE(i+1)] | rom[BYTE_XOR_LE(i+2)]<<8;
rom16 = BITSWAP16( rom16, 15, 14, 13, 12, 10, 11, 8, 9, 6, 7, 4, 5, 3, 2, 1, 0 );
rom[BYTE_XOR_LE(i+1)] = rom16&0xff;
rom[BYTE_XOR_LE(i+2)] = rom16>>8;
}
for( i = 0; i < 0x0100000 / 0x10000; i++ )
{
ofst = (i & 0xf0) + BITSWAP8((i & 0x0f), 7, 6, 5, 4, 1, 0, 3, 2);
memcpy( &buf[ i * 0x10000 ], &rom[ ofst * 0x10000 ], 0x10000 );
}
for( i = 0x100000; i < 0x900000; i += 0x100)
{
ofst = (i & 0xf000ff) + ((i & 0x000f00) ^ 0x00400) + (BITSWAP8( ((i & 0x0ff000) >> 12), 6, 7, 4, 5, 0, 1, 2, 3 ) << 12);
memcpy( &buf[ i ], &rom[ ofst ], 0x100 );
}
memcpy (&rom[0x000000], &buf[0x000000], 0x100000);
memcpy (&rom[0x100000], &buf[0x800000], 0x100000);
memcpy (&rom[0x200000], &buf[0x100000], 0x700000);
free( buf );
}


Offline iq_132

  • Administrator
  • *****
  • Posts: 3728
  • Karma: +411/-0
  • Definitely not Dink!
    • NeoSource
Re: New NEOGEO romsets need drivers
« Reply #2 on: January 02, 2008, 03:10:51 PM »
I meant for rbff1a, check how fatfursa's px are loaded.  That's how the driver should be.