From 8bac7d120cfa55e35713ba9a47669050183d3551 Mon Sep 17 00:00:00 2001 From: rozlette Date: Wed, 26 Feb 2020 18:11:08 -0600 Subject: [PATCH] Split boot .bss --- include/functions.h | 2 +- include/variables.h | 2 +- linker_scripts/code_script.txt | 32 ++++++++++++++++++++++++++++++-- tables/functions.txt | 2 +- tables/objects.txt | 3 ++- tables/variables.txt | 2 +- 6 files changed, 36 insertions(+), 7 deletions(-) diff --git a/include/functions.h b/include/functions.h index 40cb9b8006..3e3820870e 100644 --- a/include/functions.h +++ b/include/functions.h @@ -429,7 +429,7 @@ short coss(unsigned short x); // func_80092260 void osSetTime(OSTime ticks); // func_80092290 void func_800922C0(void); // func_800922C0 void osViSetEvent(OSMesgQueue* mq, OSMesg m, u32 retraceCount); // func_800923E0 -void func_80092440(void); // func_80092440 +s32 osPfsIsPlug(OSMesgQueue* queue, u8* pattern); // func_80092440 void func_800925CC(void); // func_800925CC void func_80092680(void); // func_80092680 void func_80092730(void); // func_80092730 diff --git a/include/variables.h b/include/variables.h index 2c9801a800..08051f2717 100644 --- a/include/variables.h +++ b/include/variables.h @@ -323,7 +323,7 @@ extern OSMesgQueue D_8009CF38; // D_8009CF38 extern OSMesg D_8009CF50[1]; // D_8009CF50 extern UNK_TYPE1 D_8009CF60; // D_8009CF60 extern UNK_TYPE4 D_8009CF70; // D_8009CF70 -extern UNK_TYPE1 __osThreadSave; // D_8009CF80 +extern OSThread __osThreadSave; // D_8009CF80 extern OSPiHandle D_8009D130; // D_8009D130 extern OSPiHandle D_8009D1A8; // D_8009D1A8 extern OSThread D_8009D220; // D_8009D220 diff --git a/linker_scripts/code_script.txt b/linker_scripts/code_script.txt index b8ca72cdf3..5d2ff64412 100644 --- a/linker_scripts/code_script.txt +++ b/linker_scripts/code_script.txt @@ -26,6 +26,7 @@ SECTIONS build/asm/boot_0x80086280.o(.text) build/asm/boot_0x800862E0.o(.text) build/asm/boot_0x80086760.o(.text) + build/asm/boot_0x80086DD0.o(.text) build/asm/boot_0x80086FA0.o(.text) build/asm/__osMalloc.o(.text) build/src/libultra/rmon/sprintf.o(.text) @@ -150,7 +151,7 @@ SECTIONS build/src/libultra/os/settime.o(.text) build/asm/boot_0x800922C0.o(.text) build/src/libultra/gu/visetevent.o(.text) - build/asm/boot_0x80092440.o(.text) + build/asm/pfsisplug.o(.text) build/asm/boot_0x80092730.o(.text) build/asm/cartrominit.o(.text) build/asm/boot_0x80092A80.o(.text) @@ -271,7 +272,34 @@ SECTIONS } boot_bss_start = .; - . += 0xC5C0; + . += 0x1C60; /* 0x80080060 */ + . += 0x140; /* idle */ + . += 0x770; /* z_std_dma */ + . += 0x420; /* 0x80080E30 */ + . += 0x20; /* CIC6105 */ + . += 0xE80; /* fault */ + . += 0x40; /* fault_drawer */ + . += 0x10; /* 0x80086760 */ + . += 0x30; /* 0x80086DD0 */ + . += 0x10; /* 0x80086FA0 */ + . += 0x10; /* __osMalloc */ + . += 0x40; /* sptask */ + . += 0x100; /* 0x800896D0 */ + . += 0x20; /* siacs */ + . += 0x90; /* controller */ + . += 0x10; /* 0x8008A170 */ + . += 0x10; /* initialize */ + . += 0x2A0; /* ??? */ + . += 0x11D0; /* pimgr */ + . += 0x20; /* piacs */ + . += 0x100; /* devmgr */ + . += 0x80; /* seteventmesg */ + . += 0x40; /* timerintr */ + . += 0x40; /* pfsisplug */ + . += 0x80; /* cartrominit */ + . += 0x1220; /* vimgr */ + . += 0x6200; /* dmadata */ + . += 0x10; boot_bss_end = .; code : diff --git a/tables/functions.txt b/tables/functions.txt index c4b2789120..4775a60327 100644 --- a/tables/functions.txt +++ b/tables/functions.txt @@ -426,7 +426,7 @@ 0x80092290:("osSetTime","void","OSTime ticks"), 0x800922C0:("func_800922C0","void","void"), 0x800923E0:("osViSetEvent","void","OSMesgQueue* mq, OSMesg m, u32 retraceCount"), - 0x80092440:("func_80092440","void","void"), + 0x80092440:("osPfsIsPlug","s32","OSMesgQueue* queue, u8* pattern"), 0x800925CC:("func_800925CC","void","void"), 0x80092680:("func_80092680","void","void"), 0x80092730:("func_80092730","void","void"), diff --git a/tables/objects.txt b/tables/objects.txt index 4c9972c64c..4fda891679 100644 --- a/tables/objects.txt +++ b/tables/objects.txt @@ -18,6 +18,7 @@ 0x80086280:"", 0x800862E0:"", 0x80086760:"", + 0x80086DD0:"", 0x80086FA0:"", 0x80087160:"__osMalloc", 0x80087830:"sprintf", @@ -141,7 +142,7 @@ 0x80092290:"settime", 0x800922C0:"", 0x800923e0:"visetevent", - 0x80092440:"", + 0x80092440:"pfsisplug", 0x80092730:"", 0x80092920:"cartrominit", 0x80092A80:"", diff --git a/tables/variables.txt b/tables/variables.txt index 9f2bcb956a..75ed40ff9a 100644 --- a/tables/variables.txt +++ b/tables/variables.txt @@ -320,7 +320,7 @@ 0x8009CF50:("D_8009CF50","OSMesg","[1]",0x4), 0x8009CF60:("D_8009CF60","UNK_TYPE1","",0x1), 0x8009CF70:("D_8009CF70","UNK_TYPE4","",0x4), - 0x8009CF80:("__osThreadSave","UNK_TYPE1","",0x1), + 0x8009CF80:("__osThreadSave","OSThread","",0x1b0), 0x8009D130:("D_8009D130","OSPiHandle","",0x74), 0x8009D1A8:("D_8009D1A8","OSPiHandle","",0x74), 0x8009D220:("D_8009D220","OSThread","",0x1b0),