PabloMK7 / citra

A Nintendo 3DS Emulator
GNU General Public License v2.0
2.94k stars 570 forks source link

IR User: Emulate Infrared Skylander Portal #160

Open deReeperJosh opened 1 week ago

deReeperJosh commented 1 week ago

This PR aims to allow users the ability to use an Emulated Skylander Infrared Portal within the emulator, which required some reshuffling of the IR User class, as well as an additional QT menu item to Load, Create and Clear Skylanders from the emulated portal.

4 of the games use InitializeIrNopShared, but the first game (Spyro's Adventure) uses InitializeIrNop, and I have not figured out where in the memory to store the bits of information required by the game, so it will not work until that has been resolved.

I implemented the USB variant of this in Dolphin, have a PR open to Cemu, and have made additions to the RPCS3 version of the same, but wanted to implement it here as well.

The Skylanders games use the AutoConnection and GetConnection methods to connect to the infrared portal, but I have put safeguards in to ensure that this shouldn't effect games that use other IR User methods for connection to the Circle Pad Pro.

I have a video of the tool in action here

I couldn't find the contributing guidelines, so let me know if my code needs re-formatting in anyway.

fight-fly commented 1 week ago

@PabloMK7 need review.

PabloMK7 commented 4 hours ago

Uh, I still need to look into the code, but I don't like the idea of having built-in features that are used solely by a small set of games. A better way to go would be to change the IR module so that it can interface with external programs that emulate Skylanders.

Feel free to say anything to change my mind.