Extract sFaultDrawerFont as blob (#1673)

This commit is contained in:
Derek Hensley 2024-08-14 14:08:40 -07:00 committed by GitHub
parent c7d2a81b2b
commit e8cd6e622f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 11 additions and 5 deletions

View File

@ -0,0 +1,6 @@
<Root>
<File Name="boot" OutName="fault_drawer_font" BaseAddress="0x80080060" RangeStart="0x18BF0" RangeEnd="0x18FF0" >
<!-- The real version is const and found in fault_drawer.c, though shares the same name -->
<Blob Name="sFaultDrawerFont" Size="0x400" Offset="0x18BF0"/>
</File>
</Root>

View File

@ -34,7 +34,10 @@ typedef struct {
/* 0x38 */ FaultDrawerCallback inputCallback;
} FaultDrawer; // size = 0x3C
extern const u32 sFaultDrawerFont[];
//! TODO: Extract the font data properly so we don't have to cast in sFaultDrawerDefault below
const u8 sFaultDrawerFont[] = {
#include "assets/boot/fault_drawer/sFaultDrawerFont.bin.inc.c"
};
FaultDrawer sFaultDrawer;
@ -55,7 +58,7 @@ FaultDrawer sFaultDrawerDefault = {
GPACK_RGBA5551(0, 0, 0, 0), // backColor
FAULT_DRAWER_CURSOR_X, // cursorX
FAULT_DRAWER_CURSOR_Y, // cursorY
sFaultDrawerFont, // fontData
(const u32*)sFaultDrawerFont, // fontData
8, // charW
8, // charH
0, // charWPad
@ -78,9 +81,6 @@ FaultDrawer sFaultDrawerDefault = {
NULL, // inputCallback
};
//! TODO: Needs to be extracted
#pragma GLOBAL_ASM("asm/non_matchings/boot/fault_drawer/sFaultDrawerFont.s")
void FaultDrawer_SetOsSyncPrintfEnabled(u32 enabled) {
sFaultDrawerInstance->osSyncPrintfEnabled = enabled;
}