ld a, $04 ;start timer, 4.096KHz
ld c, $07
ld [c], a
-
+
ld hl, $DF81
xor a
ld [hli], a
db $0D,$0A,$1B,"[1mFPGABoy Diagnostic ROM",$1B,"[0m",$0D,$0A,0
vbl:
+ PUSH AF
+ PUSH BC
+ PUSH DE
+ PUSH HL
+
+ xor a
+ ld c, $0F
+ ld [c], a
+
+ ld c, $42 ; SCY
+ ld a, [c]
+ inc a
+ ld [c], a
+
+ POP HL
+ POP DE
+ POP BC
+ POP AF
+
+ RETI
+
lcdc:
PUSH AF
PUSH BC
ld c, $0F
ld [c], a
+ ld c, $45 ; LYC
+ ld a, [c]
+ inc a
+ ld [c], a
+
ld hl, $DF82
ld a, [hld]
cp 0