Author Topic: King of Fighters 10th Anniversary Edition Emulation Infos  (Read 52164 times)

Offline Death Metal

  • Member
  • ***
  • Posts: 121
  • Karma: +3/-0
  • Crimson Blade
King of Fighters 10th Anniversary Edition Emulation Infos
« Reply #60 on: April 06, 2005, 01:30:33 AM »
Yay, finally some refreshing news about this driver. :p However, I have just tested this and unfortunately it doesn't seem to work with me either, although I get no Guru at no moment at all -- it just doesn't run the game; instead, it enters in that squared screen and stays there forever.

Well, this is the driver I'm using (already updated with Ferchogtx's code above), in case you guys might be wondering:

Code: [Select]
// The King of Fighters: 10th Anniversary (KOF2002 hack)

static struct BurnRomInfo kof10thRomDesc[] = {
{ "kf10-p1.bin" , 0x800000, 0xb1fd0c43, 1 | BRF_ESS | BRF_PRG }, //  0 68K code

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

{ "kf10-m1.bin" , 0x020000, 0xf6fab859, 4 | BRF_ESS | BRF_PRG }, // 17 Z80 code

{ "kf10-v1.bin" , 0x800000, 0x0fc9a58d, 5 | BRF_SND }, // 18 Sound data
{ "kf10-v2.bin" , 0x800000, 0xb8c475a4, 5 | BRF_SND }, // 19
};

STDROMPICKEXT(kof10th, kof10th, neogeo);
STD_ROM_FN(kof10th);

static int kof10thInit()
{
int nRet;
unsigned char* NeoNVRAM2;

nRet = NeoInit();

if (nRet == 0) {
SekMapMemory(NeoNVRAM2, 0x2fe000, 0x2fffff, SM_RAM); // kof10th 68K RAM

SekMapHandler(5, 0x2FFFF0, 0x2FFFFF, SM_WRITE); // kof10th 68K bankswitch
SekSetWriteWordHandler(5, neogeoWriteWordBankswitch);
SekSetWriteByteHandler(5, neogeoWriteByteBankswitch);
}

return nRet;
}

struct BurnDriver BurnDrvKof10th = {
"kof10th", "kof2002", "neogeo", "2004",
"The King of Fighters: 10th Anniversary (hack)\0", NULL, "Hack", "Neo-Geo",
NULL, NULL, NULL, NULL,
BDF_GAME_WORKING | BDF_CLONE, 2, HARDWARE_SNK_NEOGEO,
NULL, kof10thRomInfo, kof10thRomName, neogeoInputInfo, neogeoDIPInfo,
kof10thInit, NeoExit, NeoFrame, NeoRender, NeoScan, &NeoRecalcPalette,
304, 224, 19, 14
};


I'm not sure if I'm loading the C ROMs correctly, but I doubt it has anything to do with the current problem.

Anyway, thanks for posting that code, Ferch.

Offline bms888

  • Jr. Member
  • **
  • Posts: 93
  • Karma: +0/-0
  • Member
King of Fighters 10th Anniversary Edition Emulation Infos
« Reply #61 on: April 06, 2005, 03:27:16 AM »
PS: I use some pvc code and other code(likes ms5plus),not NeoNVRAM2.^_^

OK.I'm useing this Cx romset now, because I remove some c3a-c8b unusefull rom from my harddisk(in fact,same as kof2002 decrypted C3 - C8). We have to add this code to load correct in FBA.^_^

Code: [Select]

static void kof10th_cfix()
{
// Reload C-roms (fix FBA load problem)
BurnLoadRom(NeoSpriteROM+0x0000000, 1, 2);
BurnLoadRom(NeoSpriteROM+0x0000001, 2, 2);
BurnLoadRom(NeoSpriteROM+0x0800000, 3, 2);
BurnLoadRom(NeoSpriteROM+0x0800001, 4, 2);
BurnLoadRom(NeoSpriteROM+0x1000000, 5, 2);
BurnLoadRom(NeoSpriteROM+0x1000001, 6, 2);
BurnLoadRom(NeoSpriteROM+0x2000000, 7, 2);
BurnLoadRom(NeoSpriteROM+0x2000001, 8, 2);
BurnLoadRom(NeoSpriteROM+0x3000000, 9, 2);
BurnLoadRom(NeoSpriteROM+0x3000001, 10, 2);
}


