If you're not doing any raster effects, you only need to reset the scroll once per frame, before rendering starts. Normally that'd be at the end of your NMI handler, after all PPU operations have already been done.sailense wrote:Right now I'm resetting scoll values in all my subroutines where I write to $2006. Is that the best way to go?
Doing it in the NMI can actually cause bugs during lag frames, because the same logic frame may end up using 2 different states of the same button if an NMI happens between two checks. Better do it in the main loop, once for each logic frame.And when is the best time to read from controller? Every NMI or during the main loop?