Skip to content

Commit

Permalink
Bugfix: Decompress overflow (it was writing into sram mail)
Browse files Browse the repository at this point in the history
  • Loading branch information
vulcandth committed May 30, 2024
1 parent 4e0e529 commit 2e09252
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions home/gfx.asm
Original file line number Diff line number Diff line change
Expand Up @@ -115,21 +115,27 @@ LoadFontsExtra::
farjp LoadFrame

DecompressRequest2bpp::
ld a, [rSVBK]
push af
ld a, BANK(wDecompressScratch)
ld [rSVBK], a

push de
ld a, BANK(sScratch)
call OpenSRAM
push bc

ld de, sScratch
ld de, wDecompressScratch
ld a, b
call FarDecompress

pop bc
pop hl

ld de, sScratch
ld de, wDecompressScratch
call Request2bpp
jmp CloseSRAM

pop af
ld [rSVBK], a
ret

FarCopyBytes::
; copy bc bytes from a:hl to de
Expand Down

0 comments on commit 2e09252

Please sign in to comment.