summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/gba/io_reg.h32
1 files changed, 26 insertions, 6 deletions
diff --git a/include/gba/io_reg.h b/include/gba/io_reg.h
index 5234e5b6c..c0874bcbb 100644
--- a/include/gba/io_reg.h
+++ b/include/gba/io_reg.h
@@ -495,12 +495,12 @@
// I/O register fields
// DISPCNT
-#define DISPCNT_MODE_0 0x0000
-#define DISPCNT_MODE_1 0x0001
-#define DISPCNT_MODE_2 0x0002
-#define DISPCNT_MODE_3 0x0003
-#define DISPCNT_MODE_4 0x0004
-#define DISPCNT_MODE_5 0x0005
+#define DISPCNT_MODE_0 0x0000 // BG0: text, BG1: text, BG2: text, BG3: text
+#define DISPCNT_MODE_1 0x0001 // BG0: text, BG1: text, BG2: affine, BG3: off
+#define DISPCNT_MODE_2 0x0002 // BG0: off, BG1: off, BG2: affine, BG3: affine
+#define DISPCNT_MODE_3 0x0003 // Bitmap mode, 240x160, BGR555 color
+#define DISPCNT_MODE_4 0x0004 // Bitmap mode, 240x160, 256 color palette
+#define DISPCNT_MODE_5 0x0005 // Bitmap mode, 160x128, BGR555 color
#define DISPCNT_OBJ_1D_MAP 0x0040
#define DISPCNT_FORCED_BLANK 0x0080
#define DISPCNT_BG0_ON 0x0100
@@ -521,6 +521,26 @@
#define DISPSTAT_HBLANK_INTR 0x0010 // H-Blank interrupt enabled
#define DISPSTAT_VCOUNT_INTR 0x0020 // V-Count interrupt enabled
+// BGCNT
+#define BGCNT_PRIORITY(n) (n) // Values 0 - 3. Lower priority BGs will be drawn on top of higher priority BGs.
+#define BGCNT_CHARBASE(n) ((n) << 2) // Values 0 - 3. Base block for tile pixel data.
+#define BGCNT_MOSAIC 0x0040
+#define BGCNT_16COLOR 0x0000 // 4 bits per pixel
+#define BGCNT_256COLOR 0x0080 // 8 bits per pixel
+#define BGCNT_SCREENBASE(n) ((n) << 8) // Values 0 - 31. Base block for tile map.
+#define BGCNT_WRAP 0x2000 // Only affects affine BGs. Text BGs wrap by default.
+#define BGCNT_TXT256x256 0x0000 // Internal screen size size of text mode BG in pixels.
+#define BGCNT_TXT512x256 0x4000
+#define BGCNT_TXT256x512 0x8000
+#define BGCNT_TXT512x512 0xC000
+#define BGCNT_AFF128x128 0x0000 // Internal screen size size of affine mode BG in pixels.
+#define BGCNT_AFF256x256 0x4000
+#define BGCNT_AFF512x512 0x8000
+#define BGCNT_AFF1024x1024 0xC000
+
+// BLDCNT
+
+
// SOUNDCNT_H
#define SOUND_CGB_MIX_QUARTER 0x0000
#define SOUND_CGB_MIX_HALF 0x0001