|
| 1 | +n64split: N64 ROM splitter, texture ripper, recursive MIPS disassembler |
| 2 | +-------- |
| 3 | + |
| 4 | +The idea behind n64split is to be able to split a ROM into various components: |
| 5 | +assembly code, textures, level data, audio data; and add on a build system that |
| 6 | +is able to take changes made to those files and reconstruct a ROM. �The |
| 7 | +resulting ROM is almost bit for bit compatible, with exception of some macro |
| 8 | +instruction translation and relocation of MIO0 data. |
| 9 | + |
| 10 | +The disassembler is recursive, so it will disassemble all procedures it |
| 11 | +discovers through JALs. �It also somewhat intelligently decodes instruction |
| 12 | +pairs to macro instructions (like LUI/ADDIU to LA and LUI/LW pairs to LW) and |
| 13 | +adds proper labels JALs and local branches. |
| 14 | + |
| 15 | +Usage: |
| 16 | +n64split -c sm64.config "Super Mario 64 (U).z64" |
| 17 | + |
| 18 | +This will split the ROM based on the contents of the configuration file |
| 19 | +"sm64.config". See the comments in that file if you want to addapt it. |
| 20 | + |
| 21 | +Output: |
| 22 | +gen/ |
| 23 | + +- sm64.s - top level assembly* |
| 24 | + +- Makefile.gen - generated Makefile with texture and level dependencies |
| 25 | + +- bin/ - raw binary data from undecoded and MIO0 blocks |
| 26 | + +- levels/ - decoded level data |
| 27 | + +- textures/ - all ripped textures* |
| 28 | + |
| 29 | +* These are the two areas of most interest. |
| 30 | + |
| 31 | +ROM Build System: build system to reconstruct ROM after making changes |
| 32 | +-------- |
| 33 | +The build system relies on GNU make to detect changes in resources and |
| 34 | +mips64-elf assembler and linker to rebuild the ROM. �You could of course |
| 35 | +circumvent make and just build everything every time with a batch script, |
| 36 | +but this is incredibly slow due to all the texture encoding and my terribly |
| 37 | +inefficient MIO0 compressor. �A win32 build of make is included, but you'll |
| 38 | +need to either build or obtain** mips64-elf binutils on your own if you want |
| 39 | +to rebuild the image. |
| 40 | + |
| 41 | +** https://dragonminded.com/n64dev/ |
| 42 | + |
| 43 | +Usage: With mips64-elf bin directory in your PATH, just run 'make' from the |
| 44 | +command line, and it will handle the rest. |
| 45 | +$ make |
| 46 | +mips64-elf-as -mtune=vr4300 -march=vr4300 -o build/sm64.o gen/sm64.s |
| 47 | +mips64-elf-ld -Tn64.ld -Map build/sm64.map -o build/sm64.elf build/sm64.o |
| 48 | +mips64-elf-objcopy build/sm64.elf build/sm64.bin -O binary |
| 49 | +./tools/n64cksum build/sm64.bin sm64.gen.z64 |
| 50 | + |
| 51 | +Output: |
| 52 | +build artifacts will go in build directory. |
| 53 | +Complete ROM is sm64.gen.z64 |
| 54 | + |
| 55 | +Source is MIT licensed and available at: |
| 56 | +https://github.com/queueRAM/sm64tools/ |
| 57 | + |
| 58 | +Changelog: |
| 59 | +v0.1a: Initial release |
| 60 | + - supports texture ripping, level decoding, and recursive disassembler |
0 commit comments