From ee8eb712270d9a4b4aee31e7403217e9ee06b5b2 Mon Sep 17 00:00:00 2001 From: DeathHound Date: Thu, 16 Apr 2026 20:47:20 +0100 Subject: [PATCH] Match + Link inftrees.c --- CONTRIBUTING.md | 2 +- README.md | 4 ++++ config/SALP4Q/splits.txt | 2 ++ config/SALP4Q/symbols.txt | 18 +++++++++--------- configure.py | 7 ++++--- 5 files changed, 20 insertions(+), 13 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 566a4b0..815392f 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -17,7 +17,7 @@ - `ninja` - Write C++ code that creates matching assembly code - Use the following string as the build flags - - Compiler `4.3 build 188 (Wii MW 1.5)` + - Compiler `Wii MW 1.0RC1` - `-O4,s -lang=c++ -RTTI off -enum int -fp hard -enc SJIS -fp_contract on -str reuse -inline auto -use_lmw_stmw on` - While decompiling, please try to self document functions or variables, including information like - Game ID diff --git a/README.md b/README.md index 6e5fdd9..d0e27bf 100644 --- a/README.md +++ b/README.md @@ -17,6 +17,8 @@ https://decomp.dev/Alice-2010/Decomp.svg?mode=shield&measure=code&label=SALE4Q%2 [SALE4Q_C]: https://decomp.dev/Alice-2010/Decomp/SALE4Q.svg?mode=shield&measure=code&label=SALE4Q%20Code [SALP4Q_D]: https://decomp.dev/Alice-2010/Decomp/SALP4Q.svg?mode=shield&measure=data&label=SALP4Q%20Data [SALE4Q_D]: https://decomp.dev/Alice-2010/Decomp/SALE4Q.svg?mode=shield&measure=data&label=SALE4Q%20Data + +[DEFAULT_PROG]: https://decomp.dev/Alice-2010/Decomp.svg?mode=overview @@ -28,6 +30,8 @@ decomp.dev progress badges See https://decomp.dev/api for an API overview. --> +![DEFAULT_PROG] + A work-in-progress decompilation of Alice in Wonderland (2010 Wii). This repository does **not** contain any game assets or assembly whatsoever. An existing copy of the game is required. diff --git a/config/SALP4Q/splits.txt b/config/SALP4Q/splits.txt index 66a2e9a..e12f05a 100644 --- a/config/SALP4Q/splits.txt +++ b/config/SALP4Q/splits.txt @@ -44,6 +44,8 @@ Libraries/zlib/inffast.c: Libraries/zlib/inflate.c: .text start:0x8035CAF0 end:0x8035E6F4 + .rodata start:0x804E1498 end:0x804E1EF0 + .data start:0x80517528 end:0x8051759C Libraries/zlib/inftrees.c: .text start:0x8035E6F4 end:0x8035EE70 diff --git a/config/SALP4Q/symbols.txt b/config/SALP4Q/symbols.txt index d3891dc..6f8352e 100644 --- a/config/SALP4Q/symbols.txt +++ b/config/SALP4Q/symbols.txt @@ -43535,16 +43535,16 @@ lbl_804DF390 = .rodata:0x804DF390; // type:object size:0x12 data:string lbl_804DF3A8 = .rodata:0x804DF3A8; // type:object size:0x2000 lbl_804E13A8 = .rodata:0x804E13A8; // type:object size:0x78 lbl_804E1420 = .rodata:0x804E1420; // type:object size:0x28 -@stringBase0 = .rodata:0x804E1448; // type:object size:0x50 scope:global data:string_table -@LOCAL@fixedtables__Fe@lenfix = .rodata:0x804E1498; // type:object size:0x800 -@LOCAL@fixedtables__Fe@distfix@0 = .rodata:0x804E1C98; // type:object size:0x80 -@LOCAL@inflate__Fe@order = .rodata:0x804E1D18; // type:object size:0x28 -@stringBase0 = .rodata:0x804E1D40; // type:object size:0x1B0 data:string_table +@stringBase0 = .rodata:0x804E1448; // type:object size:0x50 scope:local data:string_table +lenfix$385 = .rodata:0x804E1498; // type:object size:0x800 scope:local +distfix$386 = .rodata:0x804E1C98; // type:object size:0x80 scope:local +order$446 = .rodata:0x804E1D18; // type:object size:0x26 scope:weak +@stringBase0 = .rodata:0x804E1D40; // type:object size:0x1AE scope:local data:string_table inflate_copyright = .rodata:0x804E1EF0; // type:object size:0x2F data:string -@LOCAL@inflate_table__Fe@lbase = .rodata:0x804E1F20; // type:object size:0x3E scope:weak -@LOCAL@inflate_table__Fe@lext@0 = .rodata:0x804E1F60; // type:object size:0x3E scope:weak -@LOCAL@inflate_table__Fe@dbase@1 = .rodata:0x804E1FA0; // type:object size:0x40 scope:weak -@LOCAL@inflate_table__Fe@dext@2 = .rodata:0x804E1FE0; // type:object size:0x40 scope:weak +lbase$331 = .rodata:0x804E1F20; // type:object size:0x3E scope:local +lext$332 = .rodata:0x804E1F60; // type:object size:0x3E scope:local +dbase$333 = .rodata:0x804E1FA0; // type:object size:0x40 scope:local +dext$334 = .rodata:0x804E1FE0; // type:object size:0x40 scope:local lbl_804E2020 = .rodata:0x804E2020; // type:object size:0x78 lbl_804E2098 = .rodata:0x804E2098; // type:object size:0x78 lbl_804E2110 = .rodata:0x804E2110; // type:object size:0x4C diff --git a/configure.py b/configure.py index 509e865..65a4e96 100644 --- a/configure.py +++ b/configure.py @@ -238,7 +238,8 @@ elif args.warn == "error": cflags_base.append("-W error") -config.linker_version = "Wii/1.0" +# NOTE Alice likely uses either 1.0a or 1.0RC1 +config.linker_version = "Wii/1.0RC1" Matching = True # Object matches and should be linked @@ -336,14 +337,14 @@ def MatchingFor(*versions): "-func_align 4", "-use_lmw_stmw on", "-opt nopeephole", - "-rostr", + "-str reuse,readonly", ], "host": False, "progress_category": "lib", "objects": [ Object(MatchingFor("SALP4Q"), "Libraries/zlib/inffast.c"), Object(MatchingFor(), "Libraries/zlib/inflate.c"), - Object(MatchingFor(), "Libraries/zlib/inftrees.c"), + Object(MatchingFor("SALP4Q"), "Libraries/zlib/inftrees.c"), Object(MatchingFor(), "Libraries/zlib/zutil.c"), ] },