diff options
author | Bad Diode <bd@badd10de.dev> | 2021-05-07 18:55:12 +0200 |
---|---|---|
committer | Bad Diode <bd@badd10de.dev> | 2021-05-07 18:55:12 +0200 |
commit | 269f2326171982912f50c2b6ef0cd272ec3c0108 (patch) | |
tree | b9374201762337780bafaf8f01965bb338a505ec /src/common.h | |
parent | c1ac9aa30fa1c33ac09963bdb2f6a42ffadaa6c8 (diff) | |
download | gba-experiments-269f2326171982912f50c2b6ef0cd272ec3c0108.tar.gz gba-experiments-269f2326171982912f50c2b6ef0cd272ec3c0108.zip |
Initial implementation of mode4 rendering and parameter editing on CH3
Diffstat (limited to 'src/common.h')
-rw-r--r-- | src/common.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/common.h b/src/common.h index aa7261e..cf263db 100644 --- a/src/common.h +++ b/src/common.h | |||
@@ -147,6 +147,7 @@ typedef Color Scanline[SCREEN_WIDTH]; | |||
147 | #define PAL_BUFFER_SPRITES ((u16*)(MEM_PAL + 0x200)) | 147 | #define PAL_BUFFER_SPRITES ((u16*)(MEM_PAL + 0x200)) |
148 | #define PAL_BANK_BG ((Palette*) MEM_PAL) | 148 | #define PAL_BANK_BG ((Palette*) MEM_PAL) |
149 | #define PAL_BANK_SPRITES ((Palette*)(MEM_PAL + 0x200)) | 149 | #define PAL_BANK_SPRITES ((Palette*)(MEM_PAL + 0x200)) |
150 | static u16 *backbuffer = ((vu16*)(MEM_VRAM + 0x0A000)); | ||
150 | 151 | ||
151 | // | 152 | // |
152 | // Sprites. | 153 | // Sprites. |
@@ -198,6 +199,7 @@ typedef Color Scanline[SCREEN_WIDTH]; | |||
198 | 199 | ||
199 | static inline void | 200 | static inline void |
200 | flip_page(void) { | 201 | flip_page(void) { |
202 | backbuffer = (u16*)((u32)backbuffer ^ 0x0A000); | ||
201 | DISP_CTRL ^= DISP_PAGE; | 203 | DISP_CTRL ^= DISP_PAGE; |
202 | } | 204 | } |
203 | 205 | ||