Misc Fixes (#1809)

* EnAn MsgScriptCallback

* Version check

* Write .extracted-assets.json to outputDir

* Fix m2ctx

* Fix boot_functions.csv
This commit is contained in:
Derek Hensley 2025-05-25 19:10:03 -07:00 committed by GitHub
parent c99e2328ef
commit 13d92a413b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 39 additions and 30 deletions

View File

@ -78,6 +78,12 @@ export LANG := C
CFLAGS :=
CPPFLAGS :=
ifeq ($(VERSION),n64-us)
# Intentionally blank for now
else
$(error Unsupported version $(VERSION))
endif
ifeq ($(COMPILER),gcc)
CPPFLAGS += -DCOMPILER_GCC
NON_MATCHING := 1

View File

@ -2,13 +2,15 @@
#define Z_EN_AN_H
#include "global.h"
#include "z64msgevent.h"
#include "assets/objects/object_an1/object_an1.h"
struct EnAn;
typedef void (*EnAnActionFunc)(struct EnAn*, PlayState*);
typedef void (*EnAnDialogueFunc)(struct EnAn*, PlayState*);
typedef s32 (*MsgEventFunc)(Actor*, PlayState*);
#define ENAN_8000 0x8000
@ -87,7 +89,7 @@ typedef struct EnAn {
/* 0x392 */ s16 mouthTexIndex;
/* 0x394 */ s16 msgEventState;
/* 0x396 */ s16 dialogueFuncState;
/* 0x398 */ MsgEventFunc msgScriptCallback;
/* 0x398 */ MsgScriptCallback msgScriptCallback;
/* 0x39C */ s32 animIndex; // EnAnAnimation enum
/* 0x3A0 */ UNK_TYPE1 unk_3A0[0x8];
/* 0x3A8 */ u32 trayTexScrollTimer1; // TwoTexScroll

View File

@ -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",

View File

@ -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:

View File

@ -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",

View File

@ -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

1 asm/non_matchings/boot/boot_main/bootproc.s bootproc 0x80080060 0x3C
112 asm/non_matchings/boot/loadfragment2/Overlay_Relocate.s Overlay_Relocate 0x80084DB0 0x9B
113 asm/non_matchings/boot/loadfragment2/Overlay_Load.s Overlay_Load 0x8008501C 0x2B
114 asm/non_matchings/boot/loadfragment2/Overlay_AllocateAndLoad.s Overlay_AllocateAndLoad 0x800850C8 0x1A
115 asm/non_matchings/boot/padutils/PadUtils_Init.s asm/non_matchings/boot/pad/PadUtils_Init.s PadUtils_Init 0x80085130 0x8
116 asm/non_matchings/boot/padutils/PadUtils_Destroy.s asm/non_matchings/boot/pad/PadUtils_Destroy.s PadUtils_Destroy 0x80085150 0x2
117 asm/non_matchings/boot/padutils/PadUtils_ResetPressRel.s asm/non_matchings/boot/pad/PadUtils_ResetPressRel.s PadUtils_ResetPressRel 0x80085158 0x3
118 asm/non_matchings/boot/padutils/PadUtils_CheckCurExact.s asm/non_matchings/boot/pad/PadUtils_CheckCurExact.s PadUtils_CheckCurExact 0x80085164 0x6
119 asm/non_matchings/boot/padutils/PadUtils_CheckCur.s asm/non_matchings/boot/pad/PadUtils_CheckCur.s PadUtils_CheckCur 0x8008517C 0x7
120 asm/non_matchings/boot/padutils/PadUtils_CheckPressed.s asm/non_matchings/boot/pad/PadUtils_CheckPressed.s PadUtils_CheckPressed 0x80085198 0x7
121 asm/non_matchings/boot/padutils/PadUtils_CheckReleased.s asm/non_matchings/boot/pad/PadUtils_CheckReleased.s PadUtils_CheckReleased 0x800851B4 0x7
122 asm/non_matchings/boot/padutils/PadUtils_GetCurButton.s asm/non_matchings/boot/pad/PadUtils_GetCurButton.s PadUtils_GetCurButton 0x800851D0 0x2
123 asm/non_matchings/boot/padutils/PadUtils_GetPressButton.s asm/non_matchings/boot/pad/PadUtils_GetPressButton.s PadUtils_GetPressButton 0x800851D8 0x2
124 asm/non_matchings/boot/padutils/PadUtils_GetCurX.s asm/non_matchings/boot/pad/PadUtils_GetCurX.s PadUtils_GetCurX 0x800851E0 0x2
125 asm/non_matchings/boot/padutils/PadUtils_GetCurY.s asm/non_matchings/boot/pad/PadUtils_GetCurY.s PadUtils_GetCurY 0x800851E8 0x2
126 asm/non_matchings/boot/padutils/PadUtils_SetRelXY.s asm/non_matchings/boot/pad/PadUtils_SetRelXY.s PadUtils_SetRelXY 0x800851F0 0x3
127 asm/non_matchings/boot/padutils/PadUtils_GetRelXImpl.s asm/non_matchings/boot/pad/PadUtils_GetRelXImpl.s PadUtils_GetRelXImpl 0x800851FC 0x2
128 asm/non_matchings/boot/padutils/PadUtils_GetRelYImpl.s asm/non_matchings/boot/pad/PadUtils_GetRelYImpl.s PadUtils_GetRelYImpl 0x80085204 0x2
129 asm/non_matchings/boot/padutils/PadUtils_GetRelX.s asm/non_matchings/boot/pad/PadUtils_GetRelX.s PadUtils_GetRelX 0x8008520C 0x8
130 asm/non_matchings/boot/padutils/PadUtils_GetRelY.s asm/non_matchings/boot/pad/PadUtils_GetRelY.s PadUtils_GetRelY 0x8008522C 0x8
131 asm/non_matchings/boot/padutils/PadUtils_UpdateRelXY.s asm/non_matchings/boot/pad/PadUtils_UpdateRelXY.s PadUtils_UpdateRelXY 0x8008524C 0x35
132 asm/non_matchings/boot/stackcheck/StackCheck_Init.s StackCheck_Init 0x80085320 0x36
133 asm/non_matchings/boot/stackcheck/StackCheck_Cleanup.s StackCheck_Cleanup 0x800853F8 0x1C
134 asm/non_matchings/boot/stackcheck/StackCheck_GetState.s StackCheck_GetState 0x80085468 0x1E
231 asm/non_matchings/boot/sprintf/proutPrintf.s proutPrintf 0x80087830 0x9
232 asm/non_matchings/boot/sprintf/vsprintf.s vsprintf 0x80087854 0x14
233 asm/non_matchings/boot/sprintf/sprintf.s sprintf 0x800878A4 0x17
234 asm/non_matchings/boot/printutils/vaprintf.s asm/non_matchings/boot/aprintf/vaprintf.s vaprintf 0x80087900 0xD
235 asm/non_matchings/boot/printutils/aprintf.s asm/non_matchings/boot/aprintf/aprintf.s aprintf 0x80087934 0xB
236 asm/non_matchings/boot/printutils/csleep.s asm/non_matchings/boot/sleep/csleep.s csleep 0x80087960 0x1B
237 asm/non_matchings/boot/printutils/nsleep.s asm/non_matchings/boot/sleep/nsleep.s nsleep 0x800879CC 0x14
238 asm/non_matchings/boot/printutils/usleep.s asm/non_matchings/boot/sleep/usleep.s usleep 0x80087A1C 0x14
239 asm/non_matchings/boot/printutils/msleep.s asm/non_matchings/boot/sleep/msleep.s msleep 0x80087A6C 0x15
240 asm/non_matchings/boot/printutils/sleep.s asm/non_matchings/boot/sleep/sleep.s sleep 0x80087AC0 0x10
241 asm/non_matchings/boot/setcause/__osSetCause.s __osSetCause 0x80087B00 0x4
242 asm/non_matchings/boot/sendmesg/osSendMesg.s osSendMesg 0x80087B10 0x54
243 asm/non_matchings/boot/pfsfreeblocks/osPfsFreeBlocks.s osPfsFreeBlocks 0x80087C60 0x68