git.y1.nz

gbdk-2020

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

commit ff01951295aef8be715250cc5427587931844a43
parent 165fd693e0e423658890e13a66a2e6293a39ace6
Author: Toxa <untoxa@mail.ru>
Date:   Tue,  7 Sep 2021 23:25:45 +0300

SMS/GG: asm macro for canceling pending VDP interrupts

Diffstat:
Mgbdk-lib/libc/targets/z80/crt0.s2+-
Mgbdk-lib/libc/targets/z80/gg/global.s4++++
Mgbdk-lib/libc/targets/z80/sms/global.s4++++
3 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/gbdk-lib/libc/targets/z80/crt0.s b/gbdk-lib/libc/targets/z80/crt0.s @@ -115,7 +115,7 @@ _WRITE_VDP_DATA:: call _set_default_palette - in a, (.VDP_STAT) ; cancel pending VDP interrupts + VDP_CANCEL_INT ei ; re-enable interrupts before going to main() call _main diff --git a/gbdk-lib/libc/targets/z80/gg/global.s b/gbdk-lib/libc/targets/z80/gg/global.s @@ -273,6 +273,10 @@ lbl: lbl: .endm +.macro VDP_CANCEL_INT + in a, (.VDP_STAT) ; cancel pending VDP interrupts +.endm + .macro WRITE_VDP_CMD_HL rst 0x10 .endm diff --git a/gbdk-lib/libc/targets/z80/sms/global.s b/gbdk-lib/libc/targets/z80/sms/global.s @@ -237,6 +237,10 @@ lbl: lbl: .endm +.macro VDP_CANCEL_INT + in a, (.VDP_STAT) ; cancel pending VDP interrupts +.endm + .macro WRITE_VDP_CMD_HL rst 0x10 .endm

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