NESDev and Strangulation Records messageboards
Forum Index | FAQ | New User | Login | Search

Previous ThreadView All ThreadsNext Thread*Show in Threaded Mode


SubjectThe joys of VBLANK safe code new  
Posted bymcmartin
Posted on1/18/02 03:46 AM
From IP12.234.29.87  



Exactly how much can you get away with in VBLANK code? This answer could have various levels of precision, requiring ever more complex calculations...

Easy stuff first. There are 113.75 or so cycles per scanline, according to a post I found on NESEmDev. There are 20 scanlines in an NTSC VBLANK (NEStech 4.M). That gives you 2,275 cycles of computation.

So, if you've got a 6502 emulator with a cycle counter, you're home free, almost. The NES is a multiprocessor, and I don't have much information about how it relates to the PPU.

Do writes to register memory locations (especially $2005, $2006, $2007, or $4014) take longer than the normal 5 cycles? If so, how much?

My immediate goal is to work out exactly how many times you can write to VRAM per VBLANK without smiting yourself - since one would like very much to be able to change name tables and such "behind the back" of the player without disabling the display every time. If this data is actually known, that would also be much appreciated.




SubjectRe: The joys of VBLANK safe code  
Posted bymcmartin
Posted on1/18/02 03:50 AM
From IP12.234.29.87  



Gah, typo. "Normal 4 cycles" for STA STX or STY Absolute...

--Michael




Previous ThreadView All ThreadsNext Thread*Show in Threaded Mode
Jump to

Memblers' homepage             Contact Me

Forums powered by WWWThreads Demo