https://github.com/tsoding/grub-gamepad
Ongoing effort to bring gamepad/joystick support to GRUB 2 (because reasons)
https://github.com/tsoding/grub-gamepad
gamepad gaming grub hacktoberfest hacktoberfest2020 joystick linux twitch
Last synced: 5 months ago
JSON representation
Ongoing effort to bring gamepad/joystick support to GRUB 2 (because reasons)
- Host: GitHub
- URL: https://github.com/tsoding/grub-gamepad
- Owner: tsoding
- Created: 2019-06-19T12:55:54.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2019-09-10T19:15:16.000Z (over 6 years ago)
- Last Synced: 2025-04-29T12:25:53.108Z (8 months ago)
- Topics: gamepad, gaming, grub, hacktoberfest, hacktoberfest2020, joystick, linux, twitch
- Language: Nix
- Homepage:
- Size: 39.1 KB
- Stars: 17
- Watchers: 3
- Forks: 1
- Open Issues: 10
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
[](https://www.twitch.tv/tsoding)
# Gamepad support for GRUB
- Development is done on https://twitch.tv/tsoding
- Archive of the streams: https://www.twitch.tv/collections/qhijEFrmqRUFvA
## Supported Gamepads
- Logitech Rumble Gamepad F510 in DirectInput mode
## Quick Start
```console
$ git clone --recursive git@github.com:tsoding/grub-gamepad.git
$ nix-shell # On NixOS
$ cd grub/
$ ./bootstrap
$ ./configure
$ make -j5
$ cd ..
$ make -B
$ qemu-system-i386 -cdrom test.iso
```
## Connecting Gamepad via USB
### VirtualBox
- Create Virtual Machine with 256MB of RAM and no HDD
- Attach the `test.iso` as Live CD
- Connect a Gamepad as an OHCI device.
- Start the machine to load into GRUB
```console
grub> nativedisk pata
grub> nativedisk ohci
grub> insmod usb_gamepad
grub> terminal_input usb_gamepad
```
### QEMU
```console
$ lsusb
$ sudo qemu-system-i386 -usb -device usb-host,hostbus=,hostaddr= -cdrom test.iso # Alternatively, you can reference your device by its ids -device usb-host,vendorid=,productid=
grub> nativedisk pata
grub> nativedisk uhci
grub> insmod usb_gamepad
grub> terminal_input usb_gamepad
```
## Architecture
### Adding New Module
TBD
### Registering New Terminal Input
TBD
### Attaching to a USB device
TBD
## References
- https://steamcommunity.com/groups/steamuniverse/discussions/0/558751660797029626/
- https://github.com/rafaelffilho/RafaOS
- https://wiki.osdev.org/GRUB
- The Official GRUB repo: git://git.savannah.gnu.org/grub.git
- https://qemu.weilnetz.de/doc/qemu-doc.html#usb_005fdevices
- https://lists.gnu.org/archive/html/help-grub/2015-01/msg00011.html
- https://atariwiki.org/wiki/Wiki.jsp?page=How%2Bto%2Bwrite%2Ba%2BUSB%2BDriver
- https://github.com/krislig/rumblepad2py/blob/master/pad.py
## Support
You can support my work via
- Twitch channel: https://www.twitch.tv/subs/tsoding
- Patreon: https://www.patreon.com/tsoding