|
I am currently attempting to reverse-engineer Dragon Warrior 1, and have encountered a few questions. (FYI, DW1 uses MMC1 and has 4 pages of PRG-ROM.)
1. Does going to an interrupt push the current PC onto the stack? I am encountering an rts after tracing through reset for a while, and I have nothing on the stack. What is the difference between rti and rts?
2. I encounter the following lines in the code:
label1: lda $2002 bmi label1 label2: lda $2002 bpl label2 label3: lda $2002 bmi label3
What does this accomplish?
3. The first two commands of the reset vector are as follows:
sei inc $FFDF
currently in the PRG-ROM, byte $FFDF is simply a defined byte (i.e. not part of an instruction) with an initial value of $80. Does the inc command cause $81 to be written to register 3 of MMC1? If not, what does this line do?
4. A while into the code, the program writes the value of #$03 to $FFFF (through the use of right shifts). However, the program has never written any value to any of the other registers, so which bank is being replaced by bank 3? How does the program know?
The answer to any of these questions would be greatly appreciated. God bless you all.
|