Hi,
I have posted here before, but I can't remember my old username, so hello again (a few years ago I made a copyNES from kevtris' schematic on his site, I was also considering using a NES to read controller data and output data to an XBOX for emulation, but never tried it.) So..
I have always wanted to, but recently decided maybe I would get more serious about learning to code for the NES. I have read tons of docs, and asm code, but once you start to actually code you realize you are not clear on some details.
I realize that this information is out there, I just want a an explicit clear answers/opinions to some questions I have.:
1. Should or can any PPU writes be done during the frame, besides of course ones that must be for desired effects - split screen scrolling, etc
2. When the PPU activates the NMI is it okay to immediately start writing to the PPU (Is the PPU already in vblank as soon as NMI code is hit or does the NMI activate a few clocks early)?
3. I see it is common practice to buffer most writes and push them to the PPU in NMI, but what about nametables? They take up a lot of space. would you buffer new offscreen tiles when scrolling? Is it common practice to buffer a nametable, or is the code for that done in the NMI, or is this where metatiles help?
4. When is it a good idea to turn off the PPU? I see the PPU has to be off if you are filling the whole nametable, is there anything else that takes more than vblank time?
5. If I am in my NMI and I know a sub routine is going to take more than vblank is it okay to shut off the PPU in NMI and do my thing, then turn it back on and continue.. any issues to worry about?
6. Proper way to shut off the PPU for long writes? Turn off rendering? Everything?
7. What is with the read of $2002 in NMI? do I really need to read (acknowledge) it? what if I don't? (more just curious here..)
I have posted here before, but I can't remember my old username, so hello again (a few years ago I made a copyNES from kevtris' schematic on his site, I was also considering using a NES to read controller data and output data to an XBOX for emulation, but never tried it.) So..
I have always wanted to, but recently decided maybe I would get more serious about learning to code for the NES. I have read tons of docs, and asm code, but once you start to actually code you realize you are not clear on some details.
I realize that this information is out there, I just want a an explicit clear answers/opinions to some questions I have.:
1. Should or can any PPU writes be done during the frame, besides of course ones that must be for desired effects - split screen scrolling, etc
2. When the PPU activates the NMI is it okay to immediately start writing to the PPU (Is the PPU already in vblank as soon as NMI code is hit or does the NMI activate a few clocks early)?
3. I see it is common practice to buffer most writes and push them to the PPU in NMI, but what about nametables? They take up a lot of space. would you buffer new offscreen tiles when scrolling? Is it common practice to buffer a nametable, or is the code for that done in the NMI, or is this where metatiles help?
4. When is it a good idea to turn off the PPU? I see the PPU has to be off if you are filling the whole nametable, is there anything else that takes more than vblank time?
5. If I am in my NMI and I know a sub routine is going to take more than vblank is it okay to shut off the PPU in NMI and do my thing, then turn it back on and continue.. any issues to worry about?
6. Proper way to shut off the PPU for long writes? Turn off rendering? Everything?
7. What is with the read of $2002 in NMI? do I really need to read (acknowledge) it? what if I don't? (more just curious here..)