Author Topic: kof 10th extra plus driver  (Read 12081 times)

Offline FerchogtX

  • FBNeo Dev
  • ******
  • Posts: 375
  • Karma: +7/-0
  • FB Alpha Team ;)
    • FB Alpha Plus! Web Site
kof 10th extra plus driver
« on: September 14, 2005, 12:43:41 PM »
Hi everybody, as you know kof10thep is released, the original driver is for mame, so i made a fba convertion... but it still need some memcpy functions... any ideas?
Herre the mame driver
Code: [Select]
ROM_START( kof10th )
ROM_REGION( 0x800000, REGION_CPU1, 0 )
ROM_LOAD16_WORD_SWAP( "kf10-p1.bin", 0x000000, 0x800000, CRC(b1fd0c43) SHA1(5f842a8a27be2d957fd4140d6431ae47154997bb) )

ROM_REGION( 0x20000, REGION_GFX1, 0 )
ROM_FILL(                                 0x000000, 0x20000, 0 )
ROM_REGION( 0x20000, REGION_GFX2, 0 )
ROM_LOAD( "sfix.sfx",  0x000000, 0x20000, CRC(354029fc) SHA1(4ae4bf23b4c2acff875775d4cbff5583893ce2a1) )

NEO_BIOS_SOUND_128K( "kf10-m1.bin", CRC(f6fab859) SHA1(0184aa1394b9f9946d610278b53b846020dd88dc) )

ROM_REGION( 0x1000000, REGION_SOUND1, ROMREGION_SOUNDONLY )
ROM_LOAD( "kf10-v1.bin", 0x000000, 0x800000, CRC(0fc9a58d) SHA1(9d79ef00e2c2abd9f29af5521c2fbe5798bf336f) )
ROM_LOAD( "kf10-v2.bin", 0x800000, 0x800000, CRC(b8c475a4) SHA1(10caf9c69927a223445d2c4b147864c02ce520a8) )

NO_DELTAT_REGION

ROM_REGION( 0x4000000, REGION_GFX3, 0 )
ROM_LOAD16_BYTE( "kf10-c1a.bin", 0x0000000, 0x400000, CRC(3bbc0364) SHA1(e8aa7ff82f151ce1db56f259377b64cceef85af0) ) /* Plane 0,1 */
ROM_LOAD16_BYTE( "kf10-c2a.bin", 0x0000001, 0x400000, CRC(91230075) SHA1(d9098e05a7ba6008661147b6bf8bc2f494b8b72b) ) /* Plane 2,3 */
ROM_LOAD16_BYTE( "kf10-c1b.bin", 0x0800000, 0x400000, CRC(b5abfc28) SHA1(eabf60992bb3485c95330065294071ec155bfe7c) ) /* Plane 0,1 */
ROM_LOAD16_BYTE( "kf10-c2b.bin", 0x0800001, 0x400000, CRC(6cc4c6e1) SHA1(be824a944e745ee18efdc45c81fd496a4d624b9c) ) /* Plane 2,3 */
ROM_LOAD16_BYTE( "kf10-c3a.bin", 0x1000000, 0x400000, CRC(5b3d4a16) SHA1(93ac1cd7739100f8c32732644f81f2a19837b131) ) /* Plane 0,1 */
ROM_LOAD16_BYTE( "kf10-c4a.bin", 0x1000001, 0x400000, CRC(c6f3419b) SHA1(340c17a73aeb7bf8a6209f8459e6f00000075b50) ) /* Plane 2,3 */
ROM_LOAD16_BYTE( "kf10-c3b.bin", 0x1800000, 0x400000, CRC(9d2bba19) SHA1(5ebbd0af3f83a60e33c8ccb743e3d5f5a96f1273) ) /* Plane 0,1 */
ROM_LOAD16_BYTE( "kf10-c4b.bin", 0x1800001, 0x400000, CRC(5a4050cb) SHA1(8fd2291f349efa1ed5cd37ad4e273b60fe831a77) ) /* Plane 2,3 */
ROM_LOAD16_BYTE( "kf10-c5a.bin", 0x2000000, 0x400000, CRC(a289d1e1) SHA1(50c7d7ebde6e118a01036cc3e40827fcd9f0d3fd) ) /* Plane 0,1 */
ROM_LOAD16_BYTE( "kf10-c6a.bin", 0x2000001, 0x400000, CRC(e6494b5d) SHA1(18e064b9867ae0b0794065f8dbefd486620419db) ) /* Plane 2,3 */
ROM_LOAD16_BYTE( "kf10-c5b.bin", 0x2800000, 0x400000, CRC(404fff02) SHA1(56d1b32c87ea4885e49264e8b21846e465a20e1f) ) /* Plane 0,1 */
ROM_LOAD16_BYTE( "kf10-c6b.bin", 0x2800001, 0x400000, CRC(f2ccfc9e) SHA1(69db7fac7023785ab94ea711a72dbc2826cfe1a3) ) /* Plane 2,3 */
ROM_LOAD16_BYTE( "kf10-c7a.bin", 0x3000000, 0x400000, CRC(be79c5a8) SHA1(ded3c5eb3571647f50533eb682c2675372ace3fb) ) /* Plane 0,1 */
ROM_LOAD16_BYTE( "kf10-c8a.bin", 0x3000001, 0x400000, CRC(a5952ca4) SHA1(76dbb3cb45ce5a4beffa1ed29491204fc6617e42) ) /* Plane 2,3 */
ROM_LOAD16_BYTE( "kf10-c7b.bin", 0x3800000, 0x400000, CRC(3fdb3542) SHA1(7d2050752a2064cd6729f483a0da93808e2c6033) ) /* Plane 0,1 */
ROM_LOAD16_BYTE( "kf10-c8b.bin", 0x3800001, 0x400000, CRC(661b7a52) SHA1(0ae2ad2389134892f156337332b77adade3ddad1) ) /* Plane 2,3 */
ROM_END

