I need help in understanding a couple of things.
I'd first like to say that I have a fairly good fundamental understanding of processors behind me, and there's quite a bit of documentation about the NES out there (very helpful!), and I've read much of it, but there are still just a FEW little cracks that I'd like filled.
Okay, so apparently the PRG-ROM code gets copied into addresses $8000 - $FFFF. I just want to know - when you're writing the NES assembly code (or when my emulator READS this code, more accurately), and you are telling the program counter to go to an address (any way you want, let's say for example the easiest way -- JMP $xxxx, the jump absolute instruction), what address should you put in for the $xxxx?
That question was confusing. It's from an NES developer's point of view, if that helps. I'll try again: If I am developing an NES ROM, and I want to tell the program counter to go somewhere, shouldn't I ONLY be telling it to go to $8000 - $FFFF? Is this the ONLY place where program CODE, not RAM, is kept? And therefore I shouldn't be writing any JMPs to $05F0, in the RAM, or like $3000, in the I/O registers? I only ask because I disassembled a ROM file to make sure of this and I see a bunch of absolute jumps to RAM & I/O. Granted there are few so it could just be unused junk code, I can accept that. Just wondering if this is absolute -- ONLY there? And I'm also wondering what it does do with an instruction that leads to the program counter being invalid, like $0000 or something.
I guess another thing I'm wondering about is those memory mappers to switch the ROM banks .. first of all, is this done by code? Second of all, either way, how is it done??
Thanks a lot, I'd appreciate the help.
I'd first like to say that I have a fairly good fundamental understanding of processors behind me, and there's quite a bit of documentation about the NES out there (very helpful!), and I've read much of it, but there are still just a FEW little cracks that I'd like filled.
Okay, so apparently the PRG-ROM code gets copied into addresses $8000 - $FFFF. I just want to know - when you're writing the NES assembly code (or when my emulator READS this code, more accurately), and you are telling the program counter to go to an address (any way you want, let's say for example the easiest way -- JMP $xxxx, the jump absolute instruction), what address should you put in for the $xxxx?
That question was confusing. It's from an NES developer's point of view, if that helps. I'll try again: If I am developing an NES ROM, and I want to tell the program counter to go somewhere, shouldn't I ONLY be telling it to go to $8000 - $FFFF? Is this the ONLY place where program CODE, not RAM, is kept? And therefore I shouldn't be writing any JMPs to $05F0, in the RAM, or like $3000, in the I/O registers? I only ask because I disassembled a ROM file to make sure of this and I see a bunch of absolute jumps to RAM & I/O. Granted there are few so it could just be unused junk code, I can accept that. Just wondering if this is absolute -- ONLY there? And I'm also wondering what it does do with an instruction that leads to the program counter being invalid, like $0000 or something.
I guess another thing I'm wondering about is those memory mappers to switch the ROM banks .. first of all, is this done by code? Second of all, either way, how is it done??
Thanks a lot, I'd appreciate the help.