Welcome!

Final Burn Neo => FBN Development => Topic started by: iq_132 on November 09, 2004, 06:14:47 AM

Title: King of Fighters 2003, The
Post by: iq_132 on November 09, 2004, 06:14:47 AM
Hmm.. On some forum I was reading, someone (I don't remember who) said that maybe the P roms where interleaved.
What I mean by this is that byte 1 comes from p1.bin, byte 2 comes from p2.bin, byte 3 comes from p1.bin, byte 4 comes from p2.bin and so on.
I'm quite positive now that they are.  If you save the rom generated by this code and open it in a hex editor, you'll see (though a bit scrambled) the standard neo-geo P rom header.

Also, I'm quite positive that the p3d is loaded either after the p1 & p2, or OVER the dummy sections at the end.  It should be loaded as the second mb of the P data.

Now.. on to the 271-bios.  I'm almost positive this is loaded like the bios used by irritating maze. Not like an SMA rom (used by garou, kof2k, etc).

Here's my preliminary Driver.
THIS DOES NOT WORK
It's just here to provide information.

Code: [Select]
// The King of Fighters 2003

static struct BurnRomInfo kof2003RomDesc[] = {
{"271-p1.bin",   0x400000, 0xb9da070c, 0x10}, //  0 68K code
{"271-p2.bin",   0x400000, 0xda3118c4, 0x10}, //  1

{"271-c1d.bin", 0x1000000, 0xC29ACD28,    1}, //  2 Sprite data
{"271-c2d.bin", 0x1000000, 0x328E80B1,    1}, //  3
{"271-c3d.bin", 0x1000000, 0x020A11F1,    1}, //  4
{"271-c4d.bin", 0x1000000, 0x991B5ED2,    1}, //  5
{"271-c5d.bin", 0x1000000, 0xc2de8b66,    1}, //  6 // Contains S data Only
{"271-c6d.bin", 0x1000000, 0x3ff750db,    1}, //  7 // Contains S data Only

{"271-m1d.bin", 0x080000, 0x0E86AF8F, 0x10}, //  8 Z80 code

{"271-v1d.bin", 0x1000000, 0x2058EC5E,    2}, //  9 Sound data

// {"271-p3.bin",   0x100000, 0x5cefd0d2, 0x10}, //  10 encrypted - Don't load
{"271-p3d.bin",  0x100000, 0x59d376da, 0x10}, //  10 decrypted
};

STDROMPICKEXT(kof2003, kof2003, neogeo);
STD_ROM_FN(kof2003);

static void interleave_ps()
{
// Interleave P1 and P2 (not quite correct)
int j=0,i;
unsigned char* src = Neo68KROM01;
unsigned char* dst = (unsigned char*)malloc(0x800000);
for (i=0;i<0x800000;i=i+2){
dst[i+0]=src[j];
dst[i+1]=src[j+0x400000];
j=j++;
}
memcpy(Neo68KROM01,dst,0x800000);

// Load P3d in one of the dummy sections (the last 1mb)
BurnLoadRom(Neo68KROM01+0x700000, 10, 0);

// Make P3d -> 2nd mb
src = Neo68KROM01+0x100000;
dst = (unsigned char*)malloc(0x700000);
int sec[] = {0x600000,0x000000,0x100000,0x200000,0x300000, 0x400000,0x500000};

if (dst)
{
memcpy(dst,src,0x700000);
for(i = 0; i < 7; ++i)
{
memcpy(src+i*0x100000,dst+sec[i],0x100000);
}
}
free(dst);
}

static int kof2003Init()
{
pNeoInitCallback=interleave_ps;
return NeoInit();
}

struct BurnDriver BurnDrvkof2003 = {

{"kof2003", "The King of Fighters 2003", "Preliminary Driver - Not Working", "SNK Playmore Corporation", "Neo Geo", "2003", NULL, "neogeo"},
0, 2, HARDWARE_SNK_NEOGEO,
NULL, kof2003RomInfo, kof2003RomName, neogeoInputInfo, neogeoDIPInfo,
kof2003Init, NeoExit, NeoFrame, NeoRender, NeoScan, &NeoRecalcPalette,
nNeoScreenWidth, 224, 4, 3
};
Title: King of Fighters 2003, The
Post by: James33 on November 09, 2004, 10:06:50 AM
Nice info :) And it is a good start .
Title: King of Fighters 2003, The
Post by: hotaru on November 09, 2004, 01:22:36 PM
that info was posted on the one and only bbs.romshare.net ;)
Title: King of Fighters 2003, The
Post by: DethXec on December 01, 2004, 09:13:37 PM
News about this driver?
Title: King of Fighters 2003, The
Post by: iq_132 on December 24, 2004, 11:21:11 PM
I got it working :D

You need to follow the instructions.htm to the letter.  I've tested and retested this.  It does work, and the instructions are correct.
If it doesn't work for you, try it again, because you've done something wrong.

*note that there are two versions of the driver.  The instructions explain the diff.
Also, if you've seen Jimmy_Page's recent build of FBA, this is the code he's using.


