This allows for both steps to be completely disconnected, easily
allowing patches to be turned on or off based on a set of flags, as well
as preventing the need to clear the HLE cache when switching from
HLE->LLE.
This also allows patches to be seen/modifed from a central location,
no more searching through the codebase to determine if a function should
be patched or not, and no more 'FUNC_EXPORTS/GetProcAddress' magic!
Currently, this is used for HLE only, but could really shine when
extended to introduce optional detour based logging even when LLE is
enabled.
For example We could easily add a LLE_D3D_DETOUR flag, which when
enabled, patches functions with a wrapper, which simply logs input and
output, calling the original xbox function via a trampoline.
This would be great for debugging, as we'd get a full call trace from
the API level, even when not implementing HLE.
There's also the possibility of mixing in some patches even with LLE
enabled: for a hybrid HLE/LLE solution of the same functionality,
but there are no plans to implement that at this moment of time.
Following titles are functional: (demos didn't work right before)
* Xbox Demos [XK-001 v1.01]
* Whacked
* Xbox demos
* RalliSport Challenge
* Xbox demos
* Quantum Redshift
* Xbox demos
Confirmed does not regress:
* Xbox dashboard
* Xbox Live
rest of the kernel.
NOTE: This brings back the previous KeBugCheck issue: Turns out it
wasn't solved by the previous commit, instead, the thread triggering the
error was hanging, preventing the error from appearing. Need to find a
better solution.
Perhaps we need to write our own custom KeWait implementation for now,
rather than attempting to mirror Xbox functionality 1:1. Direct Code
execution severely reduces the viability of an accurate
implementation of this.
Currently disabled as it doesn't work yet/is incomplete.
Work will be resumed once LLE OCHI is stable and enabled.
For now, we'll just have to skip Segaboot and launch games directly.
Turok Evolution now finally able to save the game.
RootDirectory handle is very important role when a title pass down with non-null handle in the structure.
Ideally should not cause any regression.