DRW wrote:
Yeah, the scrolling is indeed for the area after the split.
Top: Status bar.
Bottom: Playfield.
Oh, OK then. Somehow I missed that and thought the status bar was at the bottom.
Quote:
So, there's no flag inside the NES' architecture that I can check? I simply have to experiment?
Nope, no flag. You need to have the sprite 0 hit happen at a consistent time every frame and have the split take place a fixed number of cycles after that. You may need to add NOPs or a dummy loop so the writes happen at the correct time.
Quote:
But no matter what value I use, it is never exactly correct. Either some pixels are missing from the status bar (in every frame it's a different number, so the missing pixels are jumping) or the whole screen is shaking.
Yes, there will always be some wobbling where the split happens, because on the NES it's not possible to perfectly align the CPU and the PPU (you can get close with a humongous amount of work and trickery, but it's not really practical), but as long as the variation isn't bigger than 64 pixels (~21 CPU cycles) you should be able to fit it into the appropriate window.
If pixels are missing from the status bar and the bottom part shakes, that means that sometimes the writes are happening too early, so you still have to push them back a bit. You have to check in the debugger for several frames to see if the writes in all possible alignments are taking within the allowed range of time (pixel > 256 and < 320). If the split happens too early, the last scanline of the status bar will glitch and the bottom part will jump, if it happens too late, the first scanline of the bottom part will glitch.