*btw, Merry Christmas everyone :D
Title: King of Fighters 2003, The
Post by: JiMMy_PaGe on December 25, 2004, 01:21:03 AM
I thinks its a good xmas present for the people xDDDDD
Thanks again iq, ur codes rocks
Btw, all roms are working on fba now, dont u think its time to someone realease the mv0 proto bank code? Ur code rocks, but i think mv0 proto code will be better :D :D
See ya and thanks again bro for all ur help before this release :D
Title: King of Fighters 2003, The
Post by: James33 on December 25, 2004, 10:09:35 PM
Nice :D  But for some reason the Zoom effect does not seem to work ,
Title: King of Fighters 2003, The
Post by: iq_132 on December 26, 2004, 04:34:15 AM
Which version of the kf2k3fix.cpp are you using James?
I haven't played this one much (I don't like the kof series much :|), so I don't know when/where the zoom effects are.
Title: King of Fighters 2003, The
Post by: James33 on December 26, 2004, 08:18:50 PM
I used the smaller one .The zoom effect happens right when it goes to the fight just after you have made your player selection
Title: King of Fighters 2003, The
Post by: iq_132 on December 26, 2004, 09:09:12 PM
This zoom effect?
Title: King of Fighters 2003, The
Post by: James33 on December 26, 2004, 11:11:18 PM
Yes :D
Title: King of Fighters 2003, The
Post by: iq_132 on December 26, 2004, 11:26:51 PM
That's strange... I'm using the small version and took that video when running it...
Title: King of Fighters 2003, The
Post by: DsNo on December 27, 2004, 03:51:26 AM
Quote from: iq_132
That's strange... I'm using the small version and took that video when running it...

I'm using the small version too. That's perfectly work!!
Title: King of Fighters 2003, The
Post by: James33 on December 27, 2004, 10:46:37 AM
Yes it seems so But I notice it more in Mame though.
Title: King of Fighters 2003, The
Post by: FerchogtX on December 27, 2004, 08:28:39 PM
Correction for the text fix type code in IQ's html:
Look for this:
Code: [Select]
BurnLoadRom(NeoTextROM + 0x020000, pInfo->nTextOffset, 1);Add this after:
Code: [Select]
/* Original code for MAME by fataku */
if (nNeoTextROMFixType == 1) {
       unsigned char* srom = NeoTextROM+0x20000;
       for (int i=0;i < 0x20000;i++) {
        srom[i]=BITSWAP08(srom[i],3,2,4,5,1,6,0,7);
       }
}
/* Original code from mame traduced by FerchogtX */
if (nNeoTextROMFixType == 2) {
/* Descrambling S1 by FerchogtX, bassed on DorriGa's code */
unsigned char* srom = NeoTextROM+0x20000;
unsigned char* dst = (unsigned char*)malloc(0x20000);
memcpy( dst+0x00000, srom+0x10000, 0x10000 );
memcpy( dst+0x10000, srom+0x00000, 0x10000 );
memcpy( srom, dst, 0x20000 );
free(dst);
}
/* Thanks also to HappyASR for the info */
if (nNeoTextROMFixType == 3) {
unsigned char* srom = NeoTextROM+0x20000;
unsigned char* dst = (unsigned char*)malloc(0x20000);
if (dst)
{
memcpy(dst,srom,0x20000);
// descrambling the S1 by dorriGa
for (int j=0;j < 0x20000 ; j+=0x000010)
{
memcpy(srom+j, dst+j+0x000008,8);
memcpy(srom+j+0x000008, dst+j,8);
}
}
free(dst);
}
/* Thanks to Badzou for the info */
if (nNeoTextROMFixType == 4) {
/* Descrambling S1 by dorriga */
unsigned char* srom = NeoTextROM+0x20000;
unsigned char* dst = (unsigned char*)malloc(0x80000);
memcpy( dst+0x00000, srom+0x60000, 0x20000 );
memcpy( dst+0x20000, srom+0x40000, 0x20000 );
memcpy( dst+0x40000, srom+0x20000, 0x20000 );
memcpy( dst+0x60000, srom+0x00000, 0x20000 );
memcpy( srom, dst, 0x80000 );
free(dst);
}
// Converted by Jimmy_Page (www.neofighters.com)
if (nNeoTextROMFixType == 5) {
       unsigned char* srom = NeoTextROM+0x20000;
       for (int i=0;i < 0x20000;i++) {
        srom[i]=BITSWAP08(srom[i],7,6,0,4,3,2,1,5);
       }
}
NOW look for this:
Code: [Select]
// Extract data from the end of C ROMS
BurnUpdateProgress(0.0, "Generating text layer graphics...", 0);
NeoExtractSData(NeoSpriteROM, NeoTextROM + 0x020000, nSpriteSize, nNeoTextROMSize);
add only this one after (because is only used by svc)
Code: [Select]
// Original conversion by IQ_132 (This is for svcchaos, kof2003, and clones)
if (nNeoTextROMFixType == 6) {
unsigned char* srom = NeoTextROM+0x20000;
for( int i=0;i < nNeoTextROMSize;i++ ){
srom[i]=BITSWAP08(srom[i]^0xd2,4,0,7,2,5,1,6,3);
}
}
Just to fix that, if you add the othe code the games that use scrambled s1 roms won't work XD
See ya!!!! :D
P.D. Great, Great, GREAT WORK IQ!!!!!! an hurray for this!!!!
hip hip HURRAYYYY!!!!!!  :D  :D
Title: King of Fighters 2003, The
Post by: iq_132 on December 27, 2004, 11:14:11 PM
Quote from: FerchogtX
Just to fix that, if you add the othe code the games that use scrambled s1 roms won't work XD

