Move color correction LUT buffer to EWRAM, freeing up 32KB of VRAM

This commit is contained in:
VeaNika 2025-05-04 20:42:34 -06:00
parent f2f3736608
commit ae9a95c3cc
2 changed files with 8 additions and 1 deletions

View File

@ -243,6 +243,13 @@ SECTIONS
__itcm_end = ABSOLUTE(.);
} >itcm AT>vramab :itcm = 0xff
/* Color Correction LUT buffer placed in EWRAM. */
.lutram (NOLOAD) : {
. = ALIGN(4);
*(.lutram)
. = ALIGN(4); /* REQUIRED. LD is flaky without it. */
} >ewram
.ewram.bss (NOLOAD):
{
__ewram_bss_start = ABSOLUTE(.);

View File

@ -4,7 +4,7 @@
// Based on https://gist.github.com/profi200/bfa7be60b3eecb8c43f59000f626c743
u16 gColorLut[COLOR_LUT_SIZE]; // Dinamically generated color LUT
u16 gColorLut[COLOR_LUT_SIZE] __attribute__((section(".lutram")));
const ColorProfile* gCurrentPreset = &Agb001; // Initialize the color matrix preset, default is AGB_001