From eccd9cf39a55da1ba9724a948e3d5a88f200c7db Mon Sep 17 00:00:00 2001 From: Ethan Roseman Date: Sun, 10 Jan 2021 21:11:39 +0900 Subject: [PATCH] offset update --- asm/nonmatchings/code_415D90/func_802AB330.s | 6 ++++++ asm/nonmatchings/code_415D90/func_802AB338.s | 6 ++++++ src/code_415D90.c | 4 ++++ tools/codescan.py | 4 +++- tools/splat.yaml | 2 +- undefined_syms_auto.txt | 20 ++++++++++---------- 6 files changed, 30 insertions(+), 12 deletions(-) create mode 100644 asm/nonmatchings/code_415D90/func_802AB330.s create mode 100644 asm/nonmatchings/code_415D90/func_802AB338.s diff --git a/asm/nonmatchings/code_415D90/func_802AB330.s b/asm/nonmatchings/code_415D90/func_802AB330.s new file mode 100644 index 0000000000..c477ccdf70 --- /dev/null +++ b/asm/nonmatchings/code_415D90/func_802AB330.s @@ -0,0 +1,6 @@ +.set noat # allow manual use of $at +.set noreorder # don't insert nops after branches + +glabel func_802AB330 +/* 4200C0 802AB330 03E00008 */ jr $ra +/* 4200C4 802AB334 00000000 */ nop diff --git a/asm/nonmatchings/code_415D90/func_802AB338.s b/asm/nonmatchings/code_415D90/func_802AB338.s new file mode 100644 index 0000000000..3978b7956e --- /dev/null +++ b/asm/nonmatchings/code_415D90/func_802AB338.s @@ -0,0 +1,6 @@ +.set noat # allow manual use of $at +.set noreorder # don't insert nops after branches + +glabel func_802AB338 +/* 4200C8 802AB338 03E00008 */ jr $ra +/* 4200CC 802AB33C 00000000 */ nop diff --git a/src/code_415D90.c b/src/code_415D90.c index 51d7b35e07..b537bdd5d8 100644 --- a/src/code_415D90.c +++ b/src/code_415D90.c @@ -89,3 +89,7 @@ INCLUDE_ASM(s32, "code_415D90", func_802AA640); INCLUDE_ASM(s32, "code_415D90", update_targeting_enemies); INCLUDE_ASM(s32, "code_415D90", func_802AACD8); + +INCLUDE_ASM(s32, "code_415D90", func_802AB330); + +INCLUDE_ASM(s32, "code_415D90", func_802AB338); diff --git a/tools/codescan.py b/tools/codescan.py index 5bbc731c97..feffbe7fea 100644 --- a/tools/codescan.py +++ b/tools/codescan.py @@ -16,6 +16,8 @@ os.chdir(root_dir) for f in Path(root_dir).rglob("*.bin"): if "papermario" in f.name: continue + if f.name in ["bin_11A440.bin", "code_71430.bin", "bootcode_font.bin", "bin_E20110.bin"]: + continue ras = [] result = subprocess.run(["mips-linux-gnu-objdump", "-Dz", "-bbinary", "-mmips", "-EB" , f], stdout=subprocess.PIPE) @@ -26,7 +28,7 @@ for f in Path(root_dir).rglob("*.bin"): ras.append(line) if len(ras) > 0: - print(f"{f.name}: {len(ras)}") + print(f"{f.name} : {len(ras)}") for line in ras: print(line) print("") diff --git a/tools/splat.yaml b/tools/splat.yaml index 323ead9758..9a9032b201 100644 --- a/tools/splat.yaml +++ b/tools/splat.yaml @@ -1346,7 +1346,7 @@ segments: vram: 0x802A1000 files: - [0x415D90, c] - - [0x4200C0, bin] + - [0x4200D0, bin] - type: code start: 0x4219F0 vram: 0x802A9000 diff --git a/undefined_syms_auto.txt b/undefined_syms_auto.txt index 609696fa2a..9427fec397 100644 --- a/undefined_syms_auto.txt +++ b/undefined_syms_auto.txt @@ -930,8 +930,8 @@ D_8010F250 = 0x8010F250; gPlayerData = 0x8010F290; D_8010F6B8 = 0x8010F6B8; update_entities = 0x8010F6D0; -D_80147474 = 0x80147474; func_80147474 = 0x80147474; +D_80147474 = 0x80147474; func_80147574 = 0x80147574; D_80147574 = 0x80147574; func_80147650 = 0x80147650; @@ -1892,12 +1892,12 @@ D_80241FC0 = 0x80241FC0; func_80241FC8_C87A78 = 0x80241FC8; D_80241FE0 = 0x80241FE0; D_80241FF4 = 0x80241FF4; -D_80242000 = 0x80242000; func_80242000_C48BE0 = 0x80242000; +D_80242000 = 0x80242000; D_80242008 = 0x80242008; D_80242010 = 0x80242010; -D_80242030 = 0x80242030; func_80242030_8EDE50 = 0x80242030; +D_80242030 = 0x80242030; D_80242038 = 0x80242038; func_80242040_8B20B0 = 0x80242040; D_80242048 = 0x80242048; @@ -1962,8 +1962,8 @@ D_80242518 = 0x80242518; D_80242520 = 0x80242520; D_80242528 = 0x80242528; D_80242530 = 0x80242530; -D_80242538 = 0x80242538; func_80242538_D223C8 = 0x80242538; +D_80242538 = 0x80242538; D_8024253C = 0x8024253C; func_80242540_A09440 = 0x80242540; func_80242558_A1D658 = 0x80242558; @@ -1983,8 +1983,8 @@ D_8024264C = 0x8024264C; D_80242670 = 0x80242670; D_80242678 = 0x80242678; func_80242680_802F00 = 0x80242680; -D_80242688 = 0x80242688; func_80242688_C79368 = 0x80242688; +D_80242688 = 0x80242688; D_802426B0 = 0x802426B0; D_802426B8 = 0x802426B8; func_802426C8_7ED3D8 = 0x802426C8; @@ -2009,8 +2009,8 @@ D_80242888 = 0x80242888; D_802428E0_DF1780 = 0x802428E0; func_8024291C_C494FC = 0x8024291C; D_8024292C = 0x8024292C; -func_80242930_9C7D10 = 0x80242930; D_80242930 = 0x80242930; +func_80242930_9C7D10 = 0x80242930; D_8024296C_C8841C = 0x8024296C; func_80242970_7ED680 = 0x80242970; D_802429A4 = 0x802429A4; @@ -2031,8 +2031,8 @@ D_80242AC4 = 0x80242AC4; D_80242ACC = 0x80242ACC; D_80242AD0 = 0x80242AD0; D_80242B7E = 0x80242B7E; -func_80242B90_803410 = 0x80242B90; func_80242B90_A1DC90 = 0x80242B90; +func_80242B90_803410 = 0x80242B90; D_80242B98 = 0x80242B98; D_80242B9C = 0x80242B9C; pause_set_cursor_opacity = 0x80242BA0; @@ -2044,8 +2044,8 @@ D_80242BF8 = 0x80242BF8; func_80242C00_BB0540 = 0x80242C00; D_80242C08 = 0x80242C08; D_80242C0E = 0x80242C0E; -func_80242C30_B37800 = 0x80242C30; D_80242C30 = 0x80242C30; +func_80242C30_B37800 = 0x80242C30; D_80242C38 = 0x80242C38; D_80242C40 = 0x80242C40; func_80242C48_9122F8 = 0x80242C48; @@ -2108,8 +2108,8 @@ D_80243078 = 0x80243078; D_80243080 = 0x80243080; func_80243088_8551F8 = 0x80243088; D_8024308C = 0x8024308C; -func_80243090_C395C0 = 0x80243090; func_80243090_8B3100 = 0x80243090; +func_80243090_C395C0 = 0x80243090; D_80243098 = 0x80243098; func_8024309C_95E29C = 0x8024309C; D_802430A0 = 0x802430A0; @@ -2232,8 +2232,8 @@ D_80243890 = 0x80243890; func_80243898 = 0x80243898; D_802438E0 = 0x802438E0; D_802438E8 = 0x802438E8; -func_802438F0_95EAF0 = 0x802438F0; func_802438F0_C436A0 = 0x802438F0; +func_802438F0_95EAF0 = 0x802438F0; D_802438F8 = 0x802438F8; D_80243900 = 0x80243900; switch_order = 0x80243918;