gbdk-2020 | GameBoy Development Kit |
| download: https://git.y1.nz/archives/gbdk.tar.gz | |
| README | Files | Log | Refs | LICENSE |
commit d096d007857827172a8477f86e4de25bd5b4d228 parent db154c4740d54d306f97a0f4af08821a9db06590 Author: Toxa <untoxa@mail.ru> Date: Wed, 8 Sep 2021 19:57:21 +0300 cancel_pending_interrupts() Diffstat:
| M | gbdk-lib/include/gb/gb.h | 6 | +++++- |
| M | gbdk-lib/include/sms/sms.h | 14 | ++++++++++++++ |
2 files changed, 19 insertions(+), 1 deletion(-)
diff --git a/gbdk-lib/include/gb/gb.h b/gbdk-lib/include/gb/gb.h @@ -286,7 +286,11 @@ void nowait_int_handler(void) NONBANKED; */ void wait_int_handler(void) NONBANKED; - +/** Cancel pending interrupts + */ +inline uint8_t cancel_pending_interrupts() { + return IF_REG = 0; +} /** Set the current screen mode - one of M_* modes diff --git a/gbdk-lib/include/sms/sms.h b/gbdk-lib/include/sms/sms.h @@ -169,10 +169,24 @@ void add_VBL(int_handler h) __z88dk_fastcall __preserves_regs(d, e, iyh, iyl); */ void add_LCD(int_handler h) __z88dk_fastcall __preserves_regs(b, c, iyh, iyl); +/** Does nothing on SMS/GG + */ void add_TIM(int_handler h); + +/** Does nothing on SMS/GG + */ void add_SIO(int_handler h); + +/** Does nothing on SMS/GG + */ void add_JOY(int_handler h); +/** Cancel pending interrupts + */ +inline uint8_t cancel_pending_interrupts() { + return VDP_STATUS; +} + inline void move_bkg(uint8_t x, uint8_t y) { __WRITE_VDP_REG(VDP_RSCX, -x); __WRITE_VDP_REG(VDP_RSCY, y);
This webpage is intended to be an accessible preview of this repository. To get a fuller picture, clone it and use the git CLI.