Fixed timing issues with the DMG boot ROM. Closes #20.

This commit is contained in:
Lior Halphon 2017-12-31 23:02:28 +02:00
parent 42bf575a0e
commit d62ff4eb75
1 changed files with 10 additions and 6 deletions

View File

@ -80,14 +80,14 @@ Start:
; Play first sound
ld a, $83
call PlaySound
ld b, 15
ld b, 5
call WaitBFrames
; Play second sound
ld a, $c1
call PlaySound
; Wait ~2.5 seconds
ld b, 150
; Wait ~1.15 seconds
ld b, 70
call WaitBFrames
; Set registers to match the original DMG boot
@ -123,9 +123,13 @@ DoubleBitsAndWriteRow:
ret
WaitFrame:
ldh a, [$44]
cp $90
jr nz, WaitFrame
push hl
ld hl, $FF0F
res 0, [hl]
.wait
bit 0, [hl]
jr z, .wait
pop hl
ret
WaitBFrames: