The tool works in several steps, broken down in to these commands:
1. build - merge the ./original and ./additional folders into ./out, properly renaming the additional files along the way, as well as generating a new song name table and track lookup table (written to ./patch).  After this, you should turn ./out into your new BGM.CVM file using an ISO creator and cvm_tool.
2. buildfiletable - read BGM.CVM's table of contents to generate a new file table, written to ./patch.
3. patch - apply the necessary patches to ./source.asm (renamed SLUS file), with the patched file written to ./source_final.asm.  You MUST have run "build" and "buildfiletable" first to generate the necessary files in ./patch.

If you run the tool, it will list the accepted commands and prompt you to type one.  You may alternatively supply the command as a command-line argument.
It is recommended that you run the program from a command prompt window so you can read any errors.


HOW TO USE THE TOOL:

1. Download the .zip archive and extract it somewhere ("Right click -> Extract to...").  I'll refer to this as "our directory."

2. In our directory, create a folder named "original" and a folder named "additional".

3. Extract the original P3FES USA ISO somewhere.  A simple way to do this in newer versions of Windows is to just double-click the ISO, Ctrl-A to select all, then copy and paste the files somewhere. Move the BGM.CVM file into our directory.  Move the SLUS_216.21 file into our directory and rename it to "source.asm" (make sure you have "View File Extensions" on in Windows!).

3. Open a command prompt ("shift + right click the folder -> Open command window here"). Enter:
"cvm_tool.exe split BGM.CVM BGM.iso BGM.hdr"
This will split the BGM.CVM into a BGM.iso and BGM.hdr file.

4. Extract the BGM.iso file to ./original.  When you're done, move the original BGM.iso and BGM.CVM somewhere else (or delete them).  We're done with them.

5. ADDING MUSIC
	a. The ./additional directory structure looks like this:
		|--additional (FOLDER)
		  |--26 (FOLDER)
		    |--massdestruction_alternate1.adx (FILE)
		    |--massdestruction_alternate2.adx (FILE)
		  |--53 (FOLDER)
		    |--dorm_alternate.adx (FILE)
	The file names in the additional folder do not matter.  They will be automatically renamed to "26A.ADX" etc. for the final BGM.CVM and patches.

	b. All music tracks must be of the .ADX format.  You will probably have to convert them to .WAV as an intermediate step.
	Music tracks should probably be 24000Hz (this is the sample rate the original P3 music uses).  I recommend Audacity or fre:ac to convert.
	Use either WAV2ADX or DkZ Studio's conversion tool to get the final .ADX file (find them on Google).  Remember to set loop points!  DkZ Studio makes this easy, but you'll have to do it by hand with the WAV2ADX tool.

	c. You can also replace any ./original songs.  Just overwrite the original file.

	d. There's about 100mb of free space on the DVD, keep in mind.  If your ./additional folder is bigger than that, you'll run in to problems building the final game ISO.

6. Open up another command prompt. Enter:
"musicarranger.exe build"
If it warns you that "./out already exists", enter "Y" to continue.

7. Create an ISO from your new ./out directory. Name it BGM.iso and put it in our directory.  I use ImgBurn for this step.

8. Command prompt again.  Enter:
"cvm_tool mkcvm BGM.CVM BGM.iso BGM.hdr"
BGM.CVM should now exist in the folder.

9. Command prompt again.  Enter:
"musicarranger.exe buildfiletable"
"musicarranger.exe patch"

10. Rename "source_final.asm" to "SLUS_216.21".

11. Repack the game ISO.  You'll need all the original files from the ISO, but replace "BGM.CVM" and "SLUS_216.21" with the ones in our directory.  I personally use UltraISO's "New -> PS2 DVD" option for this step.

Done.  Open it up in PCSX2 and play it.  Keep in mind the file will have a different checksum, so if you want to use the widescreen patch, you'll need to rename the .pnach file in the cheats_ws folder accordingly.  The original file is named "94A82AAA.pnach".


-Aloshi
http://www.aloshi.com

Persona 3 and Persona 3 FES is copyright ATLUS.
cvm_tool is copyright roxfan.
