Fix clearing OAM and initializeing wave RAM

This commit is contained in:
Lior Halphon 2020-05-17 19:24:11 +03:00
parent a588993f28
commit 157123e118
1 changed files with 16 additions and 16 deletions

View File

@ -15,6 +15,22 @@ Start:
call ClearMemoryPage
ld [c], a
; Clear OAM
ld h, $fe
ld c, $a0
.clearOAMLoop
ldi [hl], a
dec c
jr nz, .clearOAMLoop
; Init waveform
ld c, $10
.waveformLoop
ldi [hl], a
cpl
dec c
jr nz, .waveformLoop
; Clear chosen input palette
ldh [InputPalette], a
; Clear title checksum
@ -29,22 +45,6 @@ Start:
ld a, $77
ldh [$24], a
ld hl, $FF30
; Init waveform
ld c, $10
.waveformLoop
ldi [hl], a
cpl
dec c
jr nz, .waveformLoop
; Clear OAM
ld h, $fe
ld c, $a0
.clearOAMLoop
ldi [hl], a
dec c
jr nz, .clearOAMLoop
; Init BG palette
ld a, $fc