Actually, I'm using this exact code:
Code: [Select]
// Load Text layer tiledata
{
// Load boardROM data
BurnLoadRom(NeoTextROM, 0x00080 + 0x14, 1);

if (pInfo->nTextOffset != -1) {
// Load S ROM data
BurnLoadRom(NeoTextROM + 0x020000, pInfo->nTextOffset, 1);
} else {
// Extract data from the end of C ROMS
BurnUpdateProgress(0.0, "Generating text layer graphics...", 0);
NeoExtractSData(NeoSpriteROM, NeoTextROM + 0x020000, nSpriteSize, nNeoTextROMSize);

// Save "S" data
if (bsavedecrypteds1 == 1) {
FILE* fp = fopen("xxx_s_rom.bin", "wb");
if (fp) {
fwrite(NeoTextROM + 0x020000, 1, nNeoTextROMSize, fp);
fclose(fp);
}
}
}

/* Original code from mame - converted by FerchogtX */
switch (nNeoTextROMFixType) {
unsigned char *srom;
unsigned char *dst;

case 1:
/* Thanks also to HappyASR for the info */
srom = NeoTextROM + 0x20000;
dst  = (unsigned char *)malloc(0x20000);
if (dst) {
memcpy(dst, srom, 0x20000);
// descrambling the S1 by dorriGa
for (int j = 0; j < 0x20000 ; j += 0x000010) {
memcpy(srom + j, dst + j + 0x000008, 8);
memcpy(srom + j + 0x000008, dst + j, 8);
}
}
free(dst);
break;

case 2:
/* Thanks to Badzou for the info */
/* Descrambling S1 by dorriga */
srom = NeoTextROM + 0x20000;
dst  = (unsigned char*)malloc(0x80000);
memcpy(dst + 0x00000, srom + 0x60000, 0x20000);
memcpy(dst + 0x20000, srom + 0x40000, 0x20000);
memcpy(dst + 0x40000, srom + 0x20000, 0x20000);
memcpy(dst + 0x60000, srom + 0x00000, 0x20000);
memcpy(srom, dst, 0x80000);
free(dst);
break;

case 3:
/* Descrambling S1 by FerchogtX, based on DorriGa's code */
srom = NeoTextROM+0x20000;
dst = (unsigned char*)malloc(0x20000);
memcpy( dst+0x00000, srom+0x10000, 0x10000 );
memcpy( dst+0x10000, srom+0x00000, 0x10000 );
memcpy( srom, dst, 0x20000 );
free(dst);
break;

case 4:
/* Original code for MAME by fataku */
/* This is for kf2k1pla */
       srom = NeoTextROM+0x20000;
       for (int i=0;i<0x20000;i++)
       srom[i]=BITSWAP08(srom[i],3,2,4,5,1,6,0,7);
break;

case 5:
/* Original code taken from MAME */
/* This is for CTHD2003 */
srom = NeoTextROM+0x20000;
dst = (unsigned char*)malloc(0x10000);
memcpy(dst+0x00000,srom+0x10000,0x08000);
memcpy(dst+0x08000,srom+0x08000,0x08000);
memcpy(srom+0x08000,dst,0x10000);
free(dst);
break;
case 6:
// Converted by Jimmy_Page
srom = NeoTextROM+0x20000;
       for (int i=0;i<0x20000;i++)
       srom[i]=BITSWAP08(srom[i],7,6,0,4,3,2,1,5);
break;
case 7:
srom = NeoTextROM+0x20000;  
       for (int i=0;i srom[i]=BITSWAP08(srom[i]^0xd2,4,0,7,2,5,1,6,3 );
break;
case 8:
       // thanks to dorriGa and arnoldso for analyze the scramble
       srom = NeoTextROM+0x20000;
       dst = (unsigned char*)malloc(0x40000);
       int j;

       for (int i=0;i<0x40000;i++){
           j=BITSWAP24(i,23,22,21,20,19,18,17,9,8,10,11,0,5,4,3,2,1,6,7,13,16,12,14,15);
           dst[j]=srom[i];
       }
memcpy( srom, dst, 0x40000 );
free( dst );

break;

}
/* Save S1 roms */
if (bsavedecrypteds1 == 1) {
FILE* fp = fopen("xxx_s_rom.bin", "wb");
if (fp) {
fwrite(NeoTextROM + 0x020000, 1, nNeoTextROMSize, fp);
fclose(fp);
}
}
}

And the S descrambling works fine.
Title: King of Fighters 2003, The
Post by: FerchogtX on December 28, 2004, 07:57:12 PM
You mean that ct2003sp s1 rom is working fine with your code? you are using the 256 KB s1 ROM... right?
See ya!!!!! :D
Title: King of Fighters 2003, The
Post by: iq_132 on December 28, 2004, 10:02:39 PM
Quote from: FerchogtX
You mean that ct2003sp s1 rom is working fine with your code? you are using the 256 KB s1 ROM... right?
See ya!!!!! :D

Well... the cthd2003sp S decryption doesn't work for me either, but the rest of those do.
Title: King of Fighters 2003, The
Post by: JiMMy_PaGe on December 28, 2004, 10:18:11 PM
In fact ct2k3sp 256kb  s1 is a fake by someone....
The real s1 is the first 128kb chunk of it, and if u see the second chunk is the same as the first one (james33 said it some days before too) :D
Im using this code, but the s1 has a glitch on the game's logo:
Code: [Select]
   /*Original Code by Halrin, Converted by JiMMy_PaGe
            This is for cthd2003 super plus s1*/
case 8:
                                srom = NeoTextROM+0x20000;
                       dst  = (unsigned char*)malloc( 0x20000 );
                                int i, j;
                          memcpy( dst, srom, 0x20000 );
                              for( i = 0; i < 0x20000; i++ ){
               j= BITSWAP24( (i & 0x1ffff), 23, 22, 21, 20, 19, 18, 17,  3,
 0,  1,  4,  2, 13, 14, 15, 16,
 5,  6, 11, 10,  9,  8,  7, 12 );

                      j += (i >> 17) << 17;
                  srom[i] = dst[j];
                              }
                        free( dst );
                                break:
Title: King of Fighters 2003, The
Post by: fataku on December 29, 2004, 12:38:00 PM
Quote from: Jimmy_Page
In fact ct2k3sp 256kb  s1 is a fake by someone....
The real s1 is the first 128kb chunk of it, ...

 :rolleyes: you are WRONG
Title: King of Fighters 2003, The
Post by: FerchogtX on December 29, 2004, 12:42:14 PM
Quote from: fataku
:rolleyes: you are WRONG

I hate to admit it XD, but the s1 is of 256 KB, not 128, the real chip that stores this data in the bootleg has that size of data...
:( See ya!!!! :(
Title: King of Fighters 2003, The
Post by: XorXe on December 29, 2004, 02:14:13 PM
Hi guys i have a troubles only see the images

(http://galeon.com/xorxe/kof20033.png)

(http://galeon.com/xorxe/kof20031.png)

(http://galeon.com/xorxe/kof20032.png)

And i use the small version of k2k3fix.cpp
Title: King of Fighters 2003, The
Post by: iq_132 on December 29, 2004, 02:39:24 PM
Use a different bios (I'm assuming you're using the a Jap bios).  I bet it works perfectly with unibios or US/ASIA bios.
Title: King of Fighters 2003, The
Post by: FerchogtX on December 29, 2004, 06:47:30 PM
have you tried with big version? tht's the one we all use and works just fine, just remember to do a clean compile after replacing the small version with the big one
See ya!!!! :D
Title: King of Fighters 2003, The
Post by: JiMMy_PaGe on December 29, 2004, 08:46:02 PM
Quote from: fataku
:rolleyes: you are WRONG

thats very strange  :confused:
Why a bootleg board would use two 128k s1 with the same data ?
But u always have good infos.... so i cant doubt from what u say  ;)
Any way i will keep using the first chunk of it.... because it works good
see ya
Title: King of Fighters 2003, The
Post by: PRican25 on December 29, 2004, 10:33:35 PM
i'm getting probs trying to compile:
Code: [Select]
src/burn/neogeo/d_neogeo.cpp: In function `void cthd2003_c()':
src/burn/neogeo/d_neogeo.cpp:7579: warning: `void cthd2003_c()' was declared
   `extern' and later `static'
src/burn/neogeo/neogeo.h:33: warning: previous declaration of `void
   cthd2003_c()'
src/burn/neogeo/d_neogeo.cpp: In function `void cthd2003_c()':
src/burn/neogeo/d_neogeo.cpp:7581: warning: suggest parentheses around
   assignment used as truth value
src/burn/neogeo/d_neogeo.cpp: In function `void interleave_pdata()':
src/burn/neogeo/d_neogeo.cpp:8393: redefinition of `void interleave_pdata()'
src/burn/neogeo/d_neogeo.cpp:8154: `void interleave_pdata()' previously defined

   here
src/burn/neogeo/d_neogeo.cpp:8393: redefinition of `void interleave_pdata()'
src/burn/neogeo/d_neogeo.cpp:8154: `void interleave_pdata()' previously defined

   here
src/burn/neogeo/d_neogeo.cpp: In function `void kof2003_px_decrypt()':
src/burn/neogeo/d_neogeo.cpp:8464: call of overloaded `interleave_pdata()' is
   ambiguous
src/burn/neogeo/d_neogeo.cpp:8154: candidates are: void interleave_pdata()
src/burn/neogeo/d_neogeo.cpp:8393:                 void interleave_pdata()
src/burn/neogeo/d_neogeo.cpp: At global scope:
src/burn/neogeo/d_neogeo.cpp:8584: redefinition of `short unsigned int
   kof2003b_tbl[4096]'
src/burn/neogeo/d_neogeo.cpp:8480: `short unsigned int kof2003b_tbl[4096]'
   previously declared here
src/burn/neogeo/d_neogeo.cpp: In function `unsigned char
   kof2003bReadByteBankSwitch(unsigned int)':
src/burn/neogeo/d_neogeo.cpp:8588: redefinition of `unsigned char
   kof2003bReadByteBankSwitch(unsigned int)'
src/burn/neogeo/d_neogeo.cpp:8483: `unsigned char
   kof2003bReadByteBankSwitch(unsigned int)' previously defined here
src/burn/neogeo/d_neogeo.cpp:8588: redefinition of `unsigned char
   kof2003bReadByteBankSwitch(unsigned int)'
src/burn/neogeo/d_neogeo.cpp:8483: `unsigned char
   kof2003bReadByteBankSwitch(unsigned int)' previously defined here
src/burn/neogeo/d_neogeo.cpp: In function `short unsigned int
   kof2003bReadWordBankSwitch(unsigned int)':
src/burn/neogeo/d_neogeo.cpp:8594: redefinition of `short unsigned int
   kof2003bReadWordBankSwitch(unsigned int)'
src/burn/neogeo/d_neogeo.cpp:8488: `short unsigned int
   kof2003bReadWordBankSwitch(unsigned int)' previously defined here
src/burn/neogeo/d_neogeo.cpp:8594: redefinition of `short unsigned int
   kof2003bReadWordBankSwitch(unsigned int)'
src/burn/neogeo/d_neogeo.cpp:8488: `short unsigned int
   kof2003bReadWordBankSwitch(unsigned int)' previously defined here
src/burn/neogeo/d_neogeo.cpp: In function `void
   kof2003bWriteBankSwitch(unsigned int, short unsigned int, short unsigned
   int)':
src/burn/neogeo/d_neogeo.cpp:8599: redefinition of `void
   kof2003bWriteBankSwitch(unsigned int, short unsigned int, short unsigned
   int)'
src/burn/neogeo/d_neogeo.cpp:8493: `void kof2003bWriteBankSwitch(unsigned int,
   short unsigned int, short unsigned int)' previously defined here
src/burn/neogeo/d_neogeo.cpp:8599: redefinition of `void
   kof2003bWriteBankSwitch(unsigned int, short unsigned int, short unsigned
   int)'
src/burn/neogeo/d_neogeo.cpp:8493: `void kof2003bWriteBankSwitch(unsigned int,
   short unsigned int, short unsigned int)' previously defined here
src/burn/neogeo/d_neogeo.cpp: In function `void
   kof2003bWriteWordBankSwitch(unsigned int, short unsigned int)':
src/burn/neogeo/d_neogeo.cpp:8612: redefinition of `void
   kof2003bWriteWordBankSwitch(unsigned int, short unsigned int)'
src/burn/neogeo/d_neogeo.cpp:8506: `void kof2003bWriteWordBankSwitch(unsigned
   int, short unsigned int)' previously defined here
src/burn/neogeo/d_neogeo.cpp:8612: redefinition of `void
   kof2003bWriteWordBankSwitch(unsigned int, short unsigned int)'
src/burn/neogeo/d_neogeo.cpp:8506: `void kof2003bWriteWordBankSwitch(unsigned
   int, short unsigned int)' previously defined here
src/burn/neogeo/d_neogeo.cpp:8614: call of overloaded `kof2003bWriteBankSwitch(
   unsigned int&, short unsigned int&, short unsigned int&)' is ambiguous
src/burn/neogeo/d_neogeo.cpp:8493: candidates are: void
   kof2003bWriteBankSwitch(unsigned int, short unsigned int, short unsigned
   int)
src/burn/neogeo/d_neogeo.cpp:8599:                 void
   kof2003bWriteBankSwitch(unsigned int, short unsigned int, short unsigned
   int)
src/burn/neogeo/d_neogeo.cpp: In function `void
   kof2003bWriteByteBankSwitch(unsigned int, unsigned char)':
src/burn/neogeo/d_neogeo.cpp:8618: redefinition of `void
   kof2003bWriteByteBankSwitch(unsigned int, unsigned char)'
src/burn/neogeo/d_neogeo.cpp:8512: `void kof2003bWriteByteBankSwitch(unsigned
   int, unsigned char)' previously defined here
src/burn/neogeo/d_neogeo.cpp:8618: redefinition of `void
   kof2003bWriteByteBankSwitch(unsigned int, unsigned char)'
src/burn/neogeo/d_neogeo.cpp:8512: `void kof2003bWriteByteBankSwitch(unsigned
   int, unsigned char)' previously defined here
src/burn/neogeo/d_neogeo.cpp:8627: call of overloaded `kof2003bWriteBankSwitch(
   unsigned int&, short unsigned int&, short unsigned int&)' is ambiguous
src/burn/neogeo/d_neogeo.cpp:8493: candidates are: void
   kof2003bWriteBankSwitch(unsigned int, short unsigned int, short unsigned
   int)
src/burn/neogeo/d_neogeo.cpp:8599:                 void
   kof2003bWriteBankSwitch(unsigned int, short unsigned int, short unsigned
   int)
src/burn/neogeo/d_neogeo.cpp: In function `void kof2003bMapHandler()':
src/burn/neogeo/d_neogeo.cpp:8638: redefinition of `void kof2003bMapHandler()'
src/burn/neogeo/d_neogeo.cpp:8524: `void kof2003bMapHandler()' previously
   defined here
src/burn/neogeo/d_neogeo.cpp:8638: redefinition of `void kof2003bMapHandler()'
src/burn/neogeo/d_neogeo.cpp:8524: `void kof2003bMapHandler()' previously
   defined here
src/burn/neogeo/d_neogeo.cpp:8641: converting overloaded function `
   kof2003bReadWordBankSwitch' to type `short unsigned int (*)(unsigned int)'
   is ambiguous
src/burn/neogeo/d_neogeo.cpp:8488: candidates are: short unsigned int
   kof2003bReadWordBankSwitch(unsigned int)
src/burn/neogeo/d_neogeo.cpp:8594:                 short unsigned int
   kof2003bReadWordBankSwitch(unsigned int)
src/burn/neogeo/d_neogeo.cpp:8642: converting overloaded function `
   kof2003bReadByteBankSwitch' to type `unsigned char (*)(unsigned int)' is
   ambiguous
src/burn/neogeo/d_neogeo.cpp:8483: candidates are: unsigned char
   kof2003bReadByteBankSwitch(unsigned int)
src/burn/neogeo/d_neogeo.cpp:8588:                 unsigned char
   kof2003bReadByteBankSwitch(unsigned int)
src/burn/neogeo/d_neogeo.cpp:8645: converting overloaded function `
   kof2003bWriteWordBankSwitch' to type `void (*)(unsigned int, short unsigned
   int)' is ambiguous
src/burn/neogeo/d_neogeo.cpp:8506: candidates are: void
   kof2003bWriteWordBankSwitch(unsigned int, short unsigned int)
src/burn/neogeo/d_neogeo.cpp:8612:                 void
   kof2003bWriteWordBankSwitch(unsigned int, short unsigned int)
src/burn/neogeo/d_neogeo.cpp:8646: converting overloaded function `
   kof2003bWriteByteBankSwitch' to type `void (*)(unsigned int, unsigned char)'

   is ambiguous
src/burn/neogeo/d_neogeo.cpp:8512: candidates are: void
   kof2003bWriteByteBankSwitch(unsigned int, unsigned char)
src/burn/neogeo/d_neogeo.cpp:8618:                 void
   kof2003bWriteByteBankSwitch(unsigned int, unsigned char)
src/burn/neogeo/d_neogeo.cpp: In function `int kof2003bInit()':
src/burn/neogeo/d_neogeo.cpp:8659: call of overloaded `kof2003bMapHandler()' is

   ambiguous
src/burn/neogeo/d_neogeo.cpp:8524: candidates are: void kof2003bMapHandler()
src/burn/neogeo/d_neogeo.cpp:8638:                 void kof2003bMapHandler()
src/burn/neogeo/d_neogeo.cpp: In function `int svcchaosInit()':
src/burn/neogeo/d_neogeo.cpp:8818: call of overloaded `kof2003bMapHandler()' is

   ambiguous
src/burn/neogeo/d_neogeo.cpp:8524: candidates are: void kof2003bMapHandler()
src/burn/neogeo/d_neogeo.cpp:8638:                 void kof2003bMapHandler()
src/burn/neogeo/d_neogeo.cpp: In function `int svcndInit()':
src/burn/neogeo/d_neogeo.cpp:8871: call of overloaded `kof2003bMapHandler()' is

   ambiguous
src/burn/neogeo/d_neogeo.cpp:8524: candidates are: void kof2003bMapHandler()
src/burn/neogeo/d_neogeo.cpp:8638:                 void kof2003bMapHandler()
src/burn/neogeo/d_neogeo.cpp: In function `void svchoasa_p_decrypt()':
src/burn/neogeo/d_neogeo.cpp:8914: call of overloaded `interleave_pdata()' is
   ambiguous
src/burn/neogeo/d_neogeo.cpp:8154: candidates are: void interleave_pdata()
src/burn/neogeo/d_neogeo.cpp:8393:                 void interleave_pdata()
src/burn/neogeo/d_neogeo.cpp: In function `int svchaosaInit()':
src/burn/neogeo/d_neogeo.cpp:8933: call of overloaded `kof2003bMapHandler()' is

   ambiguous
src/burn/neogeo/d_neogeo.cpp:8524: candidates are: void kof2003bMapHandler()
src/burn/neogeo/d_neogeo.cpp:8638:                 void kof2003bMapHandler()
make: *** [d_neogeo.o] Error 1

i think the main prob is dealing with svcchaos drivers being after kof2003 drivers but if i put it before kof2003 drivers, i get an error dealing with `int kof2003bInit()': which due to svcchaos drivers being before kof2003b's :confused:

so as you can see, i'm lost on how exactly to get this working :(
Title: King of Fighters 2003, The
Post by: XorXe on December 30, 2004, 12:41:05 AM
Quote from: iq_132
Use a different bios (I'm assuming you're using the a Jap bios).  I bet it works perfectly with unibios or US/ASIA bios.


I use Unibios 1.2 so i dont know how to add suport to Unibios 2.0 the problem fix whit unibios 2.0??, but i try to add unibios 2.0 in neogeo.zip and dont work only catch Unibios 1.2
 :confused:
Title: King of Fighters 2003, The
Post by: iq_132 on December 30, 2004, 01:52:07 AM
Quote from: Jimmy_Page
thats very strange  :confused:
Why a bootleg board would use two 128k s1 with the same data ?
But u always have good infos.... so i cant doubt from what u say  ;)
BTW, i think that u said on other forums (i dont remember where) that the s1 has 128kb, but i cant confirm...
Any way i will keep using the first chunk of it.... because it works good
see ya

Well, the bootlegger probably just used the cheapest/easiest to obtain chip and used it.

Quote from: PRican25
i'm getting probs trying to compile:
*snip*
i think the main prob is dealing with svcchaos drivers being after kof2003 drivers but if i put it before kof2003 drivers, i get an error dealing with `int kof2003bInit()': which due to svcchaos drivers being before kof2003b's :confused:

so as you can see, i'm lost on how exactly to get this working :(

Attach your neogeo folder (zipped, of course) and I'll see what I can do.

Quote from: XorXe
I use Unibios 1.2 so i dont know how to add suport to Unibios 2.0 the problem fix whit unibios 2.0??, but i try to add unibios 2.0 in neogeo.zip and dont work only catch Unibios 1.2
 :confused:


In d_neogeo.cpp

replace this:
Code: [Select]
{"uni-bios.12", 0x020000, 0x4FA698E9, 0xD0}, //  C Universe BIOS (v1.2)
with this:
Code: [Select]
// {"uni-bios.12", 0x020000, 0x4FA698E9, 0xD0}, //  C Universe BIOS (v1.2)
// {"uni-bios.13", 0x020000, 0xb24b44a0, 0xD0}, //  C Universe BIOS (v1.3)
{"uni-bios.20", 0x020000, 0x0c12c2ad, 0xD0}, //  C Universe BIOS (v2.0)
Title: King of Fighters 2003, The
Post by: PRican25 on December 30, 2004, 03:36:22 AM
here you go IQ_132, i hope you can fix it :)
Title: King of Fighters 2003, The
Post by: iq_132 on December 30, 2004, 04:22:23 AM
Here ya go, this should work :)
Title: King of Fighters 2003, The
Post by: PRican25 on December 30, 2004, 08:53:40 AM
compiles great, thx :D

EDIT: well it works fine but theres a prob, no health bars or small text :eek:

(http://img55.exs.cx/img55/7436/kof200311301433517mn.th.png) (http://img55.exs.cx/my.php?loc=img55&image=kof200311301433517mn.png)

and i'm using unibios but it does the same on japan bios

EDIT2: thought i'd try the fix FerchogtX posted but in can't find this part in my neo_run.cpp
Code: [Select]
// Extract data from the end of C ROMS
BurnUpdateProgress(0.0, "Generating text layer graphics...", 0);
NeoExtractSData(NeoSpriteROM, NeoTextROM + 0x020000, nSpriteSize, nNeoTextROMSize);
Title: King of Fighters 2003, The
Post by: FerchogtX on December 30, 2004, 11:47:27 AM
Quote from: Jimmy_Page
thats very strange  :confused:
Why a bootleg board would use two 128k s1 with the same data ?
But u always have good infos.... so i cant doubt from what u say  ;)
BTW, i think that u said on other forums (i dont remember where) that the s1 has 128kb, but i cant confirm...
Any way i will keep using the first chunk of it.... because it works good
see ya

The prob is that maybe the bootlegger used this as some kind of extra protection (?) more or less like svcchaos 32 MB p1 (in which only 8 MB is osed only XD)... who knows?, maybe the point here is to make FBA ony to read the first 128 KB and then use the scrmble code but for the first 128, another more logical solution is to ask someone that knows about this more, how does an emulator reads a 512 KB s1 roms from the c-roms, that couyld help to figure out how to read the 256 KB s1 rom... maybe
See ya!!! :D
Title: King of Fighters 2003, The
Post by: iq_132 on December 30, 2004, 10:59:05 PM
Quote from: PRican25
compiles great, thx :D

EDIT: well it works fine but theres a prob, no health bars or small text :eek:

(http://img55.exs.cx/img55/7436/kof200311301433517mn.th.png) (http://img55.exs.cx/my.php?loc=img55&image=kof200311301433517mn.png)

and i'm using unibios but it does the same on japan bios

EDIT2: thought i'd try the fix FerchogtX posted but in can't find this part in my neo_run.cpp
Code: [Select]
// Extract data from the end of C ROMS
BurnUpdateProgress(0.0, "Generating text layer graphics...", 0);
NeoExtractSData(NeoSpriteROM, NeoTextROM + 0x020000, nSpriteSize, nNeoTextROMSize);

lol, that's actually your problem bro.  You removed that chunk of code.
Here's a fixed neo_run.cpp
Title: King of Fighters 2003, The
Post by: PRican25 on December 30, 2004, 11:53:47 PM
hehe don't know how that happend but thx for fixing it; works great :cool:
Title: King of Fighters 2003, The
Post by: iq_132 on December 31, 2004, 12:59:39 AM
No problem :) I'm happy to help.
Title: King of Fighters 2003, The
Post by: iq_132 on December 31, 2004, 05:18:06 AM
:D
I just noticed some info :D

Open your bootleg kof2003 P rom (the chunk that should be the first mb)
then go to offset 0x50000
Copy 10,240 (10kb) from that offset
Then compare the second half of 271-bios.bin with that chunk :D


btw, before I forget - the gfx key for kof2003 is 9d and the p3 controls the colors in the game.
Title: King of Fighters 2003, The
Post by: fataku on December 31, 2004, 10:24:29 AM
Quote from: iq_132
:D
I just noticed some info :D

btw, before I forget - the gfx key for kof2003 is 9d and the p3 controls the colors in the game.

more than colors, texts in game too
Title: King of Fighters 2003, The
Post by: iq_132 on December 31, 2004, 10:49:45 AM
I didn't notice that.  I only noticed (after Jimmy_page suggested I try it) that the colors get completely funked after using the encrypted P3.

btw, fataku, about that P3... Is it encrypted similarly to the rest of the P data or something completely different?
Title: King of Fighters 2003, The
Post by: iq_132 on January 12, 2005, 10:18:13 PM
Here's a version of the kf2k3fix code, but it's very very small.
Less than 5kb and there are no known bugs :)

btw, thanks to Jimmy_page for testing ;)
Title: King of Fighters 2003, The
Post by: JiMMy_PaGe on January 12, 2005, 10:24:40 PM
You are welcome bro, it was very good to help u out, testing this code :D
Thanks for the code and all ur help  :D
See ya
Title: King of Fighters 2003, The
Post by: FerchogtX on January 13, 2005, 12:15:38 PM
So... this one is bug free?... that's great!!!!!!!
thanks for this litle version IQ :)
See ya!!! :D
Title: King of Fighters 2003, The
Post by: bms888 on January 13, 2005, 08:40:04 PM
svcchaos & kof2003 PCB bios code is here,^_^.