Code: [Select]

{"kf10-c1a.bin", 0x400000, 0x3BBC0364, 3 | BRF_GRA }, //  1 Sprite data
{"kf10-c2a.bin", 0x400000, 0x91230075, 3 | BRF_GRA }, //  2
{"kf10-c1b.bin", 0x400000, 0xB5ABFC28, 3 | BRF_GRA }, //  3
{"kf10-c2b.bin", 0x400000, 0x6CC4C6E1, 3 | BRF_GRA }, //  4
/*
{"kf10-c3a.bin", 0x400000, 0x5B3D4A16, 3 | BRF_GRA }, //  5
{"kf10-c4a.bin", 0x400000, 0xC6F3419B, 3 | BRF_GRA }, //  6
{"kf10-c3b.bin", 0x400000, 0x9D2BBA19, 3 | BRF_GRA }, //  7
{"kf10-c4b.bin", 0x400000, 0x5A4050CB, 3 | BRF_GRA }, //  8
{"kf10-c5a.bin", 0x400000, 0xA289D1E1, 3 | BRF_GRA }, //  9
{"kf10-c6a.bin", 0x400000, 0xE6494B5D, 3 | BRF_GRA }, //  10
{"kf10-c5b.bin", 0x400000, 0x404FFF02, 3 | BRF_GRA }, //  11
{"kf10-c6b.bin", 0x400000, 0xF2CCFC9E, 3 | BRF_GRA }, //  12
{"kf10-c7a.bin", 0x400000, 0xBE79C5A8, 3 | BRF_GRA }, //  13
{"kf10-c8a.bin", 0x400000, 0xA5952CA4, 3 | BRF_GRA }, //  14
{"kf10-c7b.bin", 0x400000, 0x3FDB3542, 3 | BRF_GRA }, //  15
{"kf10-c8b.bin", 0x400000, 0x661B7A52, 3 | BRF_GRA }, //  16
*/
{"kf2k2_c3.rom", 0x800000, 0x959fad0B, 3 | BRF_GRA }, //  5
{"kf2k2_c4.rom", 0x800000, 0xefe6a468, 3 | BRF_GRA }, //  6
{"kf2k2_c5.rom", 0x800000, 0x74bba7c6, 3 | BRF_GRA }, //  7
{"kf2k2_c6.rom", 0x800000, 0xe20d2216, 3 | BRF_GRA }, //  8
{"kf2k2_c7.rom", 0x800000, 0x8a5b561c, 3 | BRF_GRA }, //  9
{"kf2k2_c8.rom", 0x800000, 0xbef667a3, 3 | BRF_GRA }, //  10

Offline James33

  • Expert
  • *****
  • Posts: 532
  • Karma: +3/-0
  • The Mame Man
    • Emulation Zone
Yes I am lazy
« Reply #62 on: April 06, 2005, 09:45:48 AM »
A full driver would be nice :D
IQ Forum Member

Offline bms888

  • Jr. Member
  • **
  • Posts: 93
  • Karma: +0/-0
  • Member
King of Fighters 10th Anniversary Edition Emulation Infos
« Reply #63 on: April 06, 2005, 10:16:32 AM »
HI,boys.If you useing encrypt P,you must be add some code. :D

Code: [Select]
{"kf10-p1.bin" , 0x800000, 0xb1fd0c43, 1 | BRF_ESS | BRF_PRG }, //  0 68K code

Code: [Select]
static void kof10th_pdec()
{
int i, j, size = 0x800000;
UINT16 *prom = (UINT16*)Neo68KROM;
UINT16 *buf = (UINT16*)malloc(size);

memcpy(buf+0x000000/2, prom+0x600000/2, 0x100000);
memcpy(buf+0x100000/2, prom+0x000000/2, 0x600000);

for (i=0;i<size/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[0x08bf4/2] = 0x4EF9;
prom[0x08bf6/2] = 0x000D;
prom[0x08bf8/2] = 0xF980;
prom[0xe1154/2] = 0x125C;
prom[0xdf986/2] = 0x168C;
prom[0xdf998/2] = 0x1668;
prom[0xdd880/2] = 0x4E75;
prom[0xdd89e/2] = 0x4E75;
prom[0xdd8bc/2] = 0x4E75;
}

Quote from: Death Metal
Yay, finally some refreshing news about this driver. :p However, I have just tested this and unfortunately it doesn't seem to work with me either, although I get no Guru at no moment at all -- it just doesn't run the game; instead, it enters in that squared screen and stays there forever.

Well, this is the driver I'm using (already updated with Ferchogtx's code above), in case you guys might be wondering:

