Skip to content

Commit

Permalink
Use ldh [c], not ld [c]
Browse files Browse the repository at this point in the history
  • Loading branch information
Rangi42 committed Dec 27, 2024
1 parent da73f3a commit a2edcb0
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions BootROMs/cgb_boot.asm
Original file line number Diff line number Diff line change
Expand Up @@ -1085,11 +1085,11 @@ LoadBGPalettes:
LoadPalettes:
ld a, $80
or e
ld [c], a
ldh [c], a
inc c
.loop
ld a, [hli]
ld [c], a
ldh [c], a
dec d
jr nz, .loop
ret
Expand Down
16 changes: 8 additions & 8 deletions BootROMs/sgb_boot.asm
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,9 @@ Start:

.sendCommand
xor a
ld [c], a
ldh [c], a
ld a, $30
ld [c], a
ldh [c], a

ldh a, [hCommand]
call SendByte
Expand Down Expand Up @@ -116,9 +116,9 @@ Start:

; Done bit
ld a, $20
ld [c], a
ldh [c], a
ld a, $30
ld [c], a
ldh [c], a

; Wait 4 frames
ld e, 4
Expand All @@ -145,10 +145,10 @@ Start:
; Write to sound registers for DMG compatibility
ld c, LOW(rNR13)
ld a, $C1
ld [c], a
ldh [c], a
inc c
ld a, $7
ld [c], a
ldh [c], a

; Init BG palette
ld a, %11_11_11_00
Expand Down Expand Up @@ -185,9 +185,9 @@ SendByte:
jr c, .zeroBit
add a ; 10 -> 20
.zeroBit
ld [c], a
ldh [c], a
ld a, $30
ld [c], a
ldh [c], a
dec d
ret z
jr .loop
Expand Down

0 comments on commit a2edcb0

Please sign in to comment.