gbdk-2020 | GameBoy Development Kit |
| download: https://git.y1.nz/archives/gbdk.tar.gz | |
| README | Files | Log | Refs | LICENSE |
commit dec16ab22e9be54fe91332488ae76ab01eabcfab parent 853c89d2964920f04bf73ab96d316f35b5f2912c Author: Tempestro <112181066+Tempestro@users.noreply.github.com> Date: Sat, 25 May 2024 20:21:03 +0200 Mention that HIDE_BKG/SHOW_BKG don't work on CGB Adds a mention to the docs that HIDE_BKG and SHOW_BKG do not work while running in CGB mode, the relevant bit instead overrides all background/window priority over the sprite layer, see Pandocs 4.4 Diffstat:
| M | gbdk-lib/include/gb/gb.h | 12 | ++++++++++++ |
1 file changed, 12 insertions(+), 0 deletions(-)
diff --git a/gbdk-lib/include/gb/gb.h b/gbdk-lib/include/gb/gb.h @@ -890,12 +890,24 @@ void hiramcpy(uint8_t dst, const void *src, uint8_t n) OLDCALL PRESERVES_REGS(b, /** Turns on the background layer. Sets bit 0 of the LCDC register to 1. + + Doesn't work in CGB mode - the bit is reused to control sprite priority + over background and window layers instead. + If 1 @ref (SHOW_BKG), everything works as usual. + If 0 @ref (HIDE_BKG), all sprites are always drawn over background and window, + ignoring any other priority settings. */ #define SHOW_BKG \ LCDC_REG|=LCDCF_BGON /** Turns off the background layer. Sets bit 0 of the LCDC register to 0. + + Doesn't work in CGB mode - the bit is reused to control sprite priority + over background and window layers instead. + If 1 @ref (SHOW_BKG), everything works as usual. + If 0 @ref (HIDE_BKG), all sprites are always drawn over background and window, + ignoring any other priority settings. */ #define HIDE_BKG \ LCDC_REG&=~LCDCF_BGON
This webpage is intended to be an accessible preview of this repository. To get a fuller picture, clone it and use the git CLI.