Algorithms is hard! -- TBBle Barbie
Algorithms is in fact surprisingly easy. *phew*.
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.
| Bank 0 | Bank 1 | Bank 2 | Bank 3 | Comment |
|---|---|---|---|---|
![]() |
![]() |
![]() |
![]() |
Always fine. |
![]() |
![]() |
![]() |
![]() |
Bank 0 is correct. |
![]() |
![]() |
![]() |
![]() |
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. |
![]() |
![]() |
![]() |
![]() |
Again, name and timer in Bank 2, but text above the character portraits is Bank 1. |
![]() |
![]() |
![]() |
![]() |
Name and timer in Bank 2, text above portraits (and the striker symbol) in Bank 1 again. |
![]() |
![]() |
![]() |
![]() |
Bank 1's fine for this. |
![]() |
![]() |
![]() |
![]() |
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. | ![]() |
![]() |
![]() |
Bank 0 was fine. |
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.
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.