Code: [Select]
// The King of Fighters: 10th Anniversary (KOF2002 hack)

static struct BurnRomInfo kof10thRomDesc[] = {
{ "kf10-p1.bin" , 0x800000, 0xb1fd0c43, 1 | BRF_ESS | BRF_PRG }, //  0 68K code

struct BurnDriver BurnDrvKof10th = {
};

I'm not sure if I'm loading the C ROMs correctly, but I doubt it has anything to do with the current problem.

Anyway, thanks for posting that code, Ferch.
« Last Edit: May 10, 2005, 12:29:15 PM by iq_132 »

Offline FerchogtX

  • FBNeo Dev
  • ******
  • Posts: 375
  • Karma: +7/-0
  • FB Alpha Team ;)
    • FB Alpha Plus! Web Site
King of Fighters 10th Anniversary Edition Emulation Infos
« Reply #64 on: April 06, 2005, 09:10:29 PM »
Well, here the complete fully working driver, no pvc or weird things, just the real bankswitch and p decryption, also srom decryption and extraction.
BTW... it has only one bug... the neogeo logo screen looks a bit scrambled, but everithing else is right now
Thanks to IQ_132 for the info, drivers and help :)
Code: [Select]
// The King of Fighters 10th Anniversary (bootleg / hack)

static struct BurnRomInfo kof10thRomDesc[] = {
{"kf10-p1.bin",  0x800000, 0xB1FD0C43, 1 | BRF_ESS | BRF_PRG }, //  0 68K code (Is supposed to have the text data)

{"kf10-c1a.bin", 0x400000, 0x3BBC0364, 3 | BRF_GRA }, //  1 Sprite data
{"kf10-c2a.bin", 0x400000, 0x91230075, 3 | BRF_GRA }, //  2
{"kf10-c1b.bin", 0x400000, 0xB5ABFC28, 3 | BRF_GRA }, //  3
{"kf10-c2b.bin", 0x400000, 0x6CC4C6E1, 3 | BRF_GRA }, //  4
{"kf10-c3a.bin", 0x400000, 0x5B3D4A16, 3 | BRF_GRA }, //  5
{"kf10-c4a.bin", 0x400000, 0xC6F3419B, 3 | BRF_GRA }, //  6
{"kf10-c3b.bin", 0x400000, 0x9D2BBA19, 3 | BRF_GRA }, //  7
{"kf10-c4b.bin", 0x400000, 0x5A4050CB, 3 | BRF_GRA }, //  8
{"kf10-c5a.bin", 0x400000, 0xA289D1E1, 3 | BRF_GRA }, //  9
{"kf10-c6a.bin", 0x400000, 0xE6494B5D, 3 | BRF_GRA }, //  10
{"kf10-c5b.bin", 0x400000, 0x404FFF02, 3 | BRF_GRA }, //  11
{"kf10-c6b.bin", 0x400000, 0xF2CCFC9E, 3 | BRF_GRA }, //  12
{"kf10-c7a.bin", 0x400000, 0xBE79C5A8, 3 | BRF_GRA }, //  13
{"kf10-c8a.bin", 0x400000, 0xA5952CA4, 3 | BRF_GRA }, //  14
{"kf10-c7b.bin", 0x400000, 0x3FDB3542, 3 | BRF_GRA }, //  15
{"kf10-c8b.bin", 0x400000, 0x661B7A52, 3 | BRF_GRA }, //  16

  {"kf10-m1.bin",  0x020000, 0xF6FAB859, 4 | BRF_ESS | BRF_PRG }, //  17 Z80 code

{"kf10-v1.bin",  0x800000, 0x0FC9A58D, 5 | BRF_SND }, //  18 Sound data (Decrypted data from kof2002)
{"kf10-v2.bin",  0x800000, 0xB8C475A4, 5 | BRF_SND }, //  19
};

STDROMPICKEXT(kof10th, kof10th, neogeo);
STD_ROM_FN(kof10th);

