mirror of
https://github.com/valentderah/totk-pc-recomp.git
synced 2026-11-19 12:25:56 +00:00
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>