gbdk-2020 | GameBoy Development Kit |
| download: https://git.y1.nz/archives/gbdk.tar.gz | |
| README | Files | Log | Refs | LICENSE |
commit e80a7cbb1909fe02f0acc2df053d7ee25a35f1b7 parent ef29520b710be20c2b4d4c8eec8c983d2c5dc8ce Author: Toxa <untoxa@mail.ru> Date: Mon, 26 Jul 2021 00:16:32 +0300 bit number constants for LCDC and STAT Diffstat:
| M | gbdk-lib/include/gb/hardware.h | 16 | ++++++++++++++++ |
| M | gbdk-lib/libc/gb/global.s | 16 | ++++++++++++++++ |
2 files changed, 32 insertions(+), 0 deletions(-)
diff --git a/gbdk-lib/include/gb/hardware.h b/gbdk-lib/include/gb/hardware.h @@ -168,6 +168,14 @@ __REG LCDC_REG; /** LCD control */ #define LCDCF_OBJON 0b00000010u #define LCDCF_BGOFF 0b00000000u #define LCDCF_BGON 0b00000001u +#define LCDCF_B_ON 7 +#define LCDCF_B_WIN9C00 6 +#define LCDCF_B_WINON 5 +#define LCDCF_B_BG8000 4 +#define LCDCF_B_BG9C00 3 +#define LCDCF_B_OBJ16 2 +#define LCDCF_B_OBJON 1 +#define LCDCF_B_BGON 0 __REG STAT_REG; /** LCD status */ #define rSTAT STAT_REG @@ -182,6 +190,14 @@ __REG STAT_REG; /** LCD status */ #define STATF_OAM 0b00000010u #define STATF_LCD 0b00000011u #define STATF_BUSY 0b00000010u +#define STATF_B_LYC 6 +#define STATF_B_MODE10 5 +#define STATF_B_MODE01 4 +#define STATF_B_MODE00 3 +#define STATF_B_LYCF 2 +#define STATF_B_VBL 0 +#define STATF_B_OAM 1 +#define STATF_B_BUSY 1 __REG SCY_REG; /** Scroll Y */ #define rSCY diff --git a/gbdk-lib/libc/gb/global.s b/gbdk-lib/libc/gb/global.s @@ -215,6 +215,14 @@ LCDCF_OBJON = 0b00000010 ; OBJ Display LCDCF_BGOFF = 0b00000000 ; BG Display LCDCF_BGON = 0b00000001 ; BG Display + LCDCF_B_ON = 7 + LCDCF_B_WIN9C00 = 6 + LCDCF_B_WINON = 5 + LCDCF_B_BG8000 = 4 + LCDCF_B_BG9C00 = 3 + LCDCF_B_OBJ16 = 2 + LCDCF_B_OBJON = 1 + LCDCF_B_BGON = 0 .STAT = 0x41 ; LCD status rSTAT = 0xFF41 @@ -229,6 +237,14 @@ STATF_OAM = 0b00000010 ; OAM-RAM is used by system STATF_LCD = 0b00000011 ; Both OAM and VRAM used by system STATF_BUSY = 0b00000010 ; When set, VRAM access is unsafe + STATF_B_LYC = 6 + STATF_B_MODE10 = 5 + STATF_B_MODE01 = 4 + STATF_B_MODE00 = 3 + STATF_LYCF = 2 + STATF_B_VBL = 0 + STATF_B_OAM = 1 + STATF_B_BUSY = 1 .SCY = 0x42 ; Scroll Y rSCY = 0xFF42
This webpage is intended to be an accessible preview of this repository. To get a fuller picture, clone it and use the git CLI.