wbrian wrote:One thing I'm clearly doing wrong in my emulator is starting execution with PC = 0x8000, where instead it should start at 0xC000. Am in incorrect in believing that this should be mostly equivalent, though? For NROM in particular, isn't the address space starting at 0x8000 a mirror of 0xC000? Following up on this, for any particular game, how do we know which offset to being execution at? Is it mapper specific?
NROM-128 (16k) mirrors data at $8000 and $C000, but I think the canonical position of the code is $C000, mostly because the ROM already has to include the vector table at $FFFA.
What ROM data is mapped to which ranges is mapper specific, but reset will always start from the position specified at $FFFC regardless of mapper.
Now, the game in question does have identical data at $8000 and $C000, and $FFFC does in fact point to $C000. You are correct to believe that it's "mostly" equivalent in this case. For this particular ROM, I don't see any problems caused by starting at $8000 instead in FCEUX. There are potential differences from starting at a mirrored code address, but I don't believe they affect this game.
So, even though you had not been using the reset vector, it's not actually what caused the problem for you. Maybe tepples' suggestion to look at the subroutine at $CD9E would help? Perhaps you haven't implemented JMP (indirect) correctly, or maybe you store an off-by-one return address on the stack, instead of incrementing it after RTS?