diff options
author | Ben Bridle <ben@derelict.engineering> | 2024-11-19 17:52:36 +1300 |
---|---|---|
committer | Ben Bridle <ben@derelict.engineering> | 2024-11-19 17:52:36 +1300 |
commit | a1b95e9ccf9bd7b316adf21952e43e03f2bf3746 (patch) | |
tree | 7bcc8d28f3de0f222c23e23c79ce15d400bee8d0 /arm9/source/devices/screen.c | |
parent | 008b816edbd4e241975822f8b7d8765a869fa404 (diff) | |
download | bedrock-nds-a1b95e9ccf9bd7b316adf21952e43e03f2bf3746.zip |
Implement memory device
The memory device is fully implemented, with 3MB of heap memory.
This commit is a bit messy, additional changes are:
- The program memory and program counter in each Bedrock struct have
been moved to a dedicated struct to prevent a name collision with the
memory device
- The run_bg and debug functions have been moved to core.c and debug.c
- The blank screen colour has been changed back to black
- No second program runs on the sub screen by default
- The number of Bedrock instances to run has been parameterized
Diffstat (limited to 'arm9/source/devices/screen.c')
-rw-r--r-- | arm9/source/devices/screen.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/arm9/source/devices/screen.c b/arm9/source/devices/screen.c index 492bb05..0d2fc36 100644 --- a/arm9/source/devices/screen.c +++ b/arm9/source/devices/screen.c @@ -52,8 +52,6 @@ void set_palette_low(ScreenDevice *scr, u8 low) { u8 r = scr->palette_write >> 7 & 0x1e; u8 g = scr->palette_write >> 3 & 0x1e; u8 b = scr->palette_write << 1 & 0x1e; - // TODO: With 4-bit we multiply by 17, find equivalent - // here to get best value of least-significant bit. scr->palette[i] = RGB15(r,g,b); scr->nds->pal[i] = RGB15(r,g,b); } @@ -132,7 +130,7 @@ void flip_buffer(Screen *nds) { } void black_screen(Screen *nds) { - nds->pal[0] = RGB15(8,0,0); + nds->pal[0] = RGB15(0,0,0); dmaFillWords(0, nds->bgv, TILES_MEM); dmaFillWords(0, nds->fgv, TILES_MEM); } |