Code: [Select]

static void PcbBiosMapHandler()
{
SekMapMemory(Neo68KBIOS+0x20000,0xC20000,0xC3FFFF,SM_ROM); // for PCB BIOS
}
Title: King of Fighters 2003, The
Post by: iq_132 on January 13, 2005, 09:29:53 PM
Thanks for the info bms :)
Title: King of Fighters 2003, The
Post by: bms888 on January 13, 2005, 10:25:24 PM
Quote from: iq_132
Here's a version of the kf2k3fix code, but it's very very small.
Less than 5kb and there are no known bugs :)

btw, thanks to Jimmy_page for testing ;)


oh no,but kof2003, kof2k4eh(x?), svcboot, mslug5 don't need this code,maybe just for kof2003b & kof2k3up,^_^:
Code: [Select]

Neo68KROM01[0x58196]=kof2003b_tbl[0xff9]&0xff;
Title: King of Fighters 2003, The
Post by: PRican25 on January 17, 2005, 02:56:46 AM
just wondering, is there a xor code for kof2003 yet? i happen to found a driver asking for encrypted c's which are the following:
Code: [Select]
{"271-c1.bin",  0x1000000, 0xf5ebb327,    1}, //  3 Sprite data
{"271-c2.bin",  0x1000000, 0x2be21620,    1}, //  4
{"271-c3.bin",  0x1000000, 0xddded4ff,    1}, //  5
{"271-c4.bin",  0x1000000, 0xd85521e6,    1}, //  6
{"271-c5.bin",  0x1000000, 0x1c40de87,    1}, //  7 /* The last 2 CxD roms contains S1-ROM */
{"271-c6.bin",  0x1000000, 0x18aa3540,    1}, //  8 /* data (1 MB) only, no sprite data */
Title: King of Fighters 2003, The
Post by: James33 on January 17, 2005, 05:46:33 AM
The normal XOR is  9d for kof2003 MVS
Title: King of Fighters 2003, The
Post by: X-or on January 17, 2005, 08:25:32 AM
the pcb version has a specific protection
it won't use the mvs gfx key
btw you need to get the roms first, and I doubt you do am I wrong?  :p
Title: King of Fighters 2003, The
Post by: PRican25 on January 17, 2005, 09:31:27 AM
you're not wrong heh, thx for the info :P
Title: King of Fighters 2003, The
Post by: JiMMy_PaGe on January 17, 2005, 09:40:54 AM
I think kof2003 encrypted pcb c roms have almost the same protection as svcchaos c roms:
mvs xor + bitswap
But as x-or said we have to get them first xD :D
See ya
Title: King of Fighters 2003, The
Post by: KaNyErO on January 17, 2005, 04:38:42 PM
you forget that you cant encrypt 16mb roms using convert 2 just 8 mb max. ... there must be coded another tool to do that conversion
Title: King of Fighters 2003, The
Post by: X-or on January 17, 2005, 05:14:09 PM
Quote from: Jimmy_Page
I think kof2003 encrypted pcb c roms have almost the same protection as svcchaos c roms:
mvs xor + bitswap


