Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions config/HAFE/splits.txt
Original file line number Diff line number Diff line change
Expand Up @@ -556,6 +556,29 @@ revolution/ARC/arc.c:
.data start:0x801B46C0 end:0x801B4730
.sdata start:0x803302F8 end:0x80330308

revolution/HBM/HBMBase.cpp:
.text start:0x80071FD8 end:0x8007B888
.rodata start:0x80193DC8 end:0x80194078
.data start:0x801B4730 end:0x801B5320
.bss start:0x80288D60 end:0x80288D98
.sdata start:0x80330308 end:0x803303D0
.sbss start:0x80330D60 end:0x80330D68
.sdata2 start:0x80332168 end:0x803321E0

revolution/HBM/HBMGui.cpp:
.text start:0x8007B888 end:0x8007CF6C
.data start:0x801B5320 end:0x801B5488
.sbss start:0x80330D68 end:0x80330D70
.sdata2 start:0x803321E0 end:0x803321F8

revolution/HBM/HBMController.cpp:
.text start:0x8007CF6C end:0x8007E37C
.data start:0x801B5488 end:0x801B5498
.bss start:0x80288D98 end:0x80288F28
.sdata start:0x803303D0 end:0x803303D8
.sbss start:0x80330D70 end:0x80330DA0
.sdata2 start:0x803321F8 end:0x80332208

vcmv/vcmv_www.cpp:
extab start:0x80006648 end:0x80006698
extabindex start:0x80006B5C end:0x80006BD4
Expand Down
5 changes: 5 additions & 0 deletions configure.py
Original file line number Diff line number Diff line change
Expand Up @@ -589,6 +589,11 @@ def MatchingFor(*versions):
Object(NonMatching, "revolution/GX/GXTexture.c"),
Object(Matching, "revolution/GX/GXTransform.c"),

# HBM
Object(NonMatching, "revolution/HBM/HBMBase.cpp"),
Object(NonMatching, "revolution/HBM/HBMGui.cpp"),
Object(NonMatching, "revolution/HBM/HBMController.cpp"),

# IPC
Object(NonMatching, "revolution/IPC/ipcclt.c"),
Object(Matching, "revolution/IPC/ipcMain.c"),
Expand Down
24 changes: 24 additions & 0 deletions src/revolution/HBM/HBMBase.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
// RVL_SDK HBM (Home Button Menu) - base and menu state machine.
//
// This is the first translation unit of libhbm. It owns the version string
// "<< RVL_SDK - HBM release build: May 16 2007 ... >>" at .data 0x801B4730,
// the C entry points and the homebutton::HomeButton implementation:
//
// HBMCreate / HBMDelete / HBMInit / HBMCalc / HBMDraw / HBMGetSelectBtnNum
// HBMSetAdjustFlag / HBMStartBlackOut / HBMCreateSound / HBMDeleteSound /
// HBMUpdateSound
// homebutton::HomeButton (ctor, set_text, calc_battery, updateTrigPane,
// startLeftEvent, reset_btn, getPaneNo, onEvent) and its sound/GX helpers
// (fn_80072354 ... fn_80076024, fn_8007699C, fn_800777A8, fn_80079448,
// fn_8007B374 initgx, fn_8007B52C, fn_8007B68C, fn_8007B7B0 and the empty
// virtual stubs fn_8007B870-fn_8007B884)
//
// Split evidence: the unit ends where the GroupAnmController class starts
// (see HBMGui.cpp). Its .data block is 0x801B4730-0x801B5320 (the version
// string, the pane/animation name tables and the HomeButton vtable
// 0x801B52E0), its .rodata 0x80193DC8-0x80194078 is the two tables only
// HomeButton code uses, its .bss 0x80288D60-0x80288D98 holds the sound
// archive/player, its .sdata2 pool 0x80332168-0x803321E0 is consumed before
// the gui unit emits its own 1.0f at 0x803321E0 (MWCC emits one pool per TU),
// and its .sbss is the single HBM global at 0x80330D60.
// No .ctors: the HBM objects have no static constructors.
20 changes: 20 additions & 0 deletions src/revolution/HBM/HBMController.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
// RVL_SDK HBM (Home Button Menu) - controller and remote speaker.
//
// Third translation unit of libhbm:
//
// homebutton::Controller (wpadConnectCallback, wpadExtensionCallback,
// soundOnCallback, initCallback, clearCallback, setKpad, getInfoAsync,
// startMotor, stopMotor, isPlayingSoundId, and the WPAD/kpad helpers
// 0x8007D1FC ... 0x8007DDA0)
// homebutton::RemoteSpk (Start, Connect, Play, isPlaying, isPlayingId,
// isPlayReady and the helpers 0x8007DE00 ... 0x8007E2A8)
// fn_8007E2A8 - the menu-result bridge the vcmv (Opera) code calls to enter
// the manual/black-out states; it plays the HBM sound ids through fn_80072354
// fn_8007E378 - empty stub
//
// Split evidence: the .sdata2 pool restarts with its own 1.0f at 0x803321F8
// (the gui unit's pool stopped at 0x803321F0), .data 0x801B5488 holds the
// controller table {fn_8007DE00}, .bss 0x80288D98-0x80288F28 holds the WPAD
// status blocks, and .sbss 0x80330D70-0x80330DA0 holds the controller, kpad
// and menu-result globals (the first of them is used from 0x8007D1FC on).
// It has no .rodata.
21 changes: 21 additions & 0 deletions src/revolution/HBM/HBMGui.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
// RVL_SDK HBM (Home Button Menu) - gui framework and animation controllers.
//
// Second translation unit of libhbm. It starts with homebutton::GroupAnmController
// (ctor fn_8007B888, deleting dtor fn_8007B8A4, do_calc, and the virtual
// method fn_8007B9EC) and continues with the gui framework:
//
// homebutton::FrameController (init, initFrame)
// homebutton::gui::Component, PaneComponent, PaneManager, Manager,
// EventHandler (init, update, onTrig, isVisible, addComponent, getComponent,
// dtors, setEventHandler, setAllComponentTriggerTarget, ...)
// fn_8007BB34 / fn_8007CBB0 / fn_8007CA80 / fn_8007C610 / fn_8007C6B0
//
// Split evidence: the unit owns the GroupAnmController vtable 0x801B5320. Its
// ctor fn_8007B888 installs that table, its deleting dtor fn_8007B8A4 and its
// virtual method fn_8007B9EC are the table's entries, so ctor, dtor, vtable
// and method are one TU and the unit opens at 0x8007B888. fn_8007B9EC also
// emits this unit's own 1.0f at 0x803321E0 instead of reusing the one at
// 0x8033217C. The rest of .data
// 0x801B5320-0x801B5488 is exactly the four gui vtables (Component,
// PaneComponent, PaneManager, Manager), and the unit owns the single gui
// global in .sbss at 0x80330D68. It has no .bss and no .rodata of its own.
Loading