; Tests timing of VBL being set, and special case where reading VBL flag ; as it would be set causes it to not be set for that frame. .include "prefix_ppu.a" test_name: .db "VBL TIMING",0 test_too_soon: jsr delay_20 lda $2002 and #$80 jsr error_if_ne lda $2002 and #$80 jsr error_if_eq rts test_too_late: jsr delay_21 lda $2002 and #$80 jsr error_if_eq lda $2002 and #$80 jsr error_if_ne rts .code reset: jsr begin_ppu_test lda #2;) Flag should read as clear 3 PPU clocks before VBL sta