nesdev.com
http://forums.nesdev.com/

Does input need to be polled every frame?
http://forums.nesdev.com/viewtopic.php?f=2&t=15384
Page 3 of 3

Author:  Pokun [ Wed Jan 18, 2017 5:21 am ]
Post subject:  Re: Does input need to be polled every frame?

Not OAM decay but you just said the PPU goes batshit and corrupts parts of OAM if rendering is turned off while sprites are being evaluated. I assumed sprite evaluation isn't being done during vblank. In that case turning off rendering in vblank is the safe way to turn off rendering I thought. "The frames and NMI" also suggest doing this, although it doesn't explain exactly why (it says something about that the screen jumps if rendering is turned on outside of vblank).

Author:  tokumaru [ Wed Jan 18, 2017 6:21 am ]
Post subject:  Re: Does input need to be polled every frame?

Pokun wrote:
you just said the PPU goes batshit and corrupts parts of OAM if rendering is turned off while sprites are being evaluated.

Ah, OK. This is a much bigger problem if rendering is being consistently turned off at a bad moment every frame, but one frame after transitions and such would hardly be noticeable. But you are right, delaying $2000/$2001 writes until vblank is the best practice. Not only you avoid any sprite corruption, but you also avoid displaying partial frames that may make the screen appear to "jump".

Page 3 of 3 All times are UTC - 7 hours
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/