Update documentation for more clarity and examples.

This commit is contained in:
Jennifer Taylor 2019-06-23 12:20:51 -07:00
parent df7332d644
commit 6747a59ee0
1 changed files with 3 additions and 3 deletions

View File

@ -7,15 +7,15 @@ Konami Firebeat is a notoriously flaky stack that runs several older rhythm game
## Executable Format
The first four bytes of the executable should be interpreted as a little endian unsigned integer. This is the size of the executable once it has been decompressed in main RAM. The rest of the file is a LZ77-compressed binary. If extracted correctly, it should exactly equal the size specified in the first four bytes. The name of the executable is as dictated below:
The first four bytes of the executable should be interpreted as a little endian unsigned integer. This is the size of the executable once it has been decompressed in main RAM. The rest of the file is a LZ77-compressed binary. If extracted correctly, its length should exactly equal the size specified in the first four bytes. The name of the executable is as dictated below:
* Beatmania III - `HIKARU.EXE`
* KeyboardMania - `FIREBEAT.EXE`
* Pop'n Music - `FIREBEAT.EXE`
* ParaParaParadise - `HIKARU.EXE`
You can use MAME to decompress images if you are in a pinch and do not have working LZ77 tools. Boot the game image that you wish to decompress the executable from, wait until it boots past the BIOS and starts running through hardware checks, and then dump the main RAM starting at address `0x00` and ending at the size specified in the first four bytes of the EXE as found on disk. This raw image can be made back into an EXE again by first dummy compressing (insert an `0xFF` byte before every 8 byte chunk in the raw image) and re-appending the executable size. If replaced on disk, both MAME and real hardware will happily boot this executable.
You can use MAME to decompress images if you are in a pinch and do not have working LZ77 tools. Boot the game image that you wish to decompress the executable from in debug mode, wait until it boots past the BIOS and starts running through game-specific hardware checks, and then dump the main RAM starting at address `0x0` and ending at the size specified in the first four bytes of the EXE as found on disk. An example MAME debugger command to dump Beatmania III The Final's uncompressed executable is `save hikaru.bin, 0x0, 0x100000`. This raw image can be made back into an EXE again by first dummy compressing (insert an `0xFF` byte before every 8 byte chunk in the raw image) and then re-appending the executable size. If replaced on disk, both MAME and real hardware will happily boot this executable.
## Working with Disk Images
Images can be ripped and burned again using your favorite image reading/writing software. However, to modify an image (such as to replace the EXE with a new one), you should use UltraISO. I have had success modifying images ripped using ImgBurn, using UltraISO to replace the EXE and then burning the updated image with ImgBurn. Your results may vary, but IIRC the sector size for Firebeat images is nonstandard so you need a program that respects that when updating images. You can test that you've created an updated image using MAME. If you start mame with the `-debug` flag, you can choose an ISO to use in place of any disk. An example mame command line to test Beatmania III The Final modifications is `mame64 -window -debug bm3final`
Images can be ripped and burned again using your favorite image reading/writing software. However, to modify an image (such as to replace the EXE with a new one), you should use UltraISO. I have had success modifying images ripped using ImgBurn, using UltraISO to replace the EXE and then burning the updated image with ImgBurn. Your results may vary, but IIRC the sector size for Firebeat images is nonstandard so you need a program that respects that when updating images. You can test that you've created a working updated image using MAME. If you start MAME with the `-debug` flag, you can choose an ISO to use in place of any disk. An example MAME command line to test Beatmania III The Final modifications is `mame64 -window -debug bm3final`