Skip to content

Commit

Permalink
Update bankswitch.asm
Browse files Browse the repository at this point in the history
Now preserve register c
  • Loading branch information
Engezerstorung committed Jan 1, 2025
1 parent 48054f8 commit 9384f2d
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions home/bankswitch.asm
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,14 @@ Bankswitch::
ld a, b
ldh [hLoadedROMBank], a
ld [MBC1RomBank], a
ld bc, .Return
push bc
ldh a, [hColorHackTmp] ; [hColorHackTmps]
jp hl
.Return
call JumpToAddress
ldh [hColorHackTmp], a ; [hColorHackTmps]
pop bc
ld a, b
ldh [hLoadedROMBank], a
ld [MBC1RomBank], a
ldh a, [hColorHackTmp] ; [hColorHackTmps]
ret
JumpToAddress::
jp hl

0 comments on commit 9384f2d

Please sign in to comment.