From b02c9b1bd9f515c925eb9c63dc4050bbb0670f40 Mon Sep 17 00:00:00 2001 From: sonicspiral <> Date: Sun, 30 Aug 2020 01:37:51 -0700 Subject: [PATCH] decomp of func_8014A52C from code_e0b30_len_b80 * updates to undefined_syms * updates to variables.h * added helper window_terminal.bat for windows users original mips to c output ``` s16 func_8014A52C(void) { *(void *)0x80159AE2 = (u16)8; *(void *)0x80159AE4 = (u16)8; return (u16)8; } ``` --- include/variables.h | 2 ++ src/code_e0b30_len_b80.c | 5 ++++- tools/windows_terminal.bat | 6 ++++++ undefined_syms.txt | 2 ++ 4 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 tools/windows_terminal.bat diff --git a/include/variables.h b/include/variables.h index 30795203f2..64ddc2c6cb 100644 --- a/include/variables.h +++ b/include/variables.h @@ -54,6 +54,8 @@ extern s16* D_80151328; extern s16 D_8010CD10; extern s16 D_8010CD12; extern s32 D_801595A0; +extern s16 D_80159AE2; +extern s16 D_80159AE4; extern BackgroundHeader gBackgroundImage; extern s8 D_8014F12F; diff --git a/src/code_e0b30_len_b80.c b/src/code_e0b30_len_b80.c index 74cc183fb6..b87590faef 100644 --- a/src/code_e0b30_len_b80.c +++ b/src/code_e0b30_len_b80.c @@ -4,7 +4,10 @@ INCLUDE_ASM("code_e0b30_len_b80", get_default_variation_for_song); INCLUDE_ASM("code_e0b30_len_b80", func_8014A498); -INCLUDE_ASM("code_e0b30_len_b80", func_8014A52C); +void func_8014A52C(void) { + D_80159AE2 = (s16)0x08; + D_80159AE4 = (s16)0x08; +} INCLUDE_ASM("code_e0b30_len_b80", func_8014A548); diff --git a/tools/windows_terminal.bat b/tools/windows_terminal.bat new file mode 100644 index 0000000000..81338f621c --- /dev/null +++ b/tools/windows_terminal.bat @@ -0,0 +1,6 @@ +:: replace with your distro +set distro="Ubuntu-18.04" +wt -p %distro% -d "../" ; ^ +split-pane -p %distro% -d "../" -V --title "diff.py" ; ^ +new-tab -p %distro% -d . --title "mips_to_c.py" ; ^ +focus-tab -t 0 diff --git a/undefined_syms.txt b/undefined_syms.txt index ce3f8036ee..40e82dfde6 100644 --- a/undefined_syms.txt +++ b/undefined_syms.txt @@ -75,6 +75,8 @@ gTriggerList2 = 0x80159290; gCurrentTriggerListPtr = 0x80159390; D_801595A0 = 0x801595A0; +D_80159AE2 = 0x80159AE2; +D_80159AE4 = 0x80159AE4; D_8015C7C0 = 0x8015C7C0; gWorldModelList = 0x80151770;