This is a package of tools to convert Neo-Geo MVS/AES roms to Neo-Geo CD roms
There are very few roms that this conversion will actually work well with, and these
are already out on the net in Neo-Geo CD form, but I thought I'd write these tools
anyway.

If you want an explaination of how each tool works, either look at the source, or
check out the included "Pochi and Nyaa," or "Gururin" automated conversion tools
in the "Auto" directory.

Use this package at your own risk, and again, this will work correctly with very few
neo-geo roms.

-IQ




Changes:

December 20, 2006
----------------------

Program roms should now be patched correctly
Program and graphics roms are automatically trimmed
 - This decreases loading time on an actual Neo-Geo CD unit
Code in prgcnv, gfxcnv, and txtfiles is much cleaner





General info:
-----------------------

First, you must make sure that you are dealing with a very tiny neo-geo rom or you will end up
 having to cut a lot of precious data out and will end up with a glitchy game.

The "Px" (M68K program) rom(s) must be less than or equal to 1 Megabytes or it will be glitchy
The "S1" (text) rom must be less than or equal to 128 Kilobytes
The "Cx" (sprites) rom(s) must be less than or equal to 4 Megabytes total
The "M1" (Z80 program) rom must be less than or equal to 64 Kilobytes
The "Vx" (samples) rom(s) must be less than or equal to 1 Megabyte total

If the roms above are larger than this, you will have to remove and discard part of the rom.

Now, onto the actual conversion:

    M68K Program (P):

	1. Byteswap the entire rom (swap byte 1 with byte 2, byte 3 with byte 4, etc..)
	2. Copy 0x40-0x63 from an official neo-cd game prg rom
	3. Swap four bytes at address 0x64 and 0x68 of the program
	4. Name your output PRG.PRG (Can be different)

    Sprites (C):

	1. Read two bytes from your C1
	2. Byteswap the bytes from part 1
	3. Read two bytes from your C2
	4. Byteswap the bytes from part 3
	5. Repeat steps 1-4 until your new rom is 4 Megabytes in size
	   A. Your output file may be smaller if your roms are tiny
	6. Save the ouput file as SPR.SPR (Can be different)

    Text (S):

	1. Make sure your S1 rom is within the size-limit boundaries
	2. Rename your S1 rom to FIX.FIX (Can be different)

    Z80 Program (M):

	1. Make sure your M rom is within the size-limit boundaries
	2. Rename your M rom to Z80.z80 (Can be different)

    Samples (V):

	1. You may only use one V rom, so if you have more than one, find a tool to merge them
	2. Make sure your (merged?) V rom is within the size-limit boundaries
	2. Rename your V rom to pcm1.pcm (Can be different)


Lastly, you will need a few text files:

	- IPL.TXT (This file is very important!)
	- ABS.TXT
	- BIB.TXT
	- CPY.TXT

IPL.TXT is the most important, it tells the Neo-Geo CD machine which files to load first, it usually 
contains something similar to this:

FIX.FIX,0,0
Z80.Z80,0,0
PCM.PCM,0,0
SPR.SPR,0,0
PRG.PRG,0,0
