X-Git-Url: http://git.joshuawise.com/fpgaboy.git/blobdiff_plain/39a68cde9f2a76dabfcc9d7654f212ad1d7b356a..7d59dad969a6cd1e42958f4c805d1d373ee04713:/diag.asm diff --git a/diag.asm b/diag.asm index 7f06de0..2c843eb 100644 --- a/diag.asm +++ b/diag.asm @@ -51,16 +51,58 @@ signon: db $0D,$0A,$1B,"[1mFPGABoy Diagnostic ROM",$1B,"[0m",$0D,$0A,0 putscreen: - ld a, $FF ; Copy two tiles. - ld hl, $8000 + ; Wait for vblank +.stat: ld a, [$FF41] + ld [$FF51], a + and $03 ; mode + cp $01 ; VBLANK + jr nz, .stat + + ld hl, $8000 ; Copy two tiles. + ld a, $AA + ld [hli], a + ld [hli], a + ld a, $55 + ld [hli], a + ld [hli], a + ld a, $AA + ld [hli], a + ld [hli], a + ld a, $55 + ld [hli], a + ld [hli], a + ld a, $AA + ld [hli], a + ld [hli], a + ld a, $55 + ld [hli], a + ld [hli], a + ld a, $AA + ld [hli], a + ld [hli], a + ld a, $55 ld [hli], a ld [hli], a xor a ld [hli], a ld [hli], a + ld [hli], a + ld [hli], a + ld [hli], a + ld [hli], a + ld [hli], a + ld [hli], a + ld [hli], a + ld [hli], a + ld [hli], a + ld [hli], a + ld [hli], a + ld [hli], a + ld [hli], a + ld [hli], a ld hl, $9800 -.loop: ld a, $FF +.loop: ld a, $01 ld [hli], a xor a ld [hli], a @@ -82,6 +124,11 @@ vbl: ld a, [c] inc a ld [c], a + + ld c, $43 ; SCX + ld a, [c] + inc a + ld [c], a POP HL POP DE