In my emulator, I don't use CPU cycle counters - if the CPU needs a clock, the PPU runs for 3 cycles firstly.
Problem: for every test suite, I noticed a problem with the timing. If the VBlank time is reached, I need to check the number of remaining cycles, as 3, 2, 1 or none. If non-zero, the VBlank flag is set; otherwise, it's set in the next CPU clock.
It's an aligment done by the test suite (read: Blargg's test ROMs), like "1 cycle before VBlank" or "1 cycle after the VBlank" and so on. While such thing works with no apparent flaws for the rest of the games, I wonder if it's correct.
Problem: for every test suite, I noticed a problem with the timing. If the VBlank time is reached, I need to check the number of remaining cycles, as 3, 2, 1 or none. If non-zero, the VBlank flag is set; otherwise, it's set in the next CPU clock.
It's an aligment done by the test suite (read: Blargg's test ROMs), like "1 cycle before VBlank" or "1 cycle after the VBlank" and so on. While such thing works with no apparent flaws for the rest of the games, I wonder if it's correct.