gbdk-2020 | GameBoy Development Kit |
| download: https://git.y1.nz/archives/gbdk.tar.gz | |
| README | Files | Log | Refs | LICENSE |
commit effcf9c52b5c501dadbcd12ee6c88cc893916619 parent 16fb151c328ed2c6b4c1871a25c98324a0d37062 Author: Toxa <untoxa@mail.ru> Date: Sun, 12 Jun 2022 15:17:06 +0300 ALL TARGETS: some CGB-specific and cross-platform definitions for the VBK_REG values and it's emulation on the other targets Diffstat:
| M | gbdk-lib/include/gb/hardware.h | 21 | +++++++++++++++++++++ |
| M | gbdk-lib/include/msx/hardware.h | 3 | +++ |
| M | gbdk-lib/include/sms/hardware.h | 3 | +++ |
3 files changed, 27 insertions(+), 0 deletions(-)
diff --git a/gbdk-lib/include/gb/hardware.h b/gbdk-lib/include/gb/hardware.h @@ -311,6 +311,27 @@ __REG KEY1_REG; /**< CPU speed */ __REG VBK_REG; /**< VRAM bank select (CGB only)*/ #define rVBK VBK_REG + +#define VBK_BANK_0 0 /**< Select Regular Map and Normal Tiles (CGB Mode Only) */ +#define VBK_TILES 0 /**< Select Regular Map and Normal Tiles (CGB Mode Only) */ +#define VBK_BANK_1 1 /**< Select Map Attributes and Extra Tile Bank (CGB Mode Only)*/ +#define VBK_ATTRIBUTES 1 /**< Select Regular Map and Normal Tiles (CGB Mode Only) */ + +#define BKGF_PRI 0b10000000 /**< Background CGB BG and Window over Sprite priority Enabled */ +#define BKGF_YFLIP 0b01000000 /**< Background CGB Y axis flip: Vertically mirrored */ +#define BKGF_XFLIP 0b00100000 /**< Background CGB X axis flip: Horizontally mirrored */ +#define BKGF_BANK0 0b00000000 /**< Background CGB Tile VRAM-Bank: Use Bank 0 (CGB Mode Only) */ +#define BKGF_BANK1 0b00001000 /**< Background CGB Tile VRAM-Bank: Use Bank 1 (CGB Mode Only) */ + +#define BKGF_CGB_PAL0 0b00000000 /**< Background CGB Palette number (CGB Mode Only) */ +#define BKGF_CGB_PAL1 0b00000001 /**< Background CGB Palette number (CGB Mode Only) */ +#define BKGF_CGB_PAL2 0b00000010 /**< Background CGB Palette number (CGB Mode Only) */ +#define BKGF_CGB_PAL3 0b00000011 /**< Background CGB Palette number (CGB Mode Only) */ +#define BKGF_CGB_PAL4 0b00000100 /**< Background CGB Palette number (CGB Mode Only) */ +#define BKGF_CGB_PAL5 0b00000101 /**< Background CGB Palette number (CGB Mode Only) */ +#define BKGF_CGB_PAL6 0b00000110 /**< Background CGB Palette number (CGB Mode Only) */ +#define BKGF_CGB_PAL7 0b00000111 /**< Background CGB Palette number (CGB Mode Only) */ + __REG HDMA1_REG; /**< DMA control 1 */ #define rHDMA1 HDMA1_REG __REG HDMA2_REG; /**< DMA control 2 */ diff --git a/gbdk-lib/include/msx/hardware.h b/gbdk-lib/include/msx/hardware.h @@ -180,6 +180,9 @@ extern const UBYTE _SYSTEM; extern volatile UBYTE VDP_ATTR_SHIFT; +#define VBK_TILES 0 +#define VBK_ATTRIBUTES 1 + #define VDP_SAT_TERM 0xD0 #if defined(__TARGET_msxdos) diff --git a/gbdk-lib/include/sms/hardware.h b/gbdk-lib/include/sms/hardware.h @@ -185,6 +185,9 @@ extern const UBYTE _SYSTEM; extern volatile UBYTE VDP_ATTR_SHIFT; +#define VBK_TILES 0 +#define VBK_ATTRIBUTES 1 + #define VDP_SAT_TERM 0xD0 #if defined(__TARGET_sms)
This webpage is intended to be an accessible preview of this repository. To get a fuller picture, clone it and use the git CLI.