Posted: Sun Sep 04, 2022 4:39 pm Post subject: Emulator AoB Injection Before Initial Functional Call?
Hey,
Quick question - I have a bunch of scripts using AoB injection for the Xenia/Xemu emulator and the AoB will not appear in memory unless the function is called at least once.
I.E: I won't be able to enable a HP modifier script until an entity in-game takes damage first.
At the moment, I'm able to use Lua to periodically search for the AoB signatures and auto activate the scripts as they are found but I was wondering if there's a better way or this is just a limitation of how emulators work?
That's a consequence of JIT compilation. In theory, there might be a setting in the emulator that involves compiling ahead of time, but I've never seen one.
Flash, back when it was still relevant, also worked this way. The most popular alternative was to target the AVM2 bytecode it was compiling instead of the resulting machine code. It's more resilient to updates, and all you do is tell people to activate scripts at the main menu (i.e. before the bytecode gets compiled).
This might also be possible in your case. Target the emulated architecture. Easier said than done, however, especially if the emulator doesn't provide any good debugging facilities.
Most people faced with this problem choose to ignore it and say "you must do X in game before activating this script" or something to that effect. _________________
I don't know where I'm going, but I'll figure it out when I get there.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum