gbdk-2020 | GameBoy Development Kit |
| download: https://git.y1.nz/archives/gbdk.tar.gz | |
| README | Files | Log | Refs | LICENSE |
commit de1bd7b473b85228644b6e054faaee70d76f8036 parent 34053c6bbee961cce3ee070befccca49098362b6 Author: Toxa <untoxa@mail.ru> Date: Thu, 28 Mar 2024 16:20:39 +0300 define SET_BORDER_COLOR() macro for all platforms Diffstat:
| M | gbdk-lib/include/gb/gb.h | 4 | ++++ |
| M | gbdk-lib/include/msx/msx.h | 4 | ++++ |
| M | gbdk-lib/include/nes/nes.h | 5 | +++++ |
| M | gbdk-lib/include/sms/sms.h | 4 | ++++ |
4 files changed, 17 insertions(+), 0 deletions(-)
diff --git a/gbdk-lib/include/gb/gb.h b/gbdk-lib/include/gb/gb.h @@ -872,6 +872,10 @@ void hiramcpy(uint8_t dst, const void *src, uint8_t n) OLDCALL PRESERVES_REGS(b, */ #define SHOW_LEFT_COLUMN +/** Does nothing for GB + */ +#define SET_BORDER_COLOR(C) + /** Turns on the background layer. Sets bit 0 of the LCDC register to 1. */ diff --git a/gbdk-lib/include/msx/msx.h b/gbdk-lib/include/msx/msx.h @@ -265,6 +265,10 @@ void refresh_OAM(void); #define SHOW_LEFT_COLUMN \ __WRITE_VDP_REG(VDP_R0, __READ_VDP_REG(VDP_R0) &= (~R0_LCB)) +/** Sets border color + */ +#define SET_BORDER_COLOR(C) __WRITE_VDP_REG(VDP_R7, ((C) | 0xf0u)) + /** Turns on the background layer. Not yet implemented */ diff --git a/gbdk-lib/include/nes/nes.h b/gbdk-lib/include/nes/nes.h @@ -500,6 +500,11 @@ void refresh_OAM(void) NO_OVERLAY_LOCALS; #define SHOW_LEFT_COLUMN \ shadow_PPUMASK |= (PPUMASK_SHOW_BG_LC | PPUMASK_SHOW_SPR_LC); +/** Does nothing for NES + not implemented yet + */ +#define SET_BORDER_COLOR(C) + /** Turns on the background layer. Sets bit 0 of the LCDC register to 1. */ diff --git a/gbdk-lib/include/sms/sms.h b/gbdk-lib/include/sms/sms.h @@ -272,6 +272,10 @@ void refresh_OAM(void); #define SHOW_LEFT_COLUMN \ __WRITE_VDP_REG(VDP_R0, __READ_VDP_REG(VDP_R0) &= (~R0_LCB)) +/** Sets border color + */ +#define SET_BORDER_COLOR(C) __WRITE_VDP_REG(VDP_R7, ((C) | 0xf0u)) + /** Turns on the background layer. Not yet implemented */
This webpage is intended to be an accessible preview of this repository. To get a fuller picture, clone it and use the git CLI.