Commit Graph

51 Commits

Author SHA1 Message Date
Raphael Assenat 5d06a6d6a3 Export the number of players from main 2021-03-04 15:46:59 +09:00
Raphael Assenat 74cf60d839 Add support for the N64 mouse
For now, just recognizes it's a mouse and treat it like a controller.
2019-02-04 17:08:52 -05:00
Raphael Assenat 4999f07c14 Add support for Gamecube keyboards 2018-11-06 10:38:39 -05:00
Raphael Assenat 03ebfde089 Force feedback: Don't ignore the loop count
The PID Effect Operation output report contains a 'loop count'
field that has an influence on how long the effect runs. Ignoring
it can lead to never stopping vibration for software that use
the loop count to let effects stop automatically instead of
issuing a stop command.
2018-04-10 15:13:25 -04:00
Raphael Assenat 708fb22072 2-player: Re-order joystick and management interfaces
Make sure the management (non-joystick) interface is the last. Works
around a presumed Windows bug (Joystick ID confusion where the
second controller stops working or gives an error in the Game controller
test dialog)
2017-11-22 09:39:14 -05:00
Raphael Assenat 0e0c381fbd Implement feature set query commands
The adapter can now be queried by the management tool to see
what configuration options and requests are available without
harcoding them for each release.
2017-11-22 09:37:42 -05:00
Raphael Assenat 5328827234 Version 3.5 product IDs 2017-11-21 23:03:46 -05:00
Raphael Assenat 66a1a45f22 Runtime endpoint sizes for HID 2017-11-20 00:13:57 -05:00
Raphael Assenat 9f665068ae Bump version to 3.5.0 2017-11-20 00:13:50 -05:00
Raphael Assenat be2894b68c Set .bcdUSB to the correct value
Should be 0x0110 for 1.1
2017-11-19 14:41:41 -05:00
Raphael Assenat c7e8dc7ad4 Save memory
Store the device string in 8 bit and in program memory. Also
reduce the size of a few variables.
2017-01-08 15:58:45 -05:00
Raphael Assenat b22985712f Add stack overgrow detection
If the stack ever grows too large (and starts overwriting variables
in .bss) the firmware jumps into the bootloader. This is better than
just continuing to run with strange side effects.
2017-01-08 15:14:55 -05:00
Raphael Assenat 64115ad9ef remove dead code 2016-11-28 14:06:52 -05:00
Raphael Assenat e944017c36 Bump version to 3.4, change product IDs 2016-11-28 11:45:52 -05:00
Raphael Assenat c2fd3a10ba Need one current_pad_type var. per channel 2016-11-27 11:15:13 -05:00
Raphael Assenat bbefc8203c Prevent freeze if host only polls one endpoint
Each joystick has its own interrupt endpoint, and the main loop
used to wait until each became ready (i.e. Serviced) in turn.

On some systems, when only one joystick is in use, only one endpoint
is polled. The inactive endpoint therefore never became ready and
the mainloop would freeze.

Rewrote part of the loop to prevent this. New flow:

1) Wait until it is time to poll the controllers
(based on current poll frequency setting)

2) Wait until either endpoints is ready.

3) Write data to first endpoint if ready, otherwise skip.

4) Write data to second endpoint if ready, otherwise skip.
2016-11-02 21:46:52 -04:00
Raphael Assenat d7bdf59860 Need to initialize stuff *after* knowing the number of players. 2016-10-23 16:15:01 -04:00
Raphael Assenat bb9e6dce17 Initialize context for hid set/get report 2016-10-17 22:21:58 -04:00
Raphael Assenat 81662cef2a Update copyright year 2016-10-10 15:01:22 -04:00
Raphael Assenat 96bd132b66 Give equal priority to both controllers! 2016-10-10 14:53:40 -04:00
Raphael Assenat f6e4281321 Dual controller now available as a configured flavor 2016-10-10 14:48:42 -04:00
Raphael Assenat 4ecc3f571e Multi-player support complete
Works, but very light testing so far
2016-10-10 14:20:14 -04:00
Raphael Assenat fb43524d34 Update gcn64txrx code for multiple channels 2016-10-09 16:17:56 -04:00
Raphael Assenat 1fcfe8b594 Implement personalities
./wait_then_flash.sh atmega32u2 $HEXFILE
2016-08-22 23:18:47 -04:00
Raphael Assenat 158fc4fdca Device descriptor in RAM 2016-08-22 22:00:54 -04:00
Raphael Assenat 553598ab64 usb usbpad_init 2016-08-22 21:57:21 -04:00
Raphael Assenat b9a6f23607 reduce HID max packet size to 32 2016-05-28 00:17:43 -04:00
Raphael Assenat 3ec1c0b711 Version 3.2 strings and PID 2016-05-22 17:33:26 -04:00
Raphael Assenat ea5d5cf35d Updated MCU port default values (clock) 2016-01-22 00:05:36 -05:00
Raphael Assenat 019301b7b2 Fix null pointer dereference 2015-12-08 21:54:08 -05:00
Raphael Assenat 23f10866e9 GPLv3, Copyright updates, whitespace clean up 2015-12-06 21:55:06 -05:00
Raphael Assenat 4a6ccfb448 Gamecube hotplugging infrastructure 2015-12-06 16:36:33 -05:00
Raphael Assenat e033576104 error count should be init. to zero 2015-11-02 21:52:32 -05:00
Raphael Assenat a56c4eef4e Add error counting (for controller swapping) 2015-10-31 15:58:53 -04:00
Raphael Assenat 5ff36596bb Implement get_controller_type 2015-10-31 01:39:24 -04:00
Raphael Assenat b7b07a37ee Do away with the gcn64 work buffer (saves more memory!) 2015-10-28 23:30:26 -04:00
Raphael Assenat cb9be3f604 Honor the poll rate setting even without a controller present 2015-10-27 22:10:30 -04:00
Raphael Assenat 6fafb86d46 Use a timer for controller polling interval 2015-10-17 18:34:11 -04:00
Raphael Assenat 5502bfd418 Implement main in state machine form
- Check if interrupt send would block
2015-10-17 17:44:14 -04:00
Raphael Assenat 54196a0d76 Move more logic from main to usbpad, implement serial from eeprom 2015-10-17 17:21:22 -04:00
Raphael Assenat 0627841025 Channels for raw SI commands
Configurable poll interval
2015-09-09 21:41:41 -04:00
Raphael Assenat 3b935d12fc Implement hid data interface for config and special functions 2015-08-23 02:51:10 -04:00
Raphael Assenat 73ff27da26 misc 2015-08-22 00:46:19 -04:00
Raphael Assenat 290588dbd5 Use gcn64_detectController to detect N64 vs Gamecube controllers 2015-08-21 23:31:50 -04:00
Raphael Assenat 829ba2b560 remove unused code 2015-08-21 23:23:51 -04:00
Raphael Assenat f29ced5298 N64/Gamecube controller detection 2015-08-21 00:17:07 -04:00
Raphael Assenat a07c8cbd70 Use new gampad data and usbpad 2015-08-20 23:39:54 -04:00
Raphael Assenat bc55a51cf7 Cleanup report descriptor a bit.
- No longer an extra button 0 in linux
2015-08-18 23:24:23 -04:00
Raphael Assenat a84b70c369 Start bootloader by USB message 2015-08-16 01:59:38 -04:00
Raphael Assenat 27840d9bcf printf_P to save memory 2015-06-14 00:48:22 -04:00