The King Of Fighters 2000

Notes by Paul "TBBle" Hampson

While avoiding study for his Algorithms exam next week.

Algorithms is hard!
  -- TBBle Barbie

Update 15th November 2001

Algorithms is in fact surprisingly easy. *phew*.

The current KOF2000 driver. - Not Uploaded Yet
This isn't as pretty as K.K's driver, but it works. Also includes Sengoku3 and the other recent dumps. (Not MSlug3...)
The current CPS2Shock driver. - Not Uploaded Yet
This is a 'diff' of the CPS2MAME from CPS2Shock.
Bugfix for the FM sound driver.
You'll need this for NeoMAME or CPMAME compiles.

Opening address

Basically, I've just been mucking about with the S1 rom data. It's recently been uncovered that KOF2000 is unique in the known NeoGeo world for having 512KB of S1 (Front-layer character?) data. This means that either the access to the S1 data is different, or the S1 data is banked into the 128KB space usually loaded directly with an S1 ROM. (Except on the new, encrypted games, where the 128KB of data comes from the end of the Cn (Sprite?) roms.)

From the information discovered by an unidentified Korean guy it certainly looks like the data's going to be banked, due to the heavy duplication of characters. eg. The first four, and numbers 13 and 16.

To test this, I changed the kof2000n driver I was playing with in MAME which I got from the Retrogames NeoGeo Message Board and fixed to actually work.... (Diff for MAME below....)

I then ran the game four times (actually more, but you'll see what I mean) each time banking a different part of the S1 data into the normal S1 space. I've got parallel screenshots below.

Comparison of the S1 banks

Bank 0Bank 1Bank 2Bank 3Comment
Shot 1, Bank 0 Shot 1, Bank 1 Shot 1, Bank 2 Shot 1, Bank 3 Always fine.
Shot 2, Bank 0 Shot 2, Bank 1 Shot 2, Bank 2 Shot 2, Bank 3 Bank 0 is correct.
Shot 3, Bank 0 Shot 3, Bank 1 Shot 3, Bank 2 Shot 3, Bank 3 Bank 2 has the character's names and the timer, but the portraits down the left didn't work in the other banks. I only noticed this on the last one, so the other screenshots don't show them.
Shot 4, Bank 0 Shot 4, Bank 1 Shot 4, Bank 2 Shot 4, Bank 3 Again, name and timer in Bank 2, but text above the character portraits is Bank 1.
Shot 5, Bank 0 Shot 5, Bank 1 Shot 5, Bank 2 Shot 5, Bank 3 Name and timer in Bank 2, text above portraits (and the striker symbol) in Bank 1 again.
Shot 6, Bank 0 Shot 6, Bank 1 Shot 6, Bank 2 Shot 6, Bank 3 Bank 1's fine for this.
Shot 7, Bank 0 Shot 7, Bank 1 Shot 7, Bank 2 Shot 7, Bank 3 Bank 3 makes most of it work, but teammate's names are in Bank 2
Couldn't be bothered to recompile. Trust me on this one. It was fine. Shot 8, Bank 1 Shot 8, Bank 2 Shot 8, Bank 3 Bank 0 was fine.

Conclusion

So far, that's it. I might have a look later and see if the game's doing anything strange when trying to access this data, since banking graphical data like that (on the same _screen_) seems a little strange.

Source code

This is a diff against MAME 0.56 vanilla source, to enable KOF2000n using Bank 3 so that the health bars are visible. It'll also give you NJ's NeoGeo driver and Sengoku3 as a bonus. However, you'll have to make any neccessary changes to driver.c yourself though.

This patch (and the ones below) are to be used from in your MAME directory, with patch -p1 < file.diff

Also as a bonus, here's a couple of other fixes to MAME 0.56... A fix to the fm.c file so that the neomame target can compile. It's a cut'n'paste error, where some lines were copied that shouldn't have been. Also, we have a fix to the DMAME target so that Allegro WIP 3.9.39 can be used. Basically, a global Allegro variable MAME was using is no longer global. :-) I'd love to know if this breaks anyone's joystick code. WIP 3.9.39 has an improvement (I hope) to the SNESpad support to remove the _massive_ performance hit that it causes. Feedback is welcome.

Back to TBBle.com


Valid XHTML 1.1!

Valid CSS!