// Thanks to IQ_132 for the whole help and drivers
// Thanks to BDiamond for this code
// This is essentially the standard Neo-Geo bankswitch
static void kof10thBankswitch(unsigned int nBank)
{
nBank = 0x100000 + ((nBank & 7) << 20);
if (nBank >= 0x700000) {
nBank = 0x100000;
}
if (nBank != nNeo68KROMBank) {
nNeo68KROMBank = nBank;
SekMapMemory(Neo68KROM + nNeo68KROMBank, 0x200000, 0x2FDFFF, SM_ROM);
}
}

void __fastcall kof10thWriteByteBankswitch(unsigned int sekAddress, unsigned char byteValue)
{
if (sekAddress >= 0x2FFFF0) {
kof10thBankswitch(byteValue);
return;
}
}

void __fastcall kof10thWriteWordBankswitch(unsigned int sekAddress, unsigned short wordValue)
{
if (sekAddress >= 0x2FFFF0) {
kof10thBankswitch(wordValue);
return;
}
}

static void kof10thDecrypt()
{
int i,j;
unsigned short *prom = (unsigned short*)Neo68KROM;
unsigned short *buf = (unsigned short*)malloc(0x800000);
unsigned short *srom = (unsigned short*)NeoTextROM + 0x20000;

// Re-order the P data
memcpy(buf+0x000000/2, prom+0x700000/2, 0x100000);
memcpy(buf+0x100000/2, prom+0x000000/2, 0x400000);
memcpy(buf+0x500000/2, prom+0x400000/2, 0x200000);

// decrypt all of the P data
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);

  // get 8x8 tiles from P rom, game does this on the fly!
  // bank 1
  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);
}
// bank 2
for (i=0;i<0x20000/2;i++) {
srom[i+0x40000/2]=BITSWAP16(prom[i+0x600000/2]^0xf3f3,7,6,0,4,3,2,1,5,15,14,8,12,11,10,9,13);
}

memcpy(NeoTextROM+0x80000, NeoTextROM+0x40000, 0x20000);

// Altera protection chip patches these over P ROM
prom[0x00124/2] = 0x000d; // Run code that gives XOR for RAM moves and forces SoftDIPs
prom[0x00126/2] = 0xf7a8; // (how to play off and always teamplay). Also forces USA region.
prom[0x08bf4/2] = 0x4ef9; // Run code to change 8x8 tiles (needed for neogeo logo tiles)
prom[0x08bf6/2] = 0x000d;
prom[0x08bf8/2] = 0xf980;

// remove protection (game has ram mapped to 0xe0000 and 0xf0000 and moves code into it)
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[0xe1154/2] = 0x125c; // fix a jmp offset (was in 0xe0000 range)
prom[0xdf986/2] = 0x168C; // fix a bsr offset (was in 0xe0000 range)
prom[0xdf998/2] = 0x1668; // fix a bsr offset (was in 0xe0000 range)
prom[0xdd880/2] = 0x4e75; // fix level drawing   (from 0xf0000 range)
prom[0xdd89e/2] = 0x4e75; // fix level anim      (from 0xf0000 range)
prom[0xdd8bc/2] = 0x4e75; // fix continue screen (from 0xf0000 range)
}

// Blank P-ROM bank in the following address (similar to cthd2003)
void Neokof10thMapBank()
{
SekMapMemory(Neo68KROM + nNeo68KROMBank, 0x200000, 0x2FDFFF, SM_ROM);
}

static int kof10thInit()
{
int nRet;

pNeoInitCallback = kof10thDecrypt;
pNeoBankswitchCallback = Neokof10thMapBank;
nNeoTextROMSize = 0x080000; // minor glitches in Neo-Geo logo texts

nRet = NeoInit();
if (nRet == 0) {
SekOpen(0);
// Extra RAM
SekMapMemory(Neo68KROM+0x700000, 0x2fe000, 0x2fffff, SM_RAM);

// Bankswitch handler
SekMapHandler(4, 0x2ffff0, 0x2fffff, SM_WRITE);
SekSetWriteWordHandler(4, kof10thWriteWordBankswitch);
SekSetWriteByteHandler(4, kof10thWriteByteBankswitch);

kof10thBankswitch(0);

SekClose();
}
return nRet;
}

