Joymappings: Difference between revisions

From vice-emu
Jump to navigation Jump to search
(Created page with "For a long time the SDL port has had a joystick mappings file. There are 2 sample ones: data/C64/sdl_joymap_thec64.vjm and data/C64/sdl_joymap_ps3.vjm. These files contain associations between host joystick actions and emulator actions. Possible actions include a corresponding emulated joystick action, a shortcut to an emulator menu action etc.")
 
No edit summary
Line 2: Line 2:


These files contain associations between host joystick actions and emulator actions. Possible actions include a corresponding emulated joystick action, a shortcut to an emulator menu action etc.
These files contain associations between host joystick actions and emulator actions. Possible actions include a corresponding emulated joystick action, a shortcut to an emulator menu action etc.
The branch branches/fabrizio/3.7-joystick-mapping-2 moves the joystick mappings file to the generic joystick code, therefore making it available to the Gtk3 port as well.
The file name has the form {sdl,gtk3,headless}-joymap-{C64,C64SC,...}.vjm. Its format is documented in a comment in the sample file itself.
In order to port the feature to the generic code, some aspects got lost, and must be ported over. Known things are:
* editing mappings with SDL menu
* performing event UI_ACTIVATE (enter SDL menu)
* performing event UI_FUNCTION (shortcuts to menu actions)
There was an event POT_AXIS, which was intended to emulate potentiometer values with a host joystick's axis position, but it is not clear whether that actually worked.

Revision as of 23:36, 1 February 2023

For a long time the SDL port has had a joystick mappings file. There are 2 sample ones: data/C64/sdl_joymap_thec64.vjm and data/C64/sdl_joymap_ps3.vjm.

These files contain associations between host joystick actions and emulator actions. Possible actions include a corresponding emulated joystick action, a shortcut to an emulator menu action etc.

The branch branches/fabrizio/3.7-joystick-mapping-2 moves the joystick mappings file to the generic joystick code, therefore making it available to the Gtk3 port as well.

The file name has the form {sdl,gtk3,headless}-joymap-{C64,C64SC,...}.vjm. Its format is documented in a comment in the sample file itself.

In order to port the feature to the generic code, some aspects got lost, and must be ported over. Known things are:

  • editing mappings with SDL menu
  • performing event UI_ACTIVATE (enter SDL menu)
  • performing event UI_FUNCTION (shortcuts to menu actions)

There was an event POT_AXIS, which was intended to emulate potentiometer values with a host joystick's axis position, but it is not clear whether that actually worked.