Skip to content

Commit fa26a11

Browse files
AngheloAlfMr-Wiseguybates64Copilot
authored
Avoid using linker-generated symbols for bins and assets (#1245)
Co-authored-by: Mr-Wiseguy <mrwiseguyromhacking@gmail.com> Co-authored-by: Alex <16batesa@gmail.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent a8592ab commit fa26a11

File tree

13 files changed

+996
-700
lines changed

13 files changed

+996
-700
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# Python
22
__pycache__/
33
venv/
4+
.venv/
45
.lark_cache*
56
.splat_cache
67

@@ -63,3 +64,5 @@ build/
6364
.cache/clangd/
6465
# compile_commands.json requires hardcoded paths, so it can't be committed
6566
compile_commands.json
67+
68+
/ver/*/asm/data/rsp/*.s

src/audio/core/system.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ AuSynDriver auSynDriver;
3333
u8 rspbootUcodeBuffer[0x100] ALIGNED(16);
3434
#endif
3535

36-
extern u64 n_aspMain_text_bin[];
37-
extern u64 n_aspMain_data_bin[];
36+
extern u64 n_aspMainTextStart[];
37+
extern u64 n_aspMainDataStart[];
3838

3939
extern u8 AuHeapBase[AUDIO_HEAP_SIZE];
4040

@@ -72,8 +72,8 @@ void create_audio_system(void) {
7272
nuAuTasks[i].list.t.ucode_boot = (u64*) rspbootUcodeBuffer;
7373
nuAuTasks[i].list.t.ucode_boot_size = 0x100;
7474
#endif
75-
nuAuTasks[i].list.t.ucode = n_aspMain_text_bin;
76-
nuAuTasks[i].list.t.ucode_data = n_aspMain_data_bin;
75+
nuAuTasks[i].list.t.ucode = n_aspMainTextStart;
76+
nuAuTasks[i].list.t.ucode_data = n_aspMainDataStart;
7777
nuAuTasks[i].list.t.ucode_data_size = SP_UCODE_DATA_SIZE;
7878
nuAuTasks[i].list.t.dram_stack = nullptr;
7979
nuAuTasks[i].list.t.dram_stack_size = 0;

src/menu_hud_scripts.c

Lines changed: 247 additions & 1 deletion
Large diffs are not rendered by default.

src/os/nusys/nugfxinit.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
#include "common.h"
22
#include "nu/nusys.h"
33

4-
extern u64 gspF3DEX2kawase_fifo_text_bin[];
5-
extern u64 gspF3DEX2kawase_fifo_data_bin[];
4+
extern u64 gspF3DZEX2_NoN_PosLight_fifoTextStart[];
5+
extern u64 gspF3DZEX2_NoN_PosLight_fifoDataStart[];
66

77
NUUcode nugfx_ucode = {
8-
gspF3DEX2kawase_fifo_text_bin, gspF3DEX2kawase_fifo_data_bin,
8+
gspF3DZEX2_NoN_PosLight_fifoTextStart, gspF3DZEX2_NoN_PosLight_fifoDataStart,
99
};
1010

1111
extern u16 gFrameBuf0[];

ver/ique/splat.yaml

Lines changed: 166 additions & 157 deletions
Large diffs are not rendered by default.

ver/ique/symbol_addrs.txt

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,6 @@ nuAuTaskStop = 0x80076de0;
7070
AlFrameSize = 0x800a0044;
7171
AlCmdListBuffers = 0x8009ff20;
7272
AlMinFrameSize = 0x800a0048;
73-
n_aspMain_text_bin = 0x80071e10;
74-
n_aspMain_data_bin = 0x80096700;
7573
nuAuTasks = 0x8009ff30;
7674
D_800A3628 = 0x800a0038;
7775
nuAuDmaBufList = 0x800a05f0;
@@ -113,7 +111,6 @@ __osViNext = 0x80094654;
113111
osViModePalLan1 = 0x80094660;
114112
AuHeapBase = 0x801aa000;
115113
nuAuMgr = 0x8004a4c0;
116-
rspbootTextStart = 0x80071d40;
117114
alHeapAlloc = 0x80057650;
118115
alLink = 0x8004aaa4;
119116
nuAuPreNMIProc = 0x8004a9e0;
@@ -4756,3 +4753,10 @@ D_09001518_39A0D8 = 0x09001518; // rom:0x3E2B28
47564753
charset_peach_letter_png = 0x00051020; //rom:0x15F140
47574754
charset_postcard_png = 0x00054FA8; //rom:0x1630C8
47584755
charset_letter_content_1_png = 0x00056E90; //rom:0x164FB0
4756+
4757+
// RSP symbols
4758+
rspbootTextStart = 0x80071D40; // size:0xD0 name_end:rspbootTextEnd
4759+
n_aspMainTextStart = 0x80071E10; // size:0xC60 name_end:n_aspMainTextEnd
4760+
gspF3DZEX2_NoN_PosLight_fifoTextStart = 0x80094CB0; // size:0x1630 name_end:gspF3DZEX2_NoN_PosLight_fifoTextEnd
4761+
gspF3DZEX2_NoN_PosLight_fifoDataStart = 0x800962E0; // size:0x420 name_end:gspF3DZEX2_NoN_PosLight_fifoDataEnd
4762+
n_aspMainDataStart = 0x80096700; // size:0x2B0 name_end:n_aspMainDataEnd

ver/ique/undefined_syms.txt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,3 @@ D_A6000000 = 0xA6000000;
3535
D_B0000000 = 0xB0000000;
3636
D_B0000008 = 0xB0000008;
3737
D_B0000010 = 0xB0000010;
38-
39-
rspbootTextStart = rspboot_bin;
40-
rspbootTextEnd = rspboot_bin + 0xd0;

0 commit comments

Comments
 (0)