ROM_START( kf10thep ) /* this is a hack of kof2002 much like the various korean hacks / bootlegs of games */
ROM_REGION( 0x800000, REGION_CPU1, 0 )
ROM_LOAD16_WORD_SWAP( "5008-p2.rom", 0x100000, 0x400000, CRC(a649ec38) SHA1(5c63ed5e5c848940f587c966da4908d04cf1293c) )
ROM_LOAD16_WORD_SWAP( "5008-p3.rom", 0x500000, 0x200000, CRC(e629e13c) SHA1(6ebe080ce01c51064cb2f4d89315ba98a45ae727) )

ROM_REGION( 0x200000, REGION_USER4, 0 )
ROM_LOAD( "5008-p1.rom", 0x000000, 0x200000, CRC(bf5469ba) SHA1(f05236d8fffab5836c0d27becdeeb80def32ee49) )

NEO_SFIX_128K( "5008-s1.rom", CRC(92410064) SHA1(1fb800b46341858207d3b6961a760289fbec7faa) )

NEO_BIOS_SOUND_128K( "5008-m1.rom", CRC(5a47d9ad) SHA1(0197737934653acc6c97221660d789e9914f3578) )
//NEO_BIOS_SOUND_128K( "5004-m1.bin", CRC(f6fab859) SHA1(0184aa1394b9f9946d610278b53b846020dd88dc) )


ROM_REGION( 0x1000000, REGION_SOUND1, ROMREGION_SOUNDONLY )
ROM_LOAD( "kf10-v1.bin", 0x000000, 0x800000, CRC(0fc9a58d) SHA1(9d79ef00e2c2abd9f29af5521c2fbe5798bf336f) )
ROM_LOAD( "kf10-v2.bin", 0x800000, 0x800000, CRC(b8c475a4) SHA1(10caf9c69927a223445d2c4b147864c02ce520a8) )

NO_DELTAT_REGION

ROM_REGION( 0x4000000, REGION_GFX3, 0 )
ROM_LOAD16_BYTE( "kf10-c1a.bin", 0x0000000, 0x400000, CRC(3bbc0364) SHA1(e8aa7ff82f151ce1db56f259377b64cceef85af0) ) /* Plane 0,1 */
ROM_LOAD16_BYTE( "kf10-c2a.bin", 0x0000001, 0x400000, CRC(91230075) SHA1(d9098e05a7ba6008661147b6bf8bc2f494b8b72b) ) /* Plane 2,3 */
ROM_LOAD16_BYTE( "kf10-c1b.bin", 0x0800000, 0x400000, CRC(b5abfc28) SHA1(eabf60992bb3485c95330065294071ec155bfe7c) ) /* Plane 0,1 */
ROM_LOAD16_BYTE( "5008-c2b.rom", 0x0800001, 0x400000, CRC(b1f565e1) SHA1(60da93b6e701b9620980e92f6aa9708897adcdeb) ) /* Plane 2,3 */ //new one
ROM_LOAD16_BYTE( "kf10-c3a.bin", 0x1000000, 0x400000, CRC(5b3d4a16) SHA1(93ac1cd7739100f8c32732644f81f2a19837b131) ) /* Plane 0,1 */
ROM_LOAD16_BYTE( "kf10-c4a.bin", 0x1000001, 0x400000, CRC(c6f3419b) SHA1(340c17a73aeb7bf8a6209f8459e6f00000075b50) ) /* Plane 2,3 */
ROM_LOAD16_BYTE( "kf10-c3b.bin", 0x1800000, 0x400000, CRC(9d2bba19) SHA1(5ebbd0af3f83a60e33c8ccb743e3d5f5a96f1273) ) /* Plane 0,1 */
ROM_LOAD16_BYTE( "kf10-c4b.bin", 0x1800001, 0x400000, CRC(5a4050cb) SHA1(8fd2291f349efa1ed5cd37ad4e273b60fe831a77) ) /* Plane 2,3 */
ROM_LOAD16_BYTE( "kf10-c5a.bin", 0x2000000, 0x400000, CRC(a289d1e1) SHA1(50c7d7ebde6e118a01036cc3e40827fcd9f0d3fd) ) /* Plane 0,1 */
ROM_LOAD16_BYTE( "kf10-c6a.bin", 0x2000001, 0x400000, CRC(e6494b5d) SHA1(18e064b9867ae0b0794065f8dbefd486620419db) ) /* Plane 2,3 */
ROM_LOAD16_BYTE( "kf10-c5b.bin", 0x2800000, 0x400000, CRC(404fff02) SHA1(56d1b32c87ea4885e49264e8b21846e465a20e1f) ) /* Plane 0,1 */
ROM_LOAD16_BYTE( "kf10-c6b.bin", 0x2800001, 0x400000, CRC(f2ccfc9e) SHA1(69db7fac7023785ab94ea711a72dbc2826cfe1a3) ) /* Plane 2,3 */
ROM_LOAD16_BYTE( "kf10-c7a.bin", 0x3000000, 0x400000, CRC(be79c5a8) SHA1(ded3c5eb3571647f50533eb682c2675372ace3fb) ) /* Plane 0,1 */
ROM_LOAD16_BYTE( "kf10-c8a.bin", 0x3000001, 0x400000, CRC(a5952ca4) SHA1(76dbb3cb45ce5a4beffa1ed29491204fc6617e42) ) /* Plane 2,3 */
ROM_LOAD16_BYTE( "5008-c7b.rom", 0x3800000, 0x400000, CRC(33604ef0) SHA1(57deec23c81d5d673ce5992cef1f2567f1a2148e) ) /* Plane 0,1 */
ROM_LOAD16_BYTE( "5008-c8b.rom", 0x3800001, 0x400000, CRC(51f6a8f8) SHA1(9ef1cdbdd125a2b430346c22b59f36902312905f) ) /* Plane 2,3 */
ROM_END