struct BurnDriver BurnDrvkof10th = {
"kof10th", "kof2002", "neogeo", "2004",
"The King of Fighters 10th Anniversary\0", "Hack of \"The King of Fighters 2002\"", "SNK Playmore", "Neo Geo",
NULL, NULL, NULL, NULL,
BDF_GAME_WORKING | BDF_BOOTLEG, 2, HARDWARE_SNK_NEOGEO,
NULL, kof10thRomInfo, kof10thRomName, neogeoInputInfo, neogeoDIPInfo,
kof10thInit, NeoExit, NeoFrame, NeoRender, NeoScan, &NeoRecalcPalette,
nNeoScreenWidth, 224, 4, 3
};

Enjoy ;)
See ya!!!!!! :D
P.D. The reset bug is fixed here XD... SURPRISE!!! :D

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 James33

  • Expert
  • *****
  • Posts: 532
  • Karma: +3/-0
  • The Mame Man
    • Emulation Zone
King of Fighters 10th Anniversary Edition Emulation Infos
« Reply #65 on: April 06, 2005, 10:37:41 PM »
Great work A job well done :)
IQ Forum Member

Offline iq_132

  • Administrator
  • *****
  • Posts: 3724
  • Karma: +411/-0
  • Definitely not Dink!
    • NeoSource
King of Fighters 10th Anniversary Edition Emulation Infos
« Reply #66 on: April 07, 2005, 01:13:22 AM »
Nice work Ferchogtx :)  I'm glad you fixed that reset bug.


Offline bms888

  • Jr. Member
  • **
  • Posts: 93
  • Karma: +0/-0
  • Member
King of Fighters 10th Anniversary Edition Emulation Infos
« Reply #67 on: April 07, 2005, 01:35:55 AM »
Good,but I use this order,have some diff in game.same as HappyASR fixed wk154 now.

Code: [Select]

        // Re-order the P data
        memcpy(buf+0x000000/2, prom+0x600000/2, 0x100000);
        memcpy(buf+0x100000/2, prom+0x000000/2, 0x600000);

Offline James33

  • Expert
  • *****
  • Posts: 532
  • Karma: +3/-0
  • The Mame Man
    • Emulation Zone
King of Fighters 10th Anniversary Edition Emulation Infos
« Reply #68 on: April 07, 2005, 08:14:32 AM »
Quote from: bms888
Good,but I use this order,have some diff in game.same as HappyASR fixed wk154 now.

Code: [Select]

        // Re-order the P data
        memcpy(buf+0x000000/2, prom+0x600000/2, 0x100000);
        memcpy(buf+0x100000/2, prom+0x000000/2, 0x600000);



Where would you put that code ?
IQ Forum Member

Offline James33

  • Expert
  • *****
  • Posts: 532
  • Karma: +3/-0
  • The Mame Man
    • Emulation Zone
King of Fighters 10th Anniversary Edition Emulation Infos
« Reply #69 on: April 07, 2005, 08:20:08 AM »
Quote from: bms888
Good,but I use this order,have some diff in game.same as HappyASR fixed wk154 now.

Code: [Select]

        // Re-order the P data
        memcpy(buf+0x000000/2, prom+0x600000/2, 0x100000);
        memcpy(buf+0x100000/2, prom+0x000000/2, 0x600000);


Is that the same as the code that is used in Mame ?

Code: [Select]

        ROM_REGION( 0x800000, REGION_CPU1, 0 )
ROM_LOAD16_WORD_SWAP( "kf10-p1.bin", 0x100000, 0x600000, CRC(b1fd0c43) SHA1(5f842a8a27be2d957fd4140d6431ae47154997bb) )
ROM_CONTINUE(                        0x000000, 0x100000 )
ROM_CONTINUE(                        0x700000, 0x100000 )
IQ Forum Member

Offline FerchogtX

  • FBNeo Dev
  • ******
  • Posts: 375
  • Karma: +7/-0
  • FB Alpha Team ;)
    • FB Alpha Plus! Web Site
King of Fighters 10th Anniversary Edition Emulation Infos
« Reply #70 on: April 07, 2005, 08:38:52 PM »
Quote from: bms888
Good,but I use this order,have some diff in game.same as HappyASR fixed wk154 now.

