gbdk-2020 | GameBoy Development Kit |
| download: https://git.y1.nz/archives/gbdk.tar.gz | |
| README | Files | Log | Refs | LICENSE |
commit e141c7d10cbc01128a65744974ae6733f66706ee parent 821a395fd7f090f56824992e65e113173de88eeb Author: Toxa <untoxa@mail.ru> Date: Mon, 25 Jan 2021 18:34:54 +0300 DISABLE_OAM_DMA/ENABLE_OAM_DMA/SET_SHADOW_OAM_ADDRESS Diffstat:
| M | gbdk-lib/include/gb/gb.h | 16 | ++++++++++++++++ |
1 file changed, 16 insertions(+), 0 deletions(-)
diff --git a/gbdk-lib/include/gb/gb.h b/gbdk-lib/include/gb/gb.h @@ -987,6 +987,22 @@ extern volatile struct OAM_item_t shadow_OAM[]; */ __REG _shadow_OAM_base; +/** Disable OAM DMA copy each VBlank +*/ +#define DISABLE_OAM_DMA \ + _shadow_OAM_base = 0 + +/** Enable OAM DMA copy each VBlank and set it to transfer default shadow_OAM array +*/ +#define ENABLE_OAM_DMA \ + _shadow_OAM_base = (UBYTE)((UWORD)&shadow_OAM >> 8) + +/** Enable OAM DMA copy each VBlank and set it to transfer any 256-byte aligned array +*/ +inline void SET_SHADOW_OAM_ADDRESS(void * address) { + _shadow_OAM_base = (UBYTE)((UWORD)address >> 8); +} + /** Sets sprite number __nb__ to display tile number __tile__. @param nb Sprite number, range 0 - 39
This webpage is intended to be an accessible preview of this repository. To get a fuller picture, clone it and use the git CLI.