DRIVER_INIT( kof10th )
{
int i,j;
UINT16 *prom = (UINT16*)memory_region(REGION_CPU1);
UINT16 *buf  = (UINT16*)malloc(0x800000);
UINT16 *srom = (UINT16*)memory_region(REGION_GFX1);

if (buf)
{
memcpy(buf+0x000000/2, prom+0x700000/2, 0x100000);
memcpy(buf+0x100000/2, prom+0x000000/2, 0x600000);
memcpy(prom+0x000000/2, buf+0x000000/2, 0x800000);
memcpy(buf,prom,0x800000);
for(i=0;i<0x800000/2;i++)
{
j=BITSWAP24(i,23,22,21,20,19,18,17,16,15,14,13,12,11,10,1,8,7,6,0,4,3,2,9,5);
prom[j]=buf[i];
}
free(buf);
}

for(i=0;i<0x40;i++){
prom[0xe0000/2+i]=((prom[0x531680/2+i]^(0xc11d-0xc0c8))^prom[0x531600/2+i]);
}

for(i=0;i<0x270;i++){
prom[0xe1000/2+i]=((prom[0x531970/2+i]^(0xc11d-0xc0d9))^prom[0x531700/2+i]);
}

prom[0x00124/2] = 0x000d;
prom[0x00126/2] = 0xf7a8;
prom[0xdf986/2] = 0x168c;
prom[0xdf998/2] = 0x1668;
prom[0xe1154/2] = 0x125c;
prom[0xdd880/2] = 0x4e75;
prom[0xdd89e/2] = 0x4e75;
prom[0xdd8bc/2] = 0x4e75;

for (i=0;i<0x10000/2;i++){
srom[i+0x00000/2]=BITSWAP16(prom[i+0x600000/2]^0xf3f3,7,6,0,4,3,2,1,5,15,14,8,12,11,10,9,13);
srom[i+0x10000/2]=BITSWAP16(prom[i+0x6d0000/2]^0xf3f3,7,6,0,4,3,2,1,5,15,14,8,12,11,10,9,13);
}

for (i=0;i<0x4000/2;i++){
srom[i+0x02000/2]=BITSWAP16(prom[i+0x6c2000/2]^0xf3f3,7,6,0,4,3,2,1,5,15,14,8,12,11,10,9,13);
srom[i+0x12000/2]=BITSWAP16(prom[i+0x612000/2]^0xf3f3,7,6,0,4,3,2,1,5,15,14,8,12,11,10,9,13);
}

memory_install_read16_handler(0, ADDRESS_SPACE_PROGRAM, 0x2fe000,0x2fffef, 0, 0, MRA16_RAM);
memory_install_write16_handler(0, ADDRESS_SPACE_PROGRAM, 0x2fe000,0x2fffef, 0, 0, MWA16_RAM);

init_neogeo();
}

DRIVER_INIT( kf10thep )
{
int i;
UINT16 *rom = (UINT16*)memory_region(REGION_CPU1);
UINT8  *src = memory_region(REGION_CPU1);
UINT16 *buf = (UINT16*)memory_region(REGION_USER4);
UINT8 *srom = (UINT8*)memory_region(REGION_GFX1);
UINT8 *sbuf = malloc(0x20000);

  UINT8 *dst = (UINT8*)malloc(0x200000);

memcpy(dst,buf,0x200000);
  memcpy(src+0x000000,dst+0x060000,0x20000);
  memcpy(src+0x020000,dst+0x100000,0x20000);
  memcpy(src+0x040000,dst+0x0e0000,0x20000);
  memcpy(src+0x060000,dst+0x180000,0x20000);
  memcpy(src+0x080000,dst+0x020000,0x20000);
  memcpy(src+0x0a0000,dst+0x140000,0x20000);
  memcpy(src+0x0c0000,dst+0x0c0000,0x20000);
  memcpy(src+0x0e0000,dst+0x1a0000,0x20000);
  memcpy(src+0x0002e0,dst+0x0402e0,0x6a); // copy banked code to a new memory region
  memcpy(src+0x0f92bc,dst+0x0492bc,0xb9e); // copy banked code to a new memory region
  for (i=0xf92bc/2;i < 0xf9e58/2 ;i++)
  {
  if (rom[i+0] == 0x4eb9 && rom[i+1] == 0x0000) rom[i+1] = 0x000F; // correct JSR in moved code
  if (rom[i+0] == 0x4ef9 && rom[i+1] == 0x0000) rom[i+1] = 0x000F; // correct JMP in moved code
  }
  rom[0x00342/2] = 0x000f;
  free(dst);

for (i=0;i<0x20000;i++)
sbuf[i]=srom[i^0x8];

memcpy(srom,sbuf,0x20000);
free(sbuf);

init_neogeo();
}

GAMEB( 2005, kof10th,  neogeo,   neogeo, neogeo, neogeo,  kof10th,  ROT0, "SNK Playmore", "The King of Fighters 10th Anniversary" )
GAMEB( 2005, kf10thep, kof10th,  neogeo, neogeo, neogeo,  kf10thep, ROT0, "SNK Playmore", "The King of Fighters 10th Anniversary 'EXTRA PLUS'" )

for fba:
Code: [Select]
int i;
UINT8 *sbuf = (UINT8*)malloc(0x20000);
UINT8 *srom = NeoTextROM + 0x200000;

  UINT8 *dst = (UINT8*)malloc(0x200000);
UINT8 *src= Neo68KROM
UINT16 *rom = (UINT16*)Neo68KROM

