You either count cycles, or do the stupid trial-error-nintendulator method:
get remotely close to the number of cycles you need, find out what pixel Nintendulator says you're at, then compensate by taking away or adding several cycles if you're not in hblank.
The even/odd flag is internal; the only way to "access" it is via obscure methods only useful in reverse-engineering. If you're trying to synchronize exactly to PPU pixels for a game, you're doing something wrong, as you don't need that level of accuracy (and you can only synchronize to every third pixel per frame, at best).
No, I don't want to sync to the pixel level.
Only to scanlines, to be able to do partial scrolling.
With sprite 0 hit it's very straightforward, but it only happens once per frame.
Dwedit wrote:
...compensate by taking away or adding several cycles if you're not in hblank.
No, I don't want to sync to the pixel level. Only to scanlines, to be able to do partial scrolling. With sprite 0 hit it's very straightforward, but it only happens once per frame.
Sorry to come up and doing some publicity, but that should help you (also there is a text version here).