git.y1.nz

gbdk-2020

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

commit 35433ab344502647cc52bafee6424537ee9c5051
parent c3f5af60f1725310af49db449f2752ca6ceb42aa
Author: Toxa <untoxa@mail.ru>
Date:   Wed, 25 Aug 2021 18:07:28 +0300

SMS/GG: fix infinite loop in set_tile_map*()

Diffstat:
Mgbdk-lib/libc/targets/z80/set_tile_map.s8++------
Mgbdk-lib/libc/targets/z80/set_tile_map_compat.s8++------
Mgbdk-lib/libc/targets/z80/set_tile_map_xy.s3++-
Mgbdk-lib/libc/targets/z80/set_tile_map_xy_compat.s3++-
4 files changed, 8 insertions(+), 14 deletions(-)

diff --git a/gbdk-lib/libc/targets/z80/set_tile_map.s b/gbdk-lib/libc/targets/z80/set_tile_map.s @@ -1,12 +1,11 @@ .include "global.s" .globl .set_tile_map_xy - ;; BANKED: checked + .area _HOME ; void set_tile_map(uint8_t x, uint8_t y, uint8_t w, uint8_t h, const uint8_t *tiles) __z88dk_callee __preserves_regs(iyh, iyl); _set_tile_map:: - pop hl ; HL = ret pop bc ; BC = YX pop de ; DE = WH @@ -19,6 +18,4 @@ _set_tile_map:: ld c, e ld e, a ; BC = data, DE = YX - call .set_tile_map_xy - - ret - + jp .set_tile_map_xy diff --git a/gbdk-lib/libc/targets/z80/set_tile_map_compat.s b/gbdk-lib/libc/targets/z80/set_tile_map_compat.s @@ -1,12 +1,11 @@ .include "global.s" .globl .set_tile_map_xy - ;; BANKED: checked + .area _HOME ; void set_tile_map(uint8_t x, uint8_t y, uint8_t w, uint8_t h, const uint8_t *tiles) __z88dk_callee __preserves_regs(iyh, iyl); _set_tile_map_compat:: - pop hl ; HL = ret pop bc ; BC = YX pop de ; DE = WH @@ -19,6 +18,4 @@ _set_tile_map_compat:: ld c, e ld e, a ; BC = data, DE = YX - call .set_tile_map_xy_compat - - ret - + jp .set_tile_map_xy_compat diff --git a/gbdk-lib/libc/targets/z80/set_tile_map_xy.s b/gbdk-lib/libc/targets/z80/set_tile_map_xy.s @@ -68,12 +68,13 @@ SMS_WRITE_VDP_CMD ixh, ixl dec e jp nz, 2$ + jp 7$ 3$: inc ixl inc ixl dec e jp nz, 2$ - +7$: pop ix pop de diff --git a/gbdk-lib/libc/targets/z80/set_tile_map_xy_compat.s b/gbdk-lib/libc/targets/z80/set_tile_map_xy_compat.s @@ -71,12 +71,13 @@ SMS_WRITE_VDP_CMD ixh, ixl dec e jp nz, 2$ + jp 7$ 3$: inc ixl inc ixl dec e jp nz, 2$ - +7$: pop ix pop de

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