memcpy(dst,src,0x200000);
  memcpy(src+0x000000,dst+0x060000,0x20000);
  memcpy(src+0x020000,dst+0x100000,0x20000);
  memcpy(src+0x040000,dst+0x0e0000,0x20000);
  memcpy(src+0x060000,dst+0x180000,0x20000);
  memcpy(src+0x080000,dst+0x020000,0x20000);
  memcpy(src+0x0a0000,dst+0x140000,0x20000);
  memcpy(src+0x0c0000,dst+0x0c0000,0x20000);
  memcpy(src+0x0e0000,dst+0x1a0000,0x20000);
  memcpy(src+0x0002e0,dst+0x0402e0,0x6a); // copy banked code to a new memory region
  memcpy(src+0x0f92bc,dst+0x0492bc,0xb9e); // copy banked code to a new memory region
  for (i=0xf92bc/2;i < 0xf9e58/2 ;i++)
  {
  if (rom[i+0] == 0x4eb9 && rom[i+1] == 0x0000) rom[i+1] = 0x000F; // correct JSR in moved code
  if (rom[i+0] == 0x4ef9 && rom[i+1] == 0x0000) rom[i+1] = 0x000F; // correct JMP in moved code
  }
  rom[0x00342/2] = 0x000f;
  free(dst);

for (i=0;i<0x20000;i++)
sbuf[i]=srom[i^0x8];

memcpy(srom,sbuf,0x20000);
free(sbuf);

See ya :biggrin:

Good and evil co-exist because of the balance, lies are not part of it...

FB Alpha Plus! site infos updated, see the latest info clicking on my profile link...

Offline iq_132

  • Administrator
  • *****
  • Posts: 3724
  • Karma: +411/-0
  • Definitely not Dink!
    • NeoSource
Re: kof 10th extra plus driver
« Reply #1 on: September 14, 2005, 02:54:43 PM »
Here's what I have:

Code: [Select]
// Code by IQ_132
// Thanks to JotaCE, Jimmy_page,
// and Robber804 for some info
static void kf10thepDecrypt()
{
// Fix for FBA program load problems
BurnLoadRom(Neo68KROM + 0x200000, 1, 1);
BurnLoadRom(Neo68KROM + 0x600000, 2, 1);

int i;
unsigned char *src = Neo68KROM;
unsigned char *dst = (unsigned char*)malloc(0x800000);

unsigned int sec[8] = { 0x3, 0x8, 0x7, 0xC, 0x1, 0xA, 0x6, 0xD };

for (i = 0; i < 8; i++)
{
memcpy (dst + i * 0x20000, src + sec[i] * 0x20000, 0x20000);
}

memcpy(dst + 0x0002e0, src + 0x0402e0, 0x06a);
memcpy(dst + 0x0f92bc, src + 0x0492bc, 0xb9e);

for (i = 0xf92bc; i < 0xf9e58; i += 2)
{
if (*((unsigned short*)(dst + i + 0)) == 0x4eb9 || *((unsigned short*)(dst + i + 0)) == 0x4ef9)
  {
if (*((unsigned short*)(dst + i + 2)) == 0x0000)
{
*((unsigned short*)(dst + i + 2)) = 0x000F;
}
  }
}
dst[0x00342] = 0x0f;

memcpy (dst + 0x100000, src + 0x200000, 0x600000);
memcpy (src, dst, 0x800000);

free (dst);
}


Offline FerchogtX

  • FBNeo Dev
  • ******
  • Posts: 375
  • Karma: +7/-0
  • FB Alpha Team ;)
    • FB Alpha Plus! Web Site
Re: kof 10th extra plus driver
« Reply #2 on: September 14, 2005, 07:55:52 PM »
Thanks a lot man
See ya!!!! :biggrin:

Good and evil co-exist because of the balance, lies are not part of it...

FB Alpha Plus! site infos updated, see the latest info clicking on my profile link...

Offline neo04

  • Jr. Member
  • **
  • Posts: 90
  • Karma: +1/-0
Re: kof 10th extra plus driver
« Reply #3 on: September 14, 2005, 11:22:58 PM »
hi iq, can u convert this to mame src pls :)
Code: [Select]
BurnLoadRom(Neo68KROM + 0x200000, 1, 1);
BurnLoadRom(Neo68KROM + 0x600000, 2, 1);
and one more thing, can u make a tool to create kf10thep px roms from any source? thx in advance!

Offline James33

  • Expert
  • *****
  • Posts: 532
  • Karma: +3/-0
  • The Mame Man
    • Emulation Zone
