XboxDev / nxdk

The cross-platform, open-source SDK to develop for original Xbox: *new* xdk
435 stars 66 forks source link

IGR (Ingame reset) functionality of hacked kernels or homebrew dashboards does not work #373

Open JayFoxRox opened 4 years ago

JayFoxRox commented 4 years ago

When pressing the IGR combination or hacked kernels or homebrew dashboards, while an nxdk app is running, nothing happens.

While this isn't a bug in nxdk (but a bug in the kernels or homebrew dashboards) we should still document this problem, and come up with potential (optional) solutions for users who would like to use such features in their homebrew. With this feature broken, the user could also false assume that their nxdk app had crashed.

We shouldn't just implement our own "hotkey" system, because:

Instead, we should aim for compatibility with existing IGR patchers in hacked kernels or homebrew dashboards.

Due to IGR being a hook in XDK / XBE code, we'll have to write fake XDK-like code that IGR patchers mistake for the real XDK code. A generic solution which works with all IGR patchers is therefore impossible. However, we can try to fool the most popular IGR patchers and add more support in the future.

Due to the wide variety of IGR options in some patchers, we should probably expose a virtual gamepad API, that controls a gamepad that is observed by the IGR patch. This would allow to handle a wide variety of IGR patchers and a number of different input methods (as we don't tie it to an API like xpad).

nkpatcher contains an open-source implementation of IGR functionality, so this is a good starting point. I'm not sure how other (illegal or closed-source) dashboards or bioses do it (probably similar, but it might require different emulation).

JayFoxRox commented 4 years ago

I have prototyped nkpatcher support myself, but haven't tested or debugged it yet: https://github.com/JayFoxRox/nxdk/pull/79.