git.y1.nz

gbdk-2020

GameBoy Development Kit
download: https://git.y1.nz/archives/gbdk.tar.gz
README | Files | Log | Refs | LICENSE

commit 2d0a54c421f9cc187e81c51669c433db0ce7c237
parent a713142f7945b9512f7bd1db02badf4faa72dd57
Author: Toxa <untoxa@mail.ru>
Date:   Sat,  4 May 2024 19:41:24 +0300

GB: prevent VRAM corruption when loading tilemaps and submaps

Diffstat:
Mgbdk-lib/libc/targets/sm83/set_tile_submap.s4+++-
Mgbdk-lib/libc/targets/sm83/set_xy_t.s4+++-
2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/gbdk-lib/libc/targets/sm83/set_tile_submap.s b/gbdk-lib/libc/targets/sm83/set_tile_submap.s @@ -102,9 +102,11 @@ _set_bkg_submap:: push de ; store wh push bc ; store dest 3$: ; copy w tiles - WAIT_STAT ld a, (__submap_tile_offset) add (hl) + ld e, a + WAIT_STAT + ld a, e ld (bc), a inc hl diff --git a/gbdk-lib/libc/targets/sm83/set_xy_t.s b/gbdk-lib/libc/targets/sm83/set_xy_t.s @@ -54,9 +54,11 @@ __map_tile_offset:: 3$: ; Copy W tiles - WAIT_STAT LD A, (__map_tile_offset) ADD (HL) + LD E, A + WAIT_STAT + LD A, E LD (BC), A INC HL

This webpage is intended to be an accessible preview of this repository. To get a fuller picture, clone it and use the git CLI.