Code: [Select]

        // Re-order the P data
        memcpy(buf+0x000000/2, prom+0x600000/2, 0x100000);
        memcpy(buf+0x100000/2, prom+0x000000/2, 0x600000);

What diff? game play?, hidden moves or what?  :eek:
See ya!!!!! :D

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 bms888

  • Jr. Member
  • **
  • Posts: 93
  • Karma: +0/-0
  • Member
King of Fighters 10th Anniversary Edition Emulation Infos
« Reply #71 on: April 07, 2005, 08:56:36 PM »
Quote from: FerchogtX
What diff? game play?, hidden moves or what?  :eek:
See ya!!!!! :D


Yes. you can select IORI to play,then you known.^_^

maybe this order same as real ARC(someone tell me).

Offline bms888

  • Jr. Member
  • **
  • Posts: 93
  • Karma: +0/-0
  • Member
King of Fighters 10th Anniversary Edition Emulation Infos
« Reply #72 on: April 07, 2005, 09:04:40 PM »
Your code is very long, I use pvc code for this game.maybe short.^_^

Code: [Select]

// The King of Fighters 10th Anniversary (bootleg / hack)

static struct BurnRomInfo kof10thRomDesc[] = {
{"kf10-p1.bin",  0x800000, 0xB1FD0C43, 1 | BRF_ESS | BRF_PRG }, //  0 68K code (Is supposed to have the text data)

{"kf10-c1a.bin", 0x400000, 0x3BBC0364, 3 | BRF_GRA }, //  1 Sprite data
{"kf10-c2a.bin", 0x400000, 0x91230075, 3 | BRF_GRA }, //  2
{"kf10-c1b.bin", 0x400000, 0xB5ABFC28, 3 | BRF_GRA }, //  3
{"kf10-c2b.bin", 0x400000, 0x6CC4C6E1, 3 | BRF_GRA }, //  4
{"kf10-c3a.bin", 0x400000, 0x5B3D4A16, 3 | BRF_GRA }, //  5
{"kf10-c4a.bin", 0x400000, 0xC6F3419B, 3 | BRF_GRA }, //  6
{"kf10-c3b.bin", 0x400000, 0x9D2BBA19, 3 | BRF_GRA }, //  7
{"kf10-c4b.bin", 0x400000, 0x5A4050CB, 3 | BRF_GRA }, //  8
{"kf10-c5a.bin", 0x400000, 0xA289D1E1, 3 | BRF_GRA }, //  9
{"kf10-c6a.bin", 0x400000, 0xE6494B5D, 3 | BRF_GRA }, //  10
{"kf10-c5b.bin", 0x400000, 0x404FFF02, 3 | BRF_GRA }, //  11
{"kf10-c6b.bin", 0x400000, 0xF2CCFC9E, 3 | BRF_GRA }, //  12
{"kf10-c7a.bin", 0x400000, 0xBE79C5A8, 3 | BRF_GRA }, //  13
{"kf10-c8a.bin", 0x400000, 0xA5952CA4, 3 | BRF_GRA }, //  14
{"kf10-c7b.bin", 0x400000, 0x3FDB3542, 3 | BRF_GRA }, //  15
{"kf10-c8b.bin", 0x400000, 0x661B7A52, 3 | BRF_GRA }, //  16

  {"kf10-m1.bin",  0x020000, 0xF6FAB859, 4 | BRF_ESS | BRF_PRG }, //  17 Z80 code

{"kf10-v1.bin",  0x800000, 0x0FC9A58D, 5 | BRF_SND }, //  18 Sound data (Decrypted data from kof2002)
{"kf10-v2.bin",  0x800000, 0xB8C475A4, 5 | BRF_SND }, //  19
};

STDROMPICKEXT(kof10th, kof10th, neogeo);
STD_ROM_FN(kof10th);

