Commit Graph
3 Commits
Author SHA1 Message Date
Valiantsin DzerakhandClaude Opus 5.5 db6d548ba2 The generator lifts a mod plugin's hook sites: a call into its stub, its replace target and its call-site rewrite (#845)
After the design in #845 by itaskaev2. New patch lines carry an exlaunch plugin whose init runs at every
start: `plugin` lifts the module from its image after the init (the hook stubs and trampolines the file
has as zeros) and names the hash of that .text, `expect` lists the words the init writes into the game,
`stub` lifts an inline-hook stub's branch to its trampoline as a return, `seed` adds the callbacks, impls
and targets, and `orig` lists an unpatched copy of a hooked main function (fo_<address>) at the replace
hook's trampoline address in the plugin's function table, so the plugin's call of the original does not
reach the hook again and rt_dispatch stays as it is.

A replacement word @call:<module>+<offset> calls the stub without writing x30, with every register in
the Cpu before it and read back after it; the site's own instruction runs after it in place. patches.h
gets RT_PLUGINS, RT_PLUGIN_WRITES and RT_PLUGIN_ROOTS for the runtime. Without plugin lines the output is
byte-identical to dev (generated C, patches.h and layout of 1.2.1 and 1.4.3).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-17 08:48:14 +03:00
Valiantsin DzerakhandClaude Opus 5.5 b94e8127af Mod plugins get their own modules after sdk in the layout and are lifted with the game (#845)
recomp/layout.py appends a mod's code modules (exlaunch plugins such as exefs/subsdk9) after sdk as plugin0..N in
mod load order, so the game modules keep their bases; layout.json names each plugin's NSO and its SHA-256, and without
plugins layout.json and layout.h stay byte-identical. gen.py --plugins lifts them with DT_INIT and the init_array
entries as extra seeds, and Module.eh_frame_functions accepts a MOD0 with an empty .eh_frame_hdr range. build_game.py
takes the plugin rows from layout.json into modules.c instead of asking the ExeFS hash table for them.

No-mod generated C is byte-identical to dev; with MSFix in the layout main, subsdk0 and sdk are too.

After the design in #845 by itaskaev2.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-17 08:05:18 +03:00
Valiantsin DzerakhandClaude Opus 5.5 19c9b648d1 Add the recompiler, Windows runtime, tools and docs
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-23 22:27:54 +03:00