gbdk-2020 | GameBoy Development Kit |
| download: https://git.y1.nz/archives/gbdk.tar.gz | |
| README | Files | Log | Refs | LICENSE |
commit c4c174d593a7591b74b1ad1701a6b44843225297 parent d96ef1e82951300f3f5b1821c1458bd00aa8e7f6 Author: Toxa <untoxa@mail.ru> Date: Sat, 30 Mar 2024 16:23:31 +0300 SMS/GG/MSX __WRITE_VDP_REG_UNSAFE VDP access macro while interrupts are disabled, for use in the ISR handlers, for instance Diffstat:
| M | gbdk-lib/include/msx/msx.h | 1 | + |
| M | gbdk-lib/include/sms/sms.h | 1 | + |
2 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/gbdk-lib/include/msx/msx.h b/gbdk-lib/include/msx/msx.h @@ -91,6 +91,7 @@ #define S_PAL(n) (((n) & 0x01U) << 3) // VDP helper macros +#define __WRITE_VDP_REG_UNSAFE(REG, v) shadow_##REG=(v),VDP_CMD=(shadow_##REG),VDP_CMD=REG #define __WRITE_VDP_REG(REG, v) shadow_##REG=(v);__asm__("di");VDP_CMD=(shadow_##REG);VDP_CMD=REG;__asm__("ei") #define __READ_VDP_REG(REG) shadow_##REG diff --git a/gbdk-lib/include/sms/sms.h b/gbdk-lib/include/sms/sms.h @@ -98,6 +98,7 @@ #define S_PAL(n) (((n) & 0x01U) << 3) // VDP helper macros +#define __WRITE_VDP_REG_UNSAFE(REG, v) shadow_##REG=(v),VDP_CMD=(shadow_##REG),VDP_CMD=REG #define __WRITE_VDP_REG(REG, v) shadow_##REG=(v);__asm__("di");VDP_CMD=(shadow_##REG);VDP_CMD=REG;__asm__("ei") #define __READ_VDP_REG(REG) shadow_##REG
This webpage is intended to be an accessible preview of this repository. To get a fuller picture, clone it and use the git CLI.