Our current method of implementing Fibers is very poor.
Rather than switch to a specific requested fiber, when a title calls SwitchToFiber, we currently run ALL registered fibers, then reset the fiber counter to 0.
The 'right' way would be to remove our Fiber patches and let the Kernel handle it, but this is not possible until we implement our own thread context switching rather than relying on Windows, until then, we require patches.
These patches need to be modified to perform closer to the Xbox implementation.
I'm working on this as part of my attempts to fix Futurama
This might fix issue #212
It still needs testing with other titles, but Fibers in Futurama are now being created and executed without and XAPI patches to Fiber functions (in my latest Futurama branch)
Cool! I'm curious to how you're been able to detect they work like they're supposed to?
I set code breakpoints around the unpatched switchtofiber function
I've been thinking about something that could ease our debugging adventures, if we could enable a logging detour for all detected but unpatched functions. I've seen genetic kernel API code by jayfoxrox for this somewhere.
EDIT : Found it again; https://github.com/JayFoxRox/Chihiro-Launcher/blob/master/hook.h#L1341
Fibers have been confirmed working unpatched, this issue can be closed.
Great stuff!