mirror of
https://github.com/Druthulu/BFM-decomp
synced 2026-09-27 05:56:00 -04:00
feat(phase-13): T2 — dup-pair collapse SC01/005 ≡ 006 (one source, both green)
- src/shared/ov_setters.h: generic SETTER/RETCONST macro bodies (cookbook §11 source-level share), instantiated IN PLACE (address order preserved) in both ov_SC01_005.c and ov_SC01_006.c via ../shared/ relative include - config/dedup.us.yaml: D1/D2/D3 cross-overlay groups (members in BOTH 005 & 006) - both make check BINARY=ov_SC01_005 AND =ov_SC01_006 -> 56760dbe BYTE-IDENTICAL from the one shared source; dedup_integrate --check: 4 validated, 0 failed; REAL=3 credited to both members
This commit is contained in:
@@ -59,3 +59,33 @@ groups:
|
||||
members:
|
||||
- { binary: main, vram: 0x80037004, name: func_80037004 }
|
||||
- { binary: main, vram: 0x80037334, name: func_80037334 }
|
||||
|
||||
# D1/D2/D3 — Phase-13 CROSS-OVERLAY proof: the byte-identical duplicate pair SC01/005 ≡ SC01/006
|
||||
# (one 0.4.dec, sha1 56760dbe) shares three trivial accessors from ONE source (src/shared/ov_setters.h),
|
||||
# instantiated in place in both overlays' .c. Both `make check BINARY=ov_SC01_005` and `=ov_SC01_006`
|
||||
# stay 56760dbe with the shared C (and with the INCLUDE_ASM stubs) — one match, two binaries. The
|
||||
# generic SETTER/RETCONST macros are reusable fleet-wide (Phase 15 appends members as overlays onboard).
|
||||
- id: D1_ov_dup_8012AD64
|
||||
tier: h_exact
|
||||
hash: 89004be30998a495e3d94dbec7513e3d37f47d8d
|
||||
source: src/shared/ov_setters.h
|
||||
func: SETTER
|
||||
members:
|
||||
- { binary: ov_SC01_005, vram: 0x8012AD64, name: func_8012AD64 }
|
||||
- { binary: ov_SC01_006, vram: 0x8012AD64, name: func_8012AD64 }
|
||||
- id: D2_ov_dup_8012BF4C
|
||||
tier: h_exact
|
||||
hash: b039ed440779107270b60a3b2ca44b3b097b9c87
|
||||
source: src/shared/ov_setters.h
|
||||
func: SETTER
|
||||
members:
|
||||
- { binary: ov_SC01_005, vram: 0x8012BF4C, name: func_8012BF4C }
|
||||
- { binary: ov_SC01_006, vram: 0x8012BF4C, name: func_8012BF4C }
|
||||
- id: D3_ov_dup_8012E27C
|
||||
tier: h_exact
|
||||
hash: 98ab17e54d84a098b4240053ee845921141318c1
|
||||
source: src/shared/ov_setters.h
|
||||
func: RETCONST
|
||||
members:
|
||||
- { binary: ov_SC01_005, vram: 0x8012E27C, name: func_8012E27C }
|
||||
- { binary: ov_SC01_006, vram: 0x8012E27C, name: func_8012E27C }
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#include "common.h"
|
||||
#include "../shared/ov_setters.h" /* dedup share across the SC01/005 ≡ 006 pair (cookbook §11) */
|
||||
|
||||
INCLUDE_ASM("asm/ov_SC01_005/nonmatchings/ov_SC01_005", func_80128158);
|
||||
|
||||
@@ -188,7 +189,7 @@ INCLUDE_ASM("asm/ov_SC01_005/nonmatchings/ov_SC01_005", func_8012AD44);
|
||||
|
||||
INCLUDE_ASM("asm/ov_SC01_005/nonmatchings/ov_SC01_005", func_8012AD50);
|
||||
|
||||
INCLUDE_ASM("asm/ov_SC01_005/nonmatchings/ov_SC01_005", func_8012AD64);
|
||||
SETTER(func_8012AD64, 0x34, s16) /* dedup: shared with ov_SC01_006 (src/shared/ov_setters.h) */
|
||||
|
||||
INCLUDE_ASM("asm/ov_SC01_005/nonmatchings/ov_SC01_005", func_8012AD6C);
|
||||
|
||||
@@ -264,7 +265,7 @@ INCLUDE_ASM("asm/ov_SC01_005/nonmatchings/ov_SC01_005", func_8012BEE8);
|
||||
|
||||
INCLUDE_ASM("asm/ov_SC01_005/nonmatchings/ov_SC01_005", func_8012BF10);
|
||||
|
||||
INCLUDE_ASM("asm/ov_SC01_005/nonmatchings/ov_SC01_005", func_8012BF4C);
|
||||
SETTER(func_8012BF4C, 0x1C, s32) /* dedup: shared with ov_SC01_006 (src/shared/ov_setters.h) */
|
||||
|
||||
INCLUDE_ASM("asm/ov_SC01_005/nonmatchings/ov_SC01_005", func_8012BF54);
|
||||
|
||||
@@ -381,7 +382,7 @@ INCLUDE_ASM("asm/ov_SC01_005/nonmatchings/ov_SC01_005", func_8012E014);
|
||||
|
||||
INCLUDE_ASM("asm/ov_SC01_005/nonmatchings/ov_SC01_005", func_8012E138);
|
||||
|
||||
INCLUDE_ASM("asm/ov_SC01_005/nonmatchings/ov_SC01_005", func_8012E27C);
|
||||
RETCONST(func_8012E27C, 1) /* dedup: shared with ov_SC01_006 (src/shared/ov_setters.h) */
|
||||
|
||||
void func_8012E284(void) {
|
||||
}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#include "common.h"
|
||||
#include "../shared/ov_setters.h" /* dedup share across the SC01/005 ≡ 006 pair (cookbook §11) */
|
||||
|
||||
INCLUDE_ASM("asm/ov_SC01_006/nonmatchings/ov_SC01_006", func_80128158);
|
||||
|
||||
@@ -188,7 +189,7 @@ INCLUDE_ASM("asm/ov_SC01_006/nonmatchings/ov_SC01_006", func_8012AD44);
|
||||
|
||||
INCLUDE_ASM("asm/ov_SC01_006/nonmatchings/ov_SC01_006", func_8012AD50);
|
||||
|
||||
INCLUDE_ASM("asm/ov_SC01_006/nonmatchings/ov_SC01_006", func_8012AD64);
|
||||
SETTER(func_8012AD64, 0x34, s16) /* dedup: shared with ov_SC01_005 (src/shared/ov_setters.h) */
|
||||
|
||||
INCLUDE_ASM("asm/ov_SC01_006/nonmatchings/ov_SC01_006", func_8012AD6C);
|
||||
|
||||
@@ -264,7 +265,7 @@ INCLUDE_ASM("asm/ov_SC01_006/nonmatchings/ov_SC01_006", func_8012BEE8);
|
||||
|
||||
INCLUDE_ASM("asm/ov_SC01_006/nonmatchings/ov_SC01_006", func_8012BF10);
|
||||
|
||||
INCLUDE_ASM("asm/ov_SC01_006/nonmatchings/ov_SC01_006", func_8012BF4C);
|
||||
SETTER(func_8012BF4C, 0x1C, s32) /* dedup: shared with ov_SC01_005 (src/shared/ov_setters.h) */
|
||||
|
||||
INCLUDE_ASM("asm/ov_SC01_006/nonmatchings/ov_SC01_006", func_8012BF54);
|
||||
|
||||
@@ -381,7 +382,7 @@ INCLUDE_ASM("asm/ov_SC01_006/nonmatchings/ov_SC01_006", func_8012E014);
|
||||
|
||||
INCLUDE_ASM("asm/ov_SC01_006/nonmatchings/ov_SC01_006", func_8012E138);
|
||||
|
||||
INCLUDE_ASM("asm/ov_SC01_006/nonmatchings/ov_SC01_006", func_8012E27C);
|
||||
RETCONST(func_8012E27C, 1) /* dedup: shared with ov_SC01_005 (src/shared/ov_setters.h) */
|
||||
|
||||
void func_8012E284(void) {
|
||||
}
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
/* src/shared/ov_setters.h — shared parameterized bodies for trivial overlay accessors.
|
||||
* cookbook §11 source-level dedup ("match once, share many"): the body lives ONCE here and is
|
||||
* instantiated IN PLACE (preserving each .c's address order — overlays link functions in source
|
||||
* order) at every member's site. The byte-identical overlay pair SC01/005 ≡ SC01/006 (one
|
||||
* 0.4.dec, sha1 56760dbe) shares these via config/dedup.us.yaml; tools/dedup_integrate.py
|
||||
* byte-gates the share (h_exact). The macros are generic, so the 134-overlay fleet reuses them. */
|
||||
#ifndef OV_SETTERS_H
|
||||
#define OV_SETTERS_H
|
||||
#define SETTER(name, off, ty) void name(void *p, ty v) { *(ty *)((s32)p + (off)) = v; }
|
||||
#define RETCONST(name, val) s32 name(void) { return (val); }
|
||||
#endif
|
||||
Reference in New Issue
Block a user