Skip to content

hbm: split the Home Button Menu library into its three TUs - #49

Merged
GuestDreemurr merged 1 commit into
doldecomp:mainfrom
ridvansan:hbm-split
Oct 21, 2026
Merged

GuestDreemurr merged 1 commit into
doldecomp:mainfrom
ridvansan:hbm-split

Conversation

@ridvansan

Copy link
Copy Markdown
Contributor

The whole RVL_SDK HBM library (0x80071FD8-0x8007E37C, 146 functions, 50 KB) was a single dtk auto unit. Split it where the literal pools, the vtable blocks and the class layout say the translation units end:

hbm/HBMBase.cpp 0x80071FD8-0x8007B888 56 functions
HBMCreate/HBMDelete/HBMInit/HBMCalc/HBMDraw, the
sound entry points, homebutton::HomeButton and the
empty virtual stubs fn_8007B870-fn_8007B884
hbm/HBMGui.cpp 0x8007B888-0x8007CF6C 48 functions
homebutton::GroupAnmController (ctor fn_8007B888,
dtor fn_8007B8A4, do_calc, virtual fn_8007B9EC),
FrameController and homebutton::gui
hbm/HBMController.cpp 0x8007CF6C-0x8007E37C 42 functions
homebutton::Controller, homebutton::RemoteSpk, and
the fn_8007E2A8 menu-result bridge

The library name comes from its own version banner, "<< RVL_SDK - HBM release build: May 16 2007 ... >>" at .data 0x801B4730. The file names are descriptive (the DOL has no symbol table); the boundaries are evidence:

  • Each unit restarts its own .sdata2 literal pool: HBMBase stops at 0x803321E0, where HBMGui emits a fresh 1.0f, and HBMController restarts with its own 1.0f at 0x803321F8. (.rodata, .bss, .sdata, .sbss each have exactly one owning unit per object - checked object by object.)
  • The GroupAnmController class pins the first boundary: its vtable 0x801B5320 is installed by fn_8007B888, its deleting dtor is fn_8007B8A4 and its virtual method fn_8007B9EC; one class keeps ctor, dtor, vtable and method in one TU, and fn_8007B9EC is provably in the second unit because it emits that unit's own 1.0f instead of reusing HBMBase's. So the second unit starts at 0x8007B888 and owns .data from 0x801B5320.
  • The controller boundary is the last gui vtable: every function the four gui vtables point at lies below 0x8007CF6C, and the Controller vtable 0x801B5488 is only installed by fn_8007DD48/fn_8007DE00, above it.
  • The only cross-unit .data objects are two gui vtables (PaneManager 0x801B5398 and Manager 0x801B53EC) that HomeButton's ctor 0x80072A34 also references, which is normal for vtables of member objects.
  • The library has no .ctors and no exception tables, so there is no __sinit boundary to use here.

All seven auto units that covered this range (text, rodata, data, bss, sdata, sbss, sdata2) are gone. HAFE DOL still matches.

@decomp-dev

decomp-dev Bot commented Oct 21, 2026 •

Copy link
Copy Markdown

Report for HAFE (af3637e - 85ed12f)

No changes

@GuestDreemurr

Copy link
Copy Markdown
Member

RVL_SDK library, should be under RVL_SDK's progress category and respective folders.

HBM is an RVL_SDK library, so its units live under revolution/HBM/ next to
the other SDK units and are tracked by the RVL_SDK progress category (no
separate category or lib group).

The whole library (0x80071FD8-0x8007E37C, 146 functions, 50 KB) was a single
dtk auto unit. Split it where the literal pools, the vtable blocks and the
class layout say the translation units end:

  revolution/HBM/HBMBase.cpp        0x80071FD8-0x8007B888  56 functions
                                    HBMCreate/HBMDelete/HBMInit/HBMCalc/
                                    HBMDraw, the sound entry points,
                                    homebutton::HomeButton and the empty
                                    virtual stubs fn_8007B870-fn_8007B884
  revolution/HBM/HBMGui.cpp         0x8007B888-0x8007CF6C  48 functions
                                    homebutton::GroupAnmController (ctor
                                    fn_8007B888, dtor fn_8007B8A4, do_calc,
                                    virtual fn_8007B9EC), FrameController and
                                    homebutton::gui
  revolution/HBM/HBMController.cpp  0x8007CF6C-0x8007E37C  42 functions
                                    homebutton::Controller,
                                    homebutton::RemoteSpk, and the fn_8007E2A8
                                    menu-result bridge

The library name comes from its own version banner, "<< RVL_SDK - HBM release
build: May 16 2007 ... >>" at .data 0x801B4730. The file names are descriptive
(the DOL has no symbol table); the boundaries are evidence:

- Each unit restarts its own .sdata2 literal pool: HBMBase stops at
  0x803321E0, where HBMGui emits a fresh 1.0f, and HBMController restarts with
  its own 1.0f at 0x803321F8. (.rodata, .bss, .sdata, .sbss each have exactly
  one owning unit per object - checked object by object.)
- The GroupAnmController class pins the first boundary: its vtable 0x801B5320
  is installed by fn_8007B888, its deleting dtor is fn_8007B8A4 and its
  virtual method fn_8007B9EC; one class keeps ctor, dtor, vtable and method in
  one TU, and fn_8007B9EC is provably in the second unit because it emits that
  unit's own 1.0f instead of reusing HBMBase's.
- The controller boundary is the last gui vtable: every function the four gui
  vtables point at lies below 0x8007CF6C, and the Controller vtable
  0x801B5488 is only installed by fn_8007DD48/fn_8007DE00, above it.
- The only cross-unit .data objects are two gui vtables (PaneManager
  0x801B5398 and Manager 0x801B53EC) that HomeButton's ctor 0x80072A34 also
  references, which is normal for vtables of member objects.
- The library has no .ctors and no exception tables, so there is no __sinit
  boundary to use here.

All seven auto units that covered this range (text, rodata, data, bss, sdata,
sbss, sdata2) are gone. HAFE DOL still matches.
@GuestDreemurr
GuestDreemurr merged commit 8c49e69 into doldecomp:main Oct 21, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants