KNSTOOLS (c) 1998 Videoman
These tools may be freely shared, as long as no fee is charged.

The reason for these tools, comes about because of the various formats that
Neo-Geo games are stored/backed up/distributed in, versus the formats that
the emulators play.

For instance, the arcade games roms are often found in this format:

xxxx_Px.ROM - 68000 code ("PRG")
xxxx_Mx.ROM - Z80 code ("Z80")
xxxx_Sx.ROM - background tiles ("FIX")
xxxx_Cx.ROM - character tiles ("SPR"/"OBJ")
xxxx_Vx.ROM - voice samples/sequences(?) ("PCM")

Home console roms are usually dumped using a MGD2, so they are in this format:

NxxxxxA.038 - xxxx_Px.ROM (PRG)
NxxxxxA.478 - xxxx_Mx.ROM (Z80)
NxxxxxA.378 - xxxx_Sx.ROM (FIX)
NxxxxxA.538 - xxxx_C1.ROM
NxxxxxA.638 - xxxx_C2.ROM
NxxxxxA.53C - xxxx_C3.ROM
NxxxxxA.63C - xxxx_C4.ROM
NxxxxxB.538 - xxxx_C5.ROM
NxxxxxB.638 - xxxx_C6.ROM
NxxxxxB.53C - xxxx_C7.ROM (?)
NxxxxxB.63C - xxxx_C8.ROM (?)

Note that the Z80 code is byte-wide, and the 68000 code is word-wide,
in Motorola byte order, in these previous two formats.

The Neo-CD games are currently in a slightly different format.
They are stored on the CD in Intel byte order, so need to be byteswapped.

There is a text file called 'IPL.TXT' in the root directory, presumably this 
stands for Initial Program Load, and describes the files that need to be
loaded, and at what addresses in RAM.

Here is a sample IPL.TXT from the CD version of Last Resort.

P024.FIX,0,0
SOUND3.Z80,0,0
CHR1.SPR,0,0
CHR2.SPR,1,0
CHR3.SPR,2,0
P024.PRG,0,0
GAME1.PRG,0,80000
GAME_2.PRG,0,C0000
GAME3.PRG,0,180000
GAME.PRG,0,1F9000

From this, it seems that the last parameter for the .PRG files
specifies load start address. The rest is largely unknown.
From analysis of the difference between the home cart version
and the CD version, it appears that less than 2KB of the 68K
code (PRG) is different, while nearly all of the Z80 code (Z80)
is different (probably to handle the CD music).
The background tile (FIX) file is identical.

It is unknown what the additional GAME*.PRG files are for.



Late addition: After further thought, it seems possible that in fact
the format of the word-wide images on the Neo-CD games are correct,
and perhaps the dumps of the arcade roms are backwards.



Thanks go to the guys on #NeoGeo, Teego, Over_Lord, MH427, blazemore,
chemical, and especially Drac for writing such a kick-butt Neo-Geo emulator.
(And anyone else I forgot..)