Re: kof 10th extra plus driver
« Reply #4 on: September 15, 2005, 01:06:56 AM »
hi iq, can u convert this to mame src pls :)
Code: [Select]
BurnLoadRom(Neo68KROM + 0x200000, 1, 1);
BurnLoadRom(Neo68KROM + 0x600000, 2, 1);

Mame does not need that .
« Last Edit: September 15, 2005, 07:31:01 AM by James33 »
IQ Forum Member

Offline neo04

  • Jr. Member
  • **
  • Posts: 90
  • Karma: +1/-0
Re: kof 10th extra plus driver
« Reply #5 on: September 15, 2005, 07:27:54 AM »
thats the same driver i used before... but u wont get the title screen with that code :(
maybe someone can fix this driver?

Offline James33

  • Expert
  • *****
  • Posts: 532
  • Karma: +3/-0
  • The Mame Man
    • Emulation Zone
Re: kof 10th extra plus driver
« Reply #6 on: September 15, 2005, 07:32:37 AM »
Yeah I found that out

Use FerchogtX  Mame code it works fine

« Last Edit: September 15, 2005, 07:54:35 AM by James33 »
IQ Forum Member

Offline iq_132

  • Administrator
  • *****
  • Posts: 3724
  • Karma: +411/-0
  • Definitely not Dink!
    • NeoSource
Re: kof 10th extra plus driver
« Reply #7 on: September 16, 2005, 12:30:22 AM »
What's the problem with using something like this??

Code: [Select]
ROM_REGION( 0x800000, REGION_CPU1, 0 )
ROM_LOAD16_WORD_SWAP( "5008-p1.bin", 0x000000, 0x200000, CRC(bf5469ba) )
ROM_LOAD16_WORD_SWAP( "5008-p2.bin", 0x200000, 0x400000, CRC(a649ec38) )
ROM_LOAD16_WORD_SWAP( "5008-p3.bin", 0x600000, 0x200000, CRC(e629e13c) )

Code: [Select]
// Code by IQ_132 -- http://neosource.1emu.net/
// Thanks to JotaCE, Jimmy_page, and Robber804 for some info
DRIVER_INIT( kf10thep )
{
int i;
UINT8 *src = memory_region(REGION_CPU1);
UINT8 *dst = (UINT8*)malloc(0x800000);
UINT16 *tmp = (UINT16*)src;

if (dst)
{
unsigned int nBank[] = { 0x3, 0x8, 0x7, 0xC, 0x1, 0xA, 0x6, 0xD };

memcpy (dst, src, 0x800000);

for (i = 0; i < 8; i++) {
memcpy (src + i * 0x20000, dst + nBank[i] * 0x20000, 0x20000);
}

memcpy(src + 0x0002e0, dst + 0x0402e0, 0x06a);
memcpy(src + 0x0f92bc, dst + 0x0492bc, 0xb9e);

memcpy (src + 0x100000, dst + 0x200000, 0x600000);

free(dst);
}

for (i = 0xf92bc/2; i < 0xf9e58/2; i++)
{
if ((tmp[i] & 0xff0f) == 0x4E09 && !tmp[i+1])
{
tmp[i+1] = 0x000F;
}
}

tmp[0x00342/2] = 0x000F;

kof2003b_sx_decrypt();

init_neogeo();
}


Offline James33

  • Expert
  • *****
  • Posts: 532
  • Karma: +3/-0
  • The Mame Man
    • Emulation Zone
Re: kof 10th extra plus driver
« Reply #8 on: September 16, 2005, 04:04:04 PM »
Thanks IQ

I merged the S decrypt code  Since I do not use kof2003b


Code: [Select]
// Code by IQ_132 -- http://neosource.1emu.net/
// Thanks to JotaCE, Jimmy_page, and Robber804 for some info
DRIVER_INIT( kf10thep )
{
int i;
UINT8 *src = memory_region(REGION_CPU1);
UINT8 *dst = (UINT8*)malloc(0x800000);
UINT16 *tmp = (UINT16*)src;
int rom_size = memory_region_length( REGION_GFX1 );
UINT8 *rom = memory_region( REGION_GFX1 );
UINT8 *buf = malloc( rom_size );

if (dst)
{
unsigned int nBank[] = { 0x3, 0x8, 0x7, 0xC, 0x1, 0xA, 0x6, 0xD };

memcpy (dst, src, 0x800000);

for (i = 0; i < 8; i++) {
memcpy (src + i * 0x20000, dst + nBank[i] * 0x20000, 0x20000);
}

memcpy(src + 0x0002e0, dst + 0x0402e0, 0x06a);
memcpy(src + 0x0f92bc, dst + 0x0492bc, 0xb9e);

memcpy (src + 0x100000, dst + 0x200000, 0x600000);

free(dst);
}

for (i = 0xf92bc/2; i < 0xf9e58/2; i++)
{
if ((tmp[i] & 0xff0f) == 0x4E09 && !tmp[i+1])
{
tmp[i+1] = 0x000F;
}
}

tmp[0x00342/2] = 0x000F;

memcpy( buf, rom, rom_size );

for( i = 0; i < rom_size; i += 0x10 ){
memcpy( &rom[ i        ], &buf[ i + 0x08 ], 0x08 );
memcpy( &rom[ i + 0x08 ], &buf[ i        ], 0x08 );
}

free( buf );

init_neogeo();
}
IQ Forum Member

Offline Shoometsu

  • Jr. Member
  • **
  • Posts: 66
  • Karma: +0/-0
  • I finally have an avatar XD
Re: kof 10th extra plus driver
« Reply #9 on: September 17, 2005, 02:57:17 PM »
I'm having the same problem about the title screen, besides the game works fine here... my driver:

Code: [Select]
// The King of Fighters 10th Anniversary 2005 Extra Plus

static struct BurnRomInfo kf10thepRomDesc[] = {
{ "275ep-p1.bin", 0x200000, 0xbf5469ba, 1 | BRF_ESS | BRF_PRG }, // 0 68K code
{ "275ep-p1.bin", 0x400000, 0xa649ec38, 1 | BRF_ESS | BRF_PRG }, // 1 68K code
{ "275ep-p1.bin", 0x200000, 0xe629e13c, 1 | BRF_ESS | BRF_PRG }, // 2 68K code

{ "275ep-s1.bin", 0x020000, 0x92410064, 2 | BRF_GRA }, // 3 Text data

{ "275-c1a.bin", 0x400000, 0x3bbc0364, 3 | BRF_GRA }, // 4 Sprite data
{ "275-c2a.bin", 0x400000, 0x91230075, 3 | BRF_GRA }, // 5
{ "275-c1b.bin", 0x400000, 0xb5abfc28, 3 | BRF_GRA }, // 6
{ "275-c2b.bin", 0x400000, 0x6CC4C6E1, 3 | BRF_GRA }, // 7
{ "275-c3a.bin", 0x400000, 0x5b3d4a16, 3 | BRF_GRA }, // 8
{ "275-c4a.bin", 0x400000, 0xc6f3419b, 3 | BRF_GRA }, // 9
{ "275-c3b.bin", 0x400000, 0x9d2bba19, 3 | BRF_GRA }, // 10
{ "275-c4b.bin", 0x400000, 0x5a4050cb, 3 | BRF_GRA }, // 11
{ "275-c5a.bin", 0x400000, 0xa289d1e1, 3 | BRF_GRA }, // 12
{ "275-c6a.bin", 0x400000, 0xe6494b5d, 3 | BRF_GRA }, // 13
{ "275-c5b.bin", 0x400000, 0x404fff02, 3 | BRF_GRA }, // 14
{ "275-c6b.bin", 0x400000, 0xf2ccfc9e, 3 | BRF_GRA }, // 15
{ "275-c7a.bin", 0x400000, 0xbe79c5a8, 3 | BRF_GRA }, // 16
{ "275-c8a.bin", 0x400000, 0xa5952ca4, 3 | BRF_GRA }, // 17
{ "275-c7b.bin", 0x400000, 0x3FDB3542, 3 | BRF_GRA }, // 18
{ "275-c8b.bin", 0x400000, 0x661B7A52, 3 | BRF_GRA }, // 19

{ "275ep-m1.bin", 0x020000, 0x5a47d9ad, 4 | BRF_ESS | BRF_PRG }, // 20 Z80 code

{ "265-v1d.bin", 0x800000, 0x0fc9a58d, 5 | BRF_SND }, // 21 Sound data
{ "265-v2d.bin", 0x800000, 0xb8c475a4, 5 | BRF_SND }, // 22
};

STDROMPICKEXT(kf10thep, kf10thep, neogeo);
STD_ROM_FN(kf10thep);

// Code by IQ_132. Thanks to JotaCE, Jimmy_page, and Robber804 for some info

static void kf10thepDecrypt()
{
// Fix for FBA program load problems
BurnLoadRom(Neo68KROM + 0x200000, 1, 1);
BurnLoadRom(Neo68KROM + 0x600000, 2, 1);

int i;
unsigned char *src = Neo68KROM;
unsigned char *dst = (unsigned char*)malloc(0x800000);

unsigned int sec[8] = { 0x3, 0x8, 0x7, 0xC, 0x1, 0xA, 0x6, 0xD };

for (i = 0; i < 8; i++)
{
memcpy (dst + i * 0x20000, src + sec[i] * 0x20000, 0x20000);
}

memcpy(dst + 0x0002e0, src + 0x0402e0, 0x06a);
memcpy(dst + 0x0f92bc, src + 0x0492bc, 0xb9e);

for (i = 0xf92bc; i < 0xf9e58; i += 2)
{
if (*((unsigned short*)(dst + i + 0)) == 0x4eb9 || *((unsigned short*)(dst + i + 0)) == 0x4ef9)
{
if (*((unsigned short*)(dst + i + 2)) == 0x0000)
{
*((unsigned short*)(dst + i + 2)) = 0x000F;
}
}
}

dst[0x00342] = 0x0f;

memcpy (dst + 0x100000, src + 0x200000, 0x600000);
memcpy (src, dst, 0x800000);

free (dst);

}

//

static int kf10thepInit()
{
pNeoInitCallback = kf10thepDecrypt;
nNeoTextROMFixType = 3;
return NeoInit();
}

struct BurnDriver BurnDrvkf10thep = {
"kf10thep", "kof10th", "neogeo", "2005",
"The King of Fighters 10th Anniversary - All Team Battle 2005 Extra Plus\0", NULL, "SNK Playmore / Winter", "Neo Geo",
NULL, NULL, NULL, NULL,
BDF_GAME_WORKING | BDF_BOOTLEG | BDF_CLONE, 2, HARDWARE_SNK_NEOGEO,
NULL, kf10thepRomInfo, kf10thepRomName, neogeoInputInfo, neogeoDIPInfo,
kf10thepInit, NeoExit, NeoFrame, NeoRender, NeoScan, &NeoRecalcPalette,
nNeoScreenWidth, 224, 4, 3
};
<- Who are you?

Offline JiMMy_PaGe

  • Expert
  • *****
  • Posts: 60
  • Karma: +2/-0
    • SNK-NeoFighters
Re: kof 10th extra plus driver
« Reply #10 on: September 17, 2005, 03:15:06 PM »
U are missing c2ep, c7ep and c8ep... c7ep and c8ep have the new logo grafics, thats why u are getting the old logo  :wink:

ROMs:
kf10-c2ep.bin  size:4mb   CRC(b1f565e1)
kf10-c7ep.bin  size:4mb   CRC(33604ef0)
kf10-c8ep.bin  size:4mb   CRC(51f6a8f8)

Change:
c2b to kf10-c2ep.bin
c7b to kf10-c7ep.bin
c8b to kf10-c8ep.bin

Offline Shoometsu

  • Jr. Member
  • **
  • Posts: 66
  • Karma: +0/-0
  • I finally have an avatar XD
Re: kof 10th extra plus driver
« Reply #11 on: September 17, 2005, 07:01:52 PM »
I wasn't having any logo, only a black screen, but now it's ok
thkx for info (again) :wink:
« Last Edit: September 18, 2005, 08:07:22 AM by Shoometsu »
<- Who are you?

Offline James33

  • Expert
  • *****
  • Posts: 532
  • Karma: +3/-0
  • The Mame Man
    • Emulation Zone
Re: kof 10th extra plus driver
« Reply #12 on: September 17, 2005, 08:58:24 PM »
Anyway can anyone tell me what are the changes for this game ?  I know about the logo but what else ?

Thanks  :biggrin:
IQ Forum Member

Offline Death Metal

  • Member
  • ***
  • Posts: 121
  • Karma: +3/-0
  • Crimson Blade
Re: kof 10th extra plus driver
« Reply #13 on: September 18, 2005, 01:36:01 AM »
I heard you can select small characters and a weird Rugal. Someone please correct me if I'm wrong.