Hacking and building the ROM
last updated:
Build Requirements
I’m on Win10/64, so I can’t tell you how to set things up for other OS’es.
- The unpatched ROM that has a matching CRC/checksum (see Readme.md in the repository)
- VASM (vasmm68k_mot_win32.exe) <- Win-compiled by Rob
- supertails66 yuitools srecpatch.exe
- fixheader.exe which fixes the ROM’ internal checksum in the header and prevents red-screen lockups
Prepare filesystem
This may vary between patch repositories, but I will update older releases to use the same structure for convenience. Folders are set up like this:
- Root folder (could be anywhere on your computer)
- vasmm68k_mot_win32.exe
- srecpatch-jp.exe
- fixheader.exe
- [Folders] contents of repository
- patch.asm (etc, additional asm files)
- msu-drv.bin
- msuLockout.bin
- .bat files (_make_srec-jp.bat, _apply_srec-jp.bat, build.bat etc.)
- [Folder] ROMS
in.md
(unpatched, padded ROM)
- [Folder] OUTPUT
ROM Padding
To allow insertion of additional data into the ROM some padding
(increase of filesize) is needed. You can use any method for this task, I do it with WindHex32 by opening the ROM, then opening the menu and selecting “Tools -> Increase/Decrease ROM size”. This is convenient as you can select the new size in MBITS
Please refer to the source of patch.asm
to find out what size is needed.
Build
- Prepare the input ROM in folder
/ROMS
by adding padding and renaming toin.md
- Prepare your filesystem as described above
- Launch .bat files in this order (or simply use
build.bat
which does the same thing)- _make_srec-jp.bat
- _apply_srec-jp.bat
- _fixheader.bat
- Find the patched ROM in
OUTPUT/out.md