An adapter to interface a NES Mini Controller (or a SNES Mini Controller too, both I2C devices) with a PC as a generic USB Gamepad; based on an attiny85.
The microcontroller uses the v-usb library to create a low-speed usb device (the gamepad) and implements some homemade code in order to process the I2C signals from the controller.
The source code (among with some extra explanations about how it works) is available on my github! https://github.com/theisolinearchip/nesmini_usb_adapter
Emulating a "regular" HID gamepad is cool but, it's possible to use V-USB to have a valid XInput device like the XBox Controllers?
Those controllers are full-speed USB devices, and the only types the V-USB library can handle are the low-speed ones so, maybe... not...?
Well, I tried a couple of things and manage to have a valid low-speed XInput device BUT with very limited support (only the "non-analogic" buttons). Also, I'm pretty sure this is a totally non-standard movement and it will eventually crash, fail or just stop working :_ D