git.y1.nz

gbdk-2020

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

commit 68332b4a1b5ebd271516337c19eb3b482014f04c
parent 145c1f0d0040e3776ca13175aecbe48b5bac058d
Author: Toxa <untoxa@mail.ru>
Date:   Fri, 27 Aug 2021 11:15:00 +0300

SMS/GG: better enable/disable shadow OAM to SAT macros (not affected by other calls)

Diffstat:
Mgbdk-lib/include/sms/sms.h4++--
Mgbdk-lib/libc/targets/z80/int.s10++++++----
2 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/gbdk-lib/include/sms/sms.h b/gbdk-lib/include/sms/sms.h @@ -415,12 +415,12 @@ extern volatile uint8_t _shadow_OAM_OFF; /** Disable shadow OAM to VRAM copy on each VBlank */ #define DISABLE_VBL_TRANSFER \ - _shadow_OAM_OFF = 1 + _shadow_OAM_base = 0 /** Enable shadow OAM to VRAM copy on each VBlank */ #define ENABLE_VBL_TRANSFER \ - _shadow_OAM_OFF = 0 + _shadow_OAM_base = (uint8_t)((uint16_t)&shadow_OAM >> 8) /** Amount of hardware sprites in OAM */ diff --git a/gbdk-lib/libc/targets/z80/int.s b/gbdk-lib/libc/targets/z80/int.s @@ -34,21 +34,23 @@ _INT_ISR:: jp nz, 1$ ld hl, #__shadow_OAM_base ld h, (hl) - ld l, a ; a == 0 here + ld l, a ; a == 0 here + or h + jp z, 1$ ld c, #.VDP_CMD ld a, #<.VDP_SAT out (c), a ld a, #>.VDP_SAT out (c), a - dec c ; c == .VDP_DATA + dec c ; c == .VDP_DATA call .OUTI64 - inc c ; c == .VDP_CMD + inc c ; c == .VDP_CMD ld a, #<(.VDP_SAT + 0x80) out (c), a ld a, #>(.VDP_SAT + 0x80) out (c), a - dec c ; c == .VDP_DATA + dec c ; c == .VDP_DATA call .OUTI128 1$:

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