summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorDerek Hensley <hensley.derek58@gmail.com>2025-05-25 19:10:03 -0700
committerGitHub <noreply@github.com>2025-05-25 19:10:03 -0700
commit13d92a413bf8ca267d865e34cf74b608d2c0ed48 (patch)
treec4736858a50df1126dde568b8117aefeb5495f9e /tools
parentc99e2328ef952b7a443ac58a59950b8d637f7b16 (diff)
Misc Fixes (#1809)
* EnAn MsgScriptCallback * Version check * Write .extracted-assets.json to outputDir * Fix m2ctx * Fix boot_functions.csv
Diffstat (limited to 'tools')
-rw-r--r--tools/disasm/files.txt4
-rwxr-xr-xtools/extract_assets.py2
-rwxr-xr-xtools/m2ctx.py3
-rw-r--r--tools/sizes/boot_functions.csv48
4 files changed, 29 insertions, 28 deletions
diff --git a/tools/disasm/files.txt b/tools/disasm/files.txt
index 9479465bd..6a4a54d51 100644
--- a/tools/disasm/files.txt
+++ b/tools/disasm/files.txt
@@ -43,7 +43,7 @@
0x80084940 : "rcp_utils",
0x800849A0 : "loadfragment",
0x80084DB0 : "loadfragment2",
- 0x80085130 : "padutils",
+ 0x80085130 : "pad",
0x80085320 : "stackcheck",
0x80085570 : "gfxprint",
0x80086110 : "mtxuty-cvt",
@@ -56,7 +56,7 @@
0x80086FA0 : "qrand",
0x80087160 : "__osMalloc",
0x80087830 : "sprintf",
- 0x80087900 : "printutils",
+ 0x80087900 : "aprintf",
0x80087960 : "sleep",
0x80087B00 : "setcause",
0x80087B10 : "sendmesg",
diff --git a/tools/extract_assets.py b/tools/extract_assets.py
index 9c690c574..926f89b72 100755
--- a/tools/extract_assets.py
+++ b/tools/extract_assets.py
@@ -129,7 +129,7 @@ def main():
manager = multiprocessing.Manager()
signal.signal(signal.SIGINT, SignalHandler)
- extractedAssetsFile = Path("extracted") / args.version / ".extracted-assets.json"
+ extractedAssetsFile = outputDir / ".extracted-assets.json"
extractedAssetsTracker = manager.dict()
if not args.force and extractedAssetsFile.exists():
with extractedAssetsFile.open(encoding='utf-8') as f:
diff --git a/tools/m2ctx.py b/tools/m2ctx.py
index 2e78becd8..55dd79dfd 100755
--- a/tools/m2ctx.py
+++ b/tools/m2ctx.py
@@ -18,6 +18,7 @@ CPP_FLAGS = [
"-Isrc",
"-Ibuild/n64-us",
"-I.",
+ "-Iextracted/n64-us",
"-DF3DEX_GBI_2",
"-DF3DEX_GBI_PL",
@@ -26,7 +27,7 @@ CPP_FLAGS = [
"-D_LANGUAGE_C",
"-DNON_MATCHING",
"-D_Static_assert(x, y)=",
- "-D__attribute__(x)="
+ "-D__attribute__(x)=",
"-D_MIPS_SZLONG=32",
"-ffreestanding",
"-DM2CTX",
diff --git a/tools/sizes/boot_functions.csv b/tools/sizes/boot_functions.csv
index a79430b8a..52c3c7d67 100644
--- a/tools/sizes/boot_functions.csv
+++ b/tools/sizes/boot_functions.csv
@@ -112,23 +112,23 @@ asm/non_matchings/boot/loadfragment/Fragment_AllocateAndLoad.s,Fragment_Allocate
asm/non_matchings/boot/loadfragment2/Overlay_Relocate.s,Overlay_Relocate,0x80084DB0,0x9B
asm/non_matchings/boot/loadfragment2/Overlay_Load.s,Overlay_Load,0x8008501C,0x2B
asm/non_matchings/boot/loadfragment2/Overlay_AllocateAndLoad.s,Overlay_AllocateAndLoad,0x800850C8,0x1A
-asm/non_matchings/boot/padutils/PadUtils_Init.s,PadUtils_Init,0x80085130,0x8
-asm/non_matchings/boot/padutils/PadUtils_Destroy.s,PadUtils_Destroy,0x80085150,0x2
-asm/non_matchings/boot/padutils/PadUtils_ResetPressRel.s,PadUtils_ResetPressRel,0x80085158,0x3
-asm/non_matchings/boot/padutils/PadUtils_CheckCurExact.s,PadUtils_CheckCurExact,0x80085164,0x6
-asm/non_matchings/boot/padutils/PadUtils_CheckCur.s,PadUtils_CheckCur,0x8008517C,0x7
-asm/non_matchings/boot/padutils/PadUtils_CheckPressed.s,PadUtils_CheckPressed,0x80085198,0x7
-asm/non_matchings/boot/padutils/PadUtils_CheckReleased.s,PadUtils_CheckReleased,0x800851B4,0x7
-asm/non_matchings/boot/padutils/PadUtils_GetCurButton.s,PadUtils_GetCurButton,0x800851D0,0x2
-asm/non_matchings/boot/padutils/PadUtils_GetPressButton.s,PadUtils_GetPressButton,0x800851D8,0x2
-asm/non_matchings/boot/padutils/PadUtils_GetCurX.s,PadUtils_GetCurX,0x800851E0,0x2
-asm/non_matchings/boot/padutils/PadUtils_GetCurY.s,PadUtils_GetCurY,0x800851E8,0x2
-asm/non_matchings/boot/padutils/PadUtils_SetRelXY.s,PadUtils_SetRelXY,0x800851F0,0x3
-asm/non_matchings/boot/padutils/PadUtils_GetRelXImpl.s,PadUtils_GetRelXImpl,0x800851FC,0x2
-asm/non_matchings/boot/padutils/PadUtils_GetRelYImpl.s,PadUtils_GetRelYImpl,0x80085204,0x2
-asm/non_matchings/boot/padutils/PadUtils_GetRelX.s,PadUtils_GetRelX,0x8008520C,0x8
-asm/non_matchings/boot/padutils/PadUtils_GetRelY.s,PadUtils_GetRelY,0x8008522C,0x8
-asm/non_matchings/boot/padutils/PadUtils_UpdateRelXY.s,PadUtils_UpdateRelXY,0x8008524C,0x35
+asm/non_matchings/boot/pad/PadUtils_Init.s,PadUtils_Init,0x80085130,0x8
+asm/non_matchings/boot/pad/PadUtils_Destroy.s,PadUtils_Destroy,0x80085150,0x2
+asm/non_matchings/boot/pad/PadUtils_ResetPressRel.s,PadUtils_ResetPressRel,0x80085158,0x3
+asm/non_matchings/boot/pad/PadUtils_CheckCurExact.s,PadUtils_CheckCurExact,0x80085164,0x6
+asm/non_matchings/boot/pad/PadUtils_CheckCur.s,PadUtils_CheckCur,0x8008517C,0x7
+asm/non_matchings/boot/pad/PadUtils_CheckPressed.s,PadUtils_CheckPressed,0x80085198,0x7
+asm/non_matchings/boot/pad/PadUtils_CheckReleased.s,PadUtils_CheckReleased,0x800851B4,0x7
+asm/non_matchings/boot/pad/PadUtils_GetCurButton.s,PadUtils_GetCurButton,0x800851D0,0x2
+asm/non_matchings/boot/pad/PadUtils_GetPressButton.s,PadUtils_GetPressButton,0x800851D8,0x2
+asm/non_matchings/boot/pad/PadUtils_GetCurX.s,PadUtils_GetCurX,0x800851E0,0x2
+asm/non_matchings/boot/pad/PadUtils_GetCurY.s,PadUtils_GetCurY,0x800851E8,0x2
+asm/non_matchings/boot/pad/PadUtils_SetRelXY.s,PadUtils_SetRelXY,0x800851F0,0x3
+asm/non_matchings/boot/pad/PadUtils_GetRelXImpl.s,PadUtils_GetRelXImpl,0x800851FC,0x2
+asm/non_matchings/boot/pad/PadUtils_GetRelYImpl.s,PadUtils_GetRelYImpl,0x80085204,0x2
+asm/non_matchings/boot/pad/PadUtils_GetRelX.s,PadUtils_GetRelX,0x8008520C,0x8
+asm/non_matchings/boot/pad/PadUtils_GetRelY.s,PadUtils_GetRelY,0x8008522C,0x8
+asm/non_matchings/boot/pad/PadUtils_UpdateRelXY.s,PadUtils_UpdateRelXY,0x8008524C,0x35
asm/non_matchings/boot/stackcheck/StackCheck_Init.s,StackCheck_Init,0x80085320,0x36
asm/non_matchings/boot/stackcheck/StackCheck_Cleanup.s,StackCheck_Cleanup,0x800853F8,0x1C
asm/non_matchings/boot/stackcheck/StackCheck_GetState.s,StackCheck_GetState,0x80085468,0x1E
@@ -231,13 +231,13 @@ asm/non_matchings/boot/__osMalloc/__osCheckArena.s,__osCheckArena,0x800877C4,0x1
asm/non_matchings/boot/sprintf/proutPrintf.s,proutPrintf,0x80087830,0x9
asm/non_matchings/boot/sprintf/vsprintf.s,vsprintf,0x80087854,0x14
asm/non_matchings/boot/sprintf/sprintf.s,sprintf,0x800878A4,0x17
-asm/non_matchings/boot/printutils/vaprintf.s,vaprintf,0x80087900,0xD
-asm/non_matchings/boot/printutils/aprintf.s,aprintf,0x80087934,0xB
-asm/non_matchings/boot/printutils/csleep.s,csleep,0x80087960,0x1B
-asm/non_matchings/boot/printutils/nsleep.s,nsleep,0x800879CC,0x14
-asm/non_matchings/boot/printutils/usleep.s,usleep,0x80087A1C,0x14
-asm/non_matchings/boot/printutils/msleep.s,msleep,0x80087A6C,0x15
-asm/non_matchings/boot/printutils/sleep.s,sleep,0x80087AC0,0x10
+asm/non_matchings/boot/aprintf/vaprintf.s,vaprintf,0x80087900,0xD
+asm/non_matchings/boot/aprintf/aprintf.s,aprintf,0x80087934,0xB
+asm/non_matchings/boot/sleep/csleep.s,csleep,0x80087960,0x1B
+asm/non_matchings/boot/sleep/nsleep.s,nsleep,0x800879CC,0x14
+asm/non_matchings/boot/sleep/usleep.s,usleep,0x80087A1C,0x14
+asm/non_matchings/boot/sleep/msleep.s,msleep,0x80087A6C,0x15
+asm/non_matchings/boot/sleep/sleep.s,sleep,0x80087AC0,0x10
asm/non_matchings/boot/setcause/__osSetCause.s,__osSetCause,0x80087B00,0x4
asm/non_matchings/boot/sendmesg/osSendMesg.s,osSendMesg,0x80087B10,0x54
asm/non_matchings/boot/pfsfreeblocks/osPfsFreeBlocks.s,osPfsFreeBlocks,0x80087C60,0x68