Fix InitCGBPals being called after LCD enabled causing innaccessible VRAM access (#8)

This commit is contained in:
xCrystal 2023-08-10 18:23:22 +02:00
parent 25d112c0b0
commit 1ee4cc49ed

View File

@ -119,6 +119,8 @@ Init::
ldh [hWX], a
ldh [rWX], a
farcall InitCGBPals
ld a, LCDC_DEFAULT ; %11100011
; LCD on
; Win tilemap 1
@ -133,8 +135,6 @@ Init::
ld a, CONNECTION_NOT_ESTABLISHED
ldh [hSerialConnectionStatus], a
farcall InitCGBPals
ld a, HIGH(vBGMap1)
ldh [hBGMapAddress + 1], a
xor a ; LOW(vBGMap1)