- Automatic joypad detection; UI for joypad reassignment and key mapping. This has subparts:
- Currently MZX ignores the SDL_JoyDeviceEvent, meaning the only joypads that work in MZX are those plugged in when MZX starts. This event should be properly implemented so joypads can be plugged and unplugged at runtime.
- Joypad config UI: a submenu of F2. Allows the user to reassign joypads to different joypad numbers, see which joypads are currently plugged in, and manually edit joypad key mappings.
- Currently MZX ignores the SDL_JoyDeviceEvent, meaning the only joypads that work in MZX are those plugged in when MZX starts. This event should be properly implemented so joypads can be plugged and unplugged at runtime.
- Improved config options. Currently, pad.config and game.cnf joypad mappings are indistinguishable, and a game.cnf mapping could easily make certain OS functions hard or impossible. pad.config may need the ability to define key mappings such that they can not be overridden or disabled.
- Direct reading of the joypad input in Robotic. Since the J function counter namespace is currently nonexistent, this is easy to add without significantly impacting performance:
/* New counters: joy!active (read-only) Return 1 if the joypad is available, otherwise 0. joy!.* (read-only) Action reading. The first parameter is the joypad number (1-16) and the second is an action name or an axis name. Returns [0,1] for an action, [-32768,32767] for an axis, or -1 if the control doesn't exist. joymap (write-only) When set to 0, disables the default MZX joypad key mapping behavior (FIXME should this even be implemented?). */
edit: updated to reflect actual counters implemented in this pull request.
This post has been edited by Lachesis: 08 July 2019 - 05:26 PM