@Tanuki its checking the vblank bit in ppustatus register. It waits for two full frame redraws to resync the ppu and cpu after a reset. The third inf loop at 8057 is after nmi is enabled and the next vblank after that causes the handler to be called
@Tanuki btw updateframe, drawsprites, drawbackground and drawnametable are probable totally wrong
You could scrap all of those if you wanted.
I just spit them out as best i could then went to getting stuff running so i could debug visually
@Tanuki it seriously is, except I found that writing the full symbolic execution engine for x86/x64 was easier to get right in some way because I knew all the quirks going in
Doing the PPU has been a bit of trouble so far