Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Resolves #1
Resolves #3
Introduces inline hooks to the exlaunch environment.
Modified:
exl::util::Hook
s_InlineHookJit
,s_UsedInlineHooks
)void InlineHook(uinptr_t hook, uintptr_t callback, bool is_extended)
hook
- The address where the hook should be injectedcallback
- The address of the callback function (must take eitherExInlineCtx*
orInlineCtx*
)is_extended
- Needs to betrue
if the callback takesExInlineCtx*
void InlineHook(uintptr_t hook, ExInlineCallback callback)
, a wrapper for the less user-friendlyInlineHook
void InlineHook(uintptr_t hook, InlineCallback callback)
, a wrapper for the less user-friendlyInlineHook
InlineCtx
structure to reflect thex29
andx30
registers which are also stored thereExInlineCtx
structure which includes a field for the stack pointer as well as an array of 32FpuRegister
, and all elements inInlineCtx
FpuRegister
union which holds representations of A64's SIMD registersHook::Initialize
to also initialize the new inline hook environment membersInlineHookHandlerSize
from 0x9C -> 0xC to reflect the actual size of the handlerInlineHandler
imports and replaced them by three newextern "C"
importsexl::hook
main
offsets__virtmem_rng
__virtmem_rng
can succeedExample output of dumping the extended context from a callback. This callback was run at the beginning of Smash Ultimate's
CameraManager::update
function and the game continued normal execution afterwards