Add generic hook module (x86dis + auto-sizing detour), framecrash updates, marker assets

Hook lib: port HDE32 length disassembler to Zig (x86dis.zig), add GenericHook
with automatic prologue sizing and relative instruction relocation, add
Detour(FnType) comptime-generic type-safe hook wrapper. Update build.zig
to expose x86dis, generic_hook, hook as separate modules.

Framecrash: expand vtable hook research and implementation.
Markers: updated raid marker M2 assets.
This commit is contained in:
MarcelineVQ
2026-02-28 17:46:03 -08:00
parent 2cca8f4b53
commit 608e1c43d5
11 changed files with 1713 additions and 53 deletions
+17
View File
@@ -15,4 +15,21 @@ pub fn build(b: *std.Build) void {
.optimize = optimize,
});
hook_mod.addOptions("config", options);
// x86 length disassembler — standalone, no dependencies
const x86dis_mod = b.addModule("x86dis", .{
.root_source_file = b.path("src/x86dis.zig"),
.target = target,
.optimize = optimize,
});
// Generic hook — uses x86dis + hook for auto-sizing trampolines
const generic_hook_mod = b.addModule("generic_hook", .{
.root_source_file = b.path("src/generic_hook.zig"),
.target = target,
.optimize = optimize,
});
generic_hook_mod.addImport("x86dis", x86dis_mod);
generic_hook_mod.addImport("hook.zig", hook_mod);
generic_hook_mod.addOptions("config", options);
}