lol there's an easy way to verify:
take the kof2003a C roms, join c1c+c3c, and bitswap it (hexworshop can do that) and see if you get a matching crc for c1
I doubt it tho, svc protection isn't as easy as you think (mvs xor + bitswap)
Title: King of Fighters 2003, The
Post by: JiMMy_PaGe on January 17, 2005, 07:08:19 PM
Yeah i know it :D
Its not a simple bitswap, if u see it uses a lot of xor's to do the bitswap (something like neo-pvc code that uses xor's on bitswap), and i think c roms are interleaved too, like svcchaos...
I think we will get the fully c encrypted roms first, them we will can make a driver and a tool to encrypt it
See ya
Title: King of Fighters 2003, The
Post by: James33 on January 18, 2005, 02:45:20 AM
Quote from: X-or
the pcb version has a specific protection
it won't use the mvs gfx key
btw you need to get the roms first, and I doubt you do am I wrong?  :p
I am sure it still uses the MVS xor plus the extra protection .
Title: King of Fighters 2003, The
Post by: James33 on January 19, 2005, 09:09:36 PM
Quote from: bms888
svcchaos & kof2003 PCB bios code is here,^_^.

Code: [Select]

static void PcbBiosMapHandler()
{
SekMapMemory(Neo68KBIOS+0x20000,0xC20000,0xC3FFFF,SM_ROM); // for PCB BIOS
}


It wont compile useing this code  the error is  neo68kbios undeclared
Title: King of Fighters 2003, The
Post by: bms888 on January 19, 2005, 10:31:33 PM
Quote from: James33
It wont compile useing this code  the error is  neo68kbios undeclared

do step like this:

add to neogeo.h

Code: [Select]

// neo_run.cpp
.
.
.

extern unsigned char *Neo68KBIOS; // for PCB BIOS
.
.

add to neo_run.cpp

Code: [Select]
unsigned char *Neo68KROM01, *Neo68KROM02;
unsigned char *NeoZ80ROM;

unsigned char *Neo68KBIOS; // for PCB BIOS

static unsigned char *Neo68KVectors, *NeoZ80BIOS;
// static unsigned char *Neo68KBIOS, *Neo68KVectors, *NeoZ80BIOS;

Title: King of Fighters 2003, The
Post by: James33 on January 19, 2005, 11:01:55 PM
Thanks BMS :D
Title: King of Fighters 2003, The
Post by: Shoometsu on February 16, 2005, 05:01:54 PM
I've followed the 1st tutorial in this thread to use kof2k3 in 0.2.95.23, but I got a guru meditation if I'm using the smaller k2k3fix.cpp (~4kb). the medium and the large works fine here, but I'm really curious about what can be happening here. wich files do I have to attach to someone help on it :confused: