I've recently taken a challenge upon myself - to reverse engineer and document my favourite childhood NES game - Super Robin Hood by the Oliver Twins. The game is part of the Quattro Adventure rom.
If have quite a lot of experience with 6502 assembly and how the NES works, that isn't the problem.
The problem is - how on earth do you successfully disassemble a mapper 232 game? I've tried every disassembler on the wiki; while certain disassemblers do do their job it's simply impossible (or at the very least really difficult) to then reassemble the assembly code back into an nes rom file that I can play. Either the dissasemblers generate literally syntactically incorrect code or they don't generate the iNES header, and those that do (disasm6) use .hex mnemonics that can't be recognized by other assemblers. I then tried reassembling with asm6 but guess what, disasm6 did not generate reset: irq: and nmi: labels which I do not know how to locate, so assembly also failed there. I even tried to use asm6f due to the fact that certain parts of the disassembly contain illegal opcodes, but even asm6f had difficulties.
Does anybody know any dissasembler, or at the very least any tool that is fully capable of dissasembling such a rom and then reassembling it back into one coherent .nes file? Additionally (this is not necessary, but would be greatly appreciated), does anybody have any documentation regarding mapper 232 (the links on the nesdev wiki simply aren't enough). I've been stuck for several weeks now.
HEX = .byte $
HEX 00 01 02 ff fe f9
Documentation for 64tass is here http://tass64.sourceforge.net/
but you file will look something like
Code: Select all
*=$0000 .byte HEADER HERE .logical $8000 .include "firstPRGBank" .here .logical $c000 .include "upperPRGBank" .here .logical $c000 .include "nextUpperPRGBank" .here .binary "chrData.bin"
64tass -b -X -a -i yourFile.asm -o yourbin.bin
64tass format is fairly plain and "standard" and regenerator doesn't do anything fancy so it should be easy to use a couple of find and replace scripts to convert it to something else.
From researching things about the game I found out that the game uses 16x16KB ROM Banks - to extract the code for each bank is it as simple as reading 16KB from the PRG file, storing it, then reading another 16KB and so on?
Or is there something more complicated at play here?
Thanks in advance
EDIT: After splitting the file into 16x16KB chunks - MOST could be read and parsed by the regenerator, however, some split files could not be read and caused the program to crash. Guess I need to do quite a bit more research haha
so 16byte header
Don't save them as PRGs though, as PRG has a special meaning on the C64, as it will give it a 2 byte header. name them '.bin' so regenerator knows that are not 'c64 prg' files. You will need to adjust the offsets in the program by hand.
Crashing doesn't sound right when it opens a file, I've never had it crash from opening a file before.