static void kof10th_decode()
{
int i, j, size = 0x800000;
UINT16 *prom = (UINT16*)Neo68KROM;
UINT16 *buf = (UINT16*)malloc(size);
UINT16 *srom = (UINT16*)NeoTextROM+0x20000;

// HappyASR fixed order
memcpy(buf+0x000000/2, prom+0x600000/2, 0x100000);
memcpy(buf+0x100000/2, prom+0x000000/2, 0x600000);

// Re-order the P data
// memcpy(buf+0x000000/2, prom+0x700000/2, 0x100000);
// memcpy(buf+0x100000/2, prom+0x000000/2, 0x400000);
// memcpy(buf+0x500000/2, prom+0x400000/2, 0x200000);

for (i=0;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<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);
}
for (i=0;i<0x20000/2;i++) {
srom[i+0x40000/2]=BITSWAP16(prom[i+0x600000/2]^0xf3f3,7,6,0,4,3,2,1,5,15,14,8,12,11,10,9,13);
}

memcpy(NeoTextROM+0x80000, NeoTextROM+0x40000, 0x20000);

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; // Run code that gives XOR for RAM moves and forces SoftDIPs
prom[0x00126/2] = 0xF7A8; // (how to play off and always teamplay). Also forces USA region.
prom[0x08bf4/2] = 0x4Ef9; // Run code to change 8x8 tiles (needed for neogeo logo tiles)
prom[0x08bf6/2] = 0x000D;
prom[0x08bf8/2] = 0xF980;
prom[0xe1154/2] = 0x125C;
prom[0xdf986/2] = 0x168C;
prom[0xdf998/2] = 0x1668;
prom[0xdd880/2] = 0x4E75;
prom[0xdd89e/2] = 0x4E75;
prom[0xdd8bc/2] = 0x4E75;
}

// Thanks to HappyASR for the info
void __fastcall kf10thWriteByteBankSwitch(unsigned int sekAddress, unsigned char byteValue)
{
pvc_w8(sekAddress,byteValue);
}

void __fastcall kf10thWriteWordBankSwitch(unsigned int sekAddress, unsigned short wordValue)
{
CartRAM[(sekAddress-0x2fe000)/2]=wordValue;
if(sekAddress==0x2ffff0)
SekMapMemory(Neo68KROM+0x100000+wordValue*0x100000,0x200000,0x2fdfff,SM_ROM);
}

static void kof10thMapHandler()
{
// Install BankSwitch handler
SekMapHandler(5, 0x2fe000, 0x2fffff, SM_READ);
SekSetReadWordHandler(5,  pvcReadWordBankSwitch);
SekSetReadByteHandler(5,  pvcReadByteBankSwitch);

SekMapHandler(5, 0x2fe000, 0x2fffff, SM_WRITE);
SekSetWriteWordHandler(5, kf10thWriteWordBankSwitch);
SekSetWriteByteHandler(5, kf10thWriteByteBankSwitch);
}

static int kof10thInit()
{
int nRet;

memset(CartRAM,0,sizeof(CartRAM));

pNeoInitCallback = kof10th_decode;
nNeoTextROMSize = 0x080000; // minor glitches in Neo-Geo logo texts

nRet = NeoInit();
if (nRet == 0) {
kof10thMapHandler();
}
return nRet;
}

struct BurnDriver BurnDrvkof10th = {
"kof10th", "kof2002", "neogeo", "2004",
"The King of Fighters 10th Anniversary (hack)\0", "Hack of \"The King of Fighters 2002\"", "SNK Playmore", "Neo Geo",
NULL, NULL, NULL, NULL,
BDF_GAME_WORKING | BDF_BOOTLEG, 2, HARDWARE_SNK_NEOGEO | HARDWARE_SNK_CUSTOM_BANKING,
NULL, kof10thRomInfo, kof10thRomName, neogeoInputInfo, neogeoDIPInfo,
kof10thInit, NeoExit, NeoFrame, NeoRender, NeoScan, &NeoRecalcPalette,
nNeoScreenWidth, 224, 4, 3
};

Offline bms888

  • Jr. Member
  • **
  • Posts: 93
  • Karma: +0/-0
  • Member
King of Fighters 10th Anniversary Edition Emulation Infos
« Reply #73 on: April 07, 2005, 09:07:16 PM »
In fact,HappyASR fixed order same as tc_china MAME drv.^_^

Offline bms888

  • Jr. Member
  • **
  • Posts: 93
  • Karma: +0/-0
  • Member
King of Fighters 10th Anniversary Edition Emulation Infos
« Reply #74 on: April 07, 2005, 10:15:58 PM »
Two order can also working. but the second order maybe have small bug,sometimes we have to press F3 to continue coin(only in FBA,mame not have this problem).