Repository navigation
Commit d833200
feat(mhfu): one memory interface and the overlay and EBOOT analysis on rabbitizer (#6)
* feat(mhfu): memory, typed views, overlays, BOOT.BIN, file ids, MIPS core, one CLI
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(mhfu): an overlay's text section starts at 0x40; its first 64 bytes are zero
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(mhfu): drop EM_OVERLAY_BASE; below an em overlay lies game_sub's bss, not the overlay's
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* feat(mhfu): a struct can give its table stride; psutil is a direct dependency
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* feat(mhfu): shared MIPS analyses on rabbitizer
mips.Code decodes a text range once and answers what the old tools each
re-implemented: function bounds, calls (direct, virtual by vtable slot,
tail), lui/lo pairs through rabbitizer's RegistersTracker as spimdisasm
walks it, jump tables with their bound and bias, and the constant a
register holds at a site.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* feat(mhfu): the em package for big-monster overlay analysis
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* feat(mhfu): stage runtime, hit volumes, attack tables, model injection files
mhfu.stage reads a stage overlay's parameter object (exits, spheres, the raw
surface table), the map table, and the live resident-file, gathering-spot and
small-monster spawn tables. mhfu.hitzone and mhfu.hitbox read the part system
and the attack tables through the species row and the setter call. mhfu.inject
places finished files for the framework's live injection. files.py covers all
282 stage PACs, the 16 st046 lobby variants included.
CLI: mhfu stage ids|maps|exits|surfaces|spots|spawns, mhfu hitzones,
mhfu hitboxes, mhfu inject.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* feat(mhfu): relocate an MWo3 overlay by a 64 KB-aligned delta
References come from mhfu.mips: j/jal targets, lui/lo pairs as
rabbitizer's RegistersTracker pairs them (matching spimdisasm on every
em, stage, game_task and game_sub overlay) and data words into the
overlay's own image and bss. The header's load address and ctor list
move with it; the bss of game_sub below an em overlay does not.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* refactor(mhfu): an overlay maps as the game holds it; Struct.step, Species and LOBBY_TASK in one place each
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* feat(mhfu): Code.table; relocate from the overlay's raw file
Code.table gives the table an indexed load reads (lw v0, 0(table +
index)), the one idiom hitbox needed that Code.constant does not cover.
relocate() now starts from Overlay.file, so a moved overlay keeps its
disc padding.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* refactor(mhfu): hitbox and stage read code through mips.Code
hitbox.setter_calls replaces calls_to, Code.constant the lui/addiu
window, and Code.table the try-every-register loop for the volume table;
the stage parameter object is what any function returns in v0.
Identical results: 22 attack tables with their 355 volume sets and all
267 stage parameter objects.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* test(mhfu): hitbox and stage tests on mips.Code
The synthetic setter call stores a table entry the way the game does,
lw v0, 0(table + index), instead of relying on a scan of every register.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* feat(mhfu): mhfu dis, xref, switch and reloc
The game's code from BOOT.BIN or an overlay (a file id, game_task,
game_sub, emNN or stageNNN); an address may be a name from the table.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(mhfu): follow the move pseudo-instruction in constants and switch operands
rabbitizer reports or rd, rs, $zero as cpu_move; move_source names the
copied register for it and for addu/or with $zero.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* feat(mhfu): the effects a big-monster overlay spawns, and the species effect-id bias
Addresses for the intel section: the framed and positional effect spawns, the entity
factory and the run of attack-node constructors.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* feat(mhfu): the attack id each big-monster handler spawns, and how it fits the table
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* feat(mhfu): the engine-to-overlay interface: entity vtables, factory, dispatch sites
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* feat(mhfu): the measured behaviour-pair census from the framework log
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* feat(mhfu): mhfu effects, attacks, abi and census
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* feat(mhfu): species intel blocks: credited effects and attacks, parts, attack tables, census
The per-pair join waits for the moveset, phase and chain analyses.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* feat(mhfu): big-monster moves, what ends them and what follows, from the overlay
Moveset reads the action tick's (main, sub) pairs, their handlers and the
animation ids each hands the executor; phases the gates a handler waits on;
chain the pair a handler enters when it ends, through enter-action and the
per-main translators. One path walker interprets handlers for both.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(mhfu): data flow across labels; tail-called functions are entries
source, constant and the virtual-call slot now take every path into a
site within its function, jump-table edges included, instead of stopping
at the first label: a vptr loaded on both arms of a branch-likely now
gives its slot (three more vt+0x28 calls in game_task). A j to a run no
branch reaches starts a function when it lies in another function or
right after the j, and a prologue a j reaches is no longer taken for a
second frame.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(mhfu): parity with the old em tools; tail calls, facts and per-path values
Gates read the handler's body over tail jumps and each frame on every path;
budget seeds through walker probes. The walker follows tail calls as
continuations, learns entity cells from stores and branches, and the chain
treats a tail-calling thunk as the wrapper it leads to. An enter-action id
that sets nothing is told apart from a computed one.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* refactor(mhfu): CALL_CLOBBERS public, chain on Call.slot alone, Live reads raise Unmapped
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* docs(mhfu): README for the memory interface, views and the analysis commands
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* refactor(mhfu): abi reads the vtable slot from Call.slot, which now sees past labels
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* feat(mhfu): mhfu intel, the per-species join (schema mhfu.species_intel/1)
An inline case keeps its own note instead of the census-only one; the overlay's text is
the section's true range.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* chore(mhfu): drop the empty address sections
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* test(mhfu): one shared MIPS encoder module for the test code
modkit_testing.mips replaces nine per-file encoder sets; each encoder is
checked against rabbitizer's decode.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* test(mhfu): test_phases and test_cli_binary on the shared encoders
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(mhfu): the census skips forced transitions and the visits they cut short
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>1 parent 2d5a118 commit d833200
59 files changed
Lines changed: 8118 additions & 34 deletions
File tree
- packages
- mhfu
- src/mhfu
- cli
- em
- tests
- modkit-testing
- src/modkit_testing
- tests
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
4 | 6 | | |
5 | 7 | | |
6 | 8 | | |
| |||
17 | 19 | | |
18 | 20 | | |
19 | 21 | | |
20 | | - | |
21 | | - | |
| 22 | + | |
| 23 | + | |
22 | 24 | | |
23 | 25 | | |
24 | 26 | | |
25 | 27 | | |
26 | 28 | | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
9 | 13 | | |
10 | 14 | | |
11 | 15 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
16 | 15 | | |
17 | 16 | | |
18 | 17 | | |
| |||
65 | 64 | | |
66 | 65 | | |
67 | 66 | | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
68 | 76 | | |
69 | 77 | | |
70 | | - | |
| 78 | + | |
71 | 79 | | |
72 | 80 | | |
73 | 81 | | |
| |||
119 | 127 | | |
120 | 128 | | |
121 | 129 | | |
122 | | - | |
123 | | - | |
| 130 | + | |
| 131 | + | |
124 | 132 | | |
125 | | - | |
| 133 | + | |
126 | 134 | | |
127 | 135 | | |
128 | 136 | | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
129 | 140 | | |
130 | 141 | | |
131 | 142 | | |
| |||
142 | 153 | | |
143 | 154 | | |
144 | 155 | | |
145 | | - | |
| 156 | + | |
146 | 157 | | |
147 | 158 | | |
148 | 159 | | |
149 | 160 | | |
150 | 161 | | |
151 | 162 | | |
152 | | - | |
| 163 | + | |
153 | 164 | | |
154 | 165 | | |
155 | 166 | | |
| |||
201 | 212 | | |
202 | 213 | | |
203 | 214 | | |
| 215 | + | |
| 216 | + | |
204 | 217 | | |
205 | 218 | | |
206 | 219 | | |
| |||
222 | 235 | | |
223 | 236 | | |
224 | 237 | | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
225 | 243 | | |
226 | 244 | | |
227 | 245 | | |
| |||
247 | 265 | | |
248 | 266 | | |
249 | 267 | | |
250 | | - | |
251 | | - | |
252 | | - | |
253 | | - | |
254 | | - | |
255 | | - | |
256 | | - | |
257 | | - | |
258 | | - | |
259 | | - | |
260 | | - | |
261 | | - | |
262 | | - | |
263 | | - | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
264 | 272 | | |
265 | 273 | | |
266 | 274 | | |
| |||
0 commit comments