Jump to content

KOF2003 fix here

Recommended Posts

I hate MAME with a passion... really I do. However, I love KOF games... and sadly I can only play 2003 on MAME. On neogamez.net, you can get a patch to fix KOF2003's s1 file so that the infinite timer is displayed instead of having big gaps in it. I compiled mame32 plus myself to make it work. For lazy people or n00bs, you can get my neogeo.c and driver.c files with the driver already implemented here. For the rest of you, here is the driver.


In src\drivers\neogeo.c, this part goes in the ROM_START section:


ROM_START (kof2003)

ROM_REGION (0x800000, REGION_CPU1, 0)

ROM_LOAD16_WORD_SWAP ("271-p1.bin" and 0x100000, 0x400000, CRC (92ed6ee3))

ROM_LOAD16_WORD_SWAP ("271-p2.bin" and 0x500000, 0x200000, CRC (5d3d8bb3))

ROM_CONTINUE (0x000000, 0x100000)

ROM_CONTINUE (0x000000, 0x100000)


NEO_SFIX_128K ("271-s1.bin" and CRC (7c7829aa) SHA1 (22f8d38d1d0891295d0593741d9477fbe6b4f48c))


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



/* decrypted *

ROM_LOAD ("271-v1d.bin" and 0x000000, 0x400000, CRC (d2b8aa5e) SHA1 (498f0556c1de56822141f8043f1ce20444f4ed0a))

ROM_LOAD ("271-v2d.bin" and 0x400000, 0x400000, CRC (71956ee2) SHA1 (a890941e60db358cf45b58909f4719f4826f3bb1))

ROM_LOAD ("271-v3d.bin" and 0x800000, 0x400000, CRC (ddbbb199) SHA1 (0eea4b064bdb8daa03c354fe0a0aa27c4c665bda))

ROM_LOAD ("271-v4d.bin" and 0xc00000, 0x400000, CRC (01b90c4f) SHA1 (387164aa1995d8c11ed939b3afbc294d86d2e27f))




ROM_REGION (0x4000000, REGION_GFX3, 0)

ROM_LOAD16_BYTE ("271-c1d.bin" and 0x0000000, 0x800000, CRC (e42fc226) SHA1 (1cd9364993e141facdcdd53ec2277df7b275d8a7)) /* Plane 0,1 *

ROM_LOAD16_BYTE ("271-c2d.bin" and 0x0000001, 0x800000, CRC (1b5e3b58) SHA1 (0eb254477a9479541291e43e415310852a0f0bed)) /* Plane 2,3 *

ROM_LOAD16_BYTE ("271-c3d.bin" and 0x1000000, 0x800000, CRC (d334fdd9) SHA1 (1efe30b4f56a55e25ab518cf6999de797b5e407c)) /* Plane 0,1 *

ROM_LOAD16_BYTE ("271-c4d.bin" and 0x1000001, 0x800000, CRC (0d457699) SHA1 (ec73d0c9fc7094d0ac6c0986a6e07cde25893e57)) /* Plane 2,3 *

ROM_LOAD16_BYTE ("271-c5d.bin" and 0x2000000, 0x800000, CRC (8a91aae4) SHA1 (802f4baacf801646be1ef686e105b2e867a6a5df)) /* Plane 0,1 *

ROM_LOAD16_BYTE ("271-c6d.bin" and 0x2000001, 0x800000, CRC (9f8674b8) SHA1 (65964f40b2227d020023fb436579927e65807dcd)) /* Plane 2,3 *

ROM_LOAD16_BYTE ("271-c7d.bin" and 0x3000000, 0x800000, CRC (374ea523) SHA1 (613827d72c6181f3e08353750c9af0c4dbad020b)) /* Plane 0,1 *

ROM_LOAD16_BYTE ("271-c8d.bin" and 0x3000001, 0x800000, CRC (75211f4d) SHA1 (d82f044e816ee539ff131d9c931200c818d34cd0)) /* Plane 2,3 *



In src\drivers\neogeo.c, this part goes in the ROM_INIT section:


Static unsigned short kof2003_tbl [ 0x1000 ];


Static READ16_HANDLER (kof2003_16_r)


Return kof2003_tbl [ offset ];


Static WRITE16_HANDLER (kof2003_16_w)


UINT32 bankaddress;

Kof2003_tbl [ offset ] = (kof2003_tbl [ offset ] &mem_mask) | ((- mem_mask) &data);

If (offset>0xff9) return;

Bankaddress= ((kof2003_tbl [ 0xff8 ] >>:rolleyes: | (kof2003_tbl [ 0xff9 ]<<;))+0x100000;

* (((UINT8 *) kof2003_tbl) +0x1ff0) =0xa0;

* (((UINT8 *) kof2003_tbl) +0x1ff1) &=0xfe;

* (((UINT8 *) kof2003_tbl) +0x1ff3) &=0x7f;

Neogeo_set_cpu1_second_bank (bankaddress);

* (((Unsigned char *) memory_region (REGION_CPU1)) +0x58196) =kof2003_tbl

[ 0xff9 ] &0xff;



DRIVER_INIT (kof2003)


Install_mem_read16_handler (0, 0x2fe000, 0x2fffff and kof2003_16_r);

Install_mem_write16_handler (0, 0x2fe000, 0x2fffff and kof2003_16_w);


Init_neogeo ();



In the src\drivers\neogeo.c file, in the GAMEB section, under /*SNK*/, add this line:


GAMEB( 2003, kof2003, neogeo, neogeo, neogeo, neogeo, kof2003, ROT0, "SNK Playmore Corporation", "The King of Fighters 2003" )


In the src\driver.c file, add this line. I added it at the bottom, but it could go with the other SNK titles if you wanted.


For those of you who need help compiling this, here's a step by step tutorial covering EXACTLY how I did it.


You'll need the three things under Compile Utilities and also the mame.079 plus source file from here. You also need the original mame.079 source code, which you can get here. Extract this, there should be a mame.zip file in it. Extract mame.zip to a folder called "mamep," and then extract the mame.079 plus code to the same folder, again clicking yes to all when prompted to overwrite. Move the "mamep" folder to C:\ now.


Extract the "mingw-1010" file to a folder called "mingw." Extract the "extra-0830.cab" file, and inside the "extra" folder, copy the three folders, bin lib and included, and paste them inside the mingw folder, and click Yes to All when it asks you to overwrite. Move the "mingw" folder to C:\ now.


Now mingw must be set up to the windows path. If you're on Win 95 or 98, you'll just have to look this part up on the internet... all I know is that you have to edit the autoexec.bat file. For those of us on 2000 and XP, right click on My Computer and go to Properties. On the Advanced tab, click the Environment Variables button. Now, at the bottom where it says System Variables or something similar, scroll down if necessary until you find the path variable. Select the path variable, click the edit button, and add this to the beginning of what's already in the "Variable Value" box:




Doon't worry, the semi-colon terminates that sequence, so the thing that was there originally is still there. It won't screw ur windows path up.


Anyway, inside your "mamep" folder, go to the "src" folder. You now have to make the changes to drivers\neogeo.c and driver.c files. Either that, or replace them with the ones you downloaded above... after extracting them of course.


Now, the easy part. Go to the start menu and select run. Type "command" and press enter. It will bring up an old fashioned MS-DOS prompt. That's what I call it anyway, i think they call it command prompt now because Bill Gates hates the fact that Windows can't run without DOS being part of it ^.^


Type "CD\" and press enter. This should bring you to the C:\ directory. Type "CD mamep" and press enter; this should bring you to your mamep folder. Type "env" and press enter. It should display "make WINUI=1" or something similar. Now, type "make USE_UPX=1" and make damn sure you put that last bit on there. It will work if you just type "make" but when this is finally done, all your files except plib.dll will be a few kb in size, and plib.dll will be 24 MB. If you use the USE_UPX=1 part, it will use unx (ultimate packer of exe's or something like that) to compress plib.dll, and it will work just the same, but will be 6 MB instead. You're really going to need that space with MAME... because it's a piece of crap and uses ridiculous amounts of space. I've got like a 78 gig hard drive, but I still hate it... I mean, a save state is 9 or 10 megs on mame. Anyway, enough of that dribble.


Wait. This compiling process will take several minutes, and I do mean several. I have a 3.00 Ghz processor and 1024 MB RAM... and it still takes a good bit of time. Anyway, when it's finally done, copy your mamep folder and paste it to your desktop. Inside, delete the "src" and "obj" folders, and the "compile," "make_icc," "makefile," and "env" files. All the rest of the suff is part of mame32 plus. Although you can delete those "whatsnew" "whatsold" text files if you want.


Now, I strongly suggest that you download the latest version of mame32 plus here. Extract it to a separate folder on your desktop, and then go back to your mamep folder. Copy everything in the mamep folder, and paste it inside the folder where you extracted the mame32plus zip file to. Now, you have your own compiled version of mame32 plus, but you also have the backgrounds and folders and ini files that are included with the initial release.


Now, onto the rom. You can download KOF2003 at several places, one of which being here. Now, thanks to neogamez, you can get the s1 fix here, and you can download a modified neogeo.zip bios that allows you to play as the bosses of the game here. Note: The modified bios should not be substituted for the original bios in your other emulators' folders. Only use it in this mame32 plus folder, because mame sucks and the only game you'll be playing on it is KOF2003 anyway.


After downloading those files, open up kof2003.zip with winzip, and delete the 271-s1.bin file. Extract the s1 file you got from neogamez, and add it to the kof2003.zip file. Now, put the kof2003.zip and neogeo.zip files in the "roms" folder inside your mame directory. Now, there should be a folder in your mame directory called "folders" and you should create one if there isn't. Open up good ole' notepad... (notepad rules... lol) and type this:



RootFolderIcon = cust1.ico

SubFolderIcon = cust2.ico





Then go to file>Save as, browse to get to the "folders" directory inside your mame directory, and type "KOF.ini" then hit OK or press enter. Now, you won't have to search for the KOF 2003 rom through the muck of roms on mame's flocked up list. For some reason, the rom doesn't audit correctly, mame says something about an sp-sp2 file or something that I can't find, and so it won't show up in the "available" folder inside mame. But it does work, trust me. Anyway, cut and paste your mame directory to wherever you keep your emulators now, open it up, and doubleclick the "mame32p" file to open up mame. Now press F5 on your keyboard and wait til the blue bar reaches the far right of the screen. Go to Options>Default Game Options and select the "BIOS" tab. For the first two, you can select whichever you want really, but I selected the only USA bios in the list for the first one, and Megaplay bios ver. 2 for the second one. Now, for the third box, I don't care what part of the world you're from, make sure you select Europe MVS version 2. I don't know why but it has more options than any of the others. Anyway, click ok. Now, click OK and go to the Miscellaneous tab. Check mark the two boxes that say "skip disclaimer" and "skip game info," then click OK and exit the options menu.


On the left, there should be a panel with a bunch of folders. Scroll down until you see a folder that says "KOF" and double click it. The only game in there should be kof2003. Double click it and wait for it to load. It should skip the disclaimer and game info and crap, but if it doesn't for whatever reason, do what it says, and you should only have to do this once. When the game loads up, press the TAB key on your keyboard. Select Dip Switches. Scroll down there and select the territory you want, and chang ethe mode from Arcade to Console. Exit the dip switches part. Go to General Input and you can change crap as you wish. If you mess up and make it add multiple buttons for something, you can just keep pressing enter to change it, then input the same button. Do this over and over until it only has one button. If you set up keys for your custom buttons under the general input menu, exit the general input menu and go to "custom buttons." These are buttons that allow you to press A+B at the same time or whatever, which is the roll maneuver in KOF games. in this menu, select a button, custom button one for example. the first four numbers (non numeric pad) correspond to the neo-geo buttons. A=1 B=2 C=3 D=4. So for example, if you want to set up A+B, press 1 then 2; you could also press 2 then 1, they don't have to be in a certain order. Move on to the next button and set up your buttons like you want, you can only set up to four though. If you mess up and add in an extra button, like a C for instance, pressing 3 again will remove it.


Phew! That was a long post, but I like to be in depth when explaining things. Anyway, that should explain as clearly as day to anyone exactly how to compile mame 32 plus for the fixed version of kof2003 and set it up, etc. If anyone has a problem, let me know.

Link to comment
Share on other sites

I already have all the fixes for this game already. All I need now is a fix for the c roms cause whenever you use the uni-bios, or you use the japanese BIOS 3, you get a little fuk up at the end of the screen

Link to comment
Share on other sites

I already have all the fixes for this game already. All I need now is a fix for the c roms cause whenever you use the uni-bios, or you use the japanese BIOS 3, you get a little fuk up at the end of the screen

The C roms are graphics as far as I know. What does your audit tell you?


I don't use the uni bios, just the original... and when i'm playing this game i use the modded bios that fgives you the bosses.


No problem Lotus 8)

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...