New counters should be added to MegaZeux to allow games to directly read joypad axes/buttons instead of relying on key mappings. Mainly, this would allow games to take advantage of analog joysticks to a greater degree than is possible with the current key mapping system.
/* joy!active (read-only) Return 1 if the joypad is available, otherwise 0, or -1 if the joystick requested is invalid. 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 requested is invalid. */
Because direct joypad reading could conflict with the built-in joypad key mapping, there should be a way to disable mappings altogether:
/* joy_simulate_keys (write-only) When set to 0, disables the default MZX joypad key mapping behavior except for the joystick menu. */
edit: updated to reflect actual counters implemented in this pull request.
This post has been edited by Lachesis: 13 July 2019 - 07:58 PM