Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Joystick to keyboard mapping and secondary BBC joystick support #95

Open
wants to merge 38 commits into
base: master
Choose a base branch
from

Conversation

monkeyman79
Copy link
Contributor

  • Assigning host joystick axes and buttons to BBC keyboard (up to 4 joysticks or gamepads separately).
  • New human readable file format for joystick to keyboard mapping (see Documents/JoystickMap.txt)
  • Changed joystick API from WinMM to DirectInput
  • Display joystick names in menu
  • Option to automatically load image-specific joystick mapping file (same as disk name, but with .jmap extension)
  • Added "unassign" to keyboard and joystick mapping dialog
  • Highlight assigned keys in joystick mapping dialog
  • Added second BBC joystick support
  • Select PC joystick and axes for each BBC joystick
  • Save joystick order in preferences file
  • Added "Change Joystick Order" dialog
  • Added Joystick Sensitivity parameter
  • Change Digital Mousestick handling
  • Map additional joystick buttons to analogue port PB0 and PB1
  • Removed "Basic Hardware Only" option
  • Unmute when keyboard mapping dialog is closed
  • Separate fire buttons on BBC joystick

Another redo of PR #87. Rebased branch because previous one became messy.

monkeyman79 and others added 30 commits May 12, 2021 20:32
- Assigning host joystick axes and buttons to BBC keyboard
  (up to 2 joysticks or gamepads separately).
- New human readable file format for joystick mapping
  (see Documents/JoystickMap.txt)
- Option to automatically load image-specific joystick mapping file
  (same as disk name, but .jmap extension)
- Fixed displaying keys assigned to Shift in User Mapping dialog
- Added "Unassign" to keyboard and joystick mapping dialog
- Joystick mapping table is separate from key mapping table
- Mapping joysticks is done separately from keyboard
  (but using the same dialog code)
- Highlight assigned keys in joystick mapping dialog
Map first two PC joystick or gamepad fire buttons to two BBC joystick
buttons separately.

Fixes stardot#74
Also replace -> with right-arrow symbol
Moved SetDlgItemChecked() and IsDlgItemChecked() to new files,
Dialog.cpp and Dialog.h
- Moved joystick state to JoystickState struct
- Removed ResetJoystick
- Fixed some signedness warnings
- Unmute when keyboard mapping dialog is closed
- Simplfied code a bit
- Added CaptureJoystick() function to remove duplication
- Renamed MaybeEnableInitJoystick() function for consistency
Long names are OK, and this makes it easier to search
the code for related variables
- Maps from ... to BBCKey are now const
- Functions GetBBCKeyBy... return pointer instead of reference
- Display checkmark next to 'Initialise Joystick' menu item if first joystick initialised OK.
- Display warning message only if explicit initialisation failed.
- Added second BBC joystick support
- Select PC joystick and axes for each BBC joystick
This option disabled the ADC and Serial interface,
presumably to make the emulator run faster.

I've removed this option as it doesn't affect
performance particularly, and simplifies joystick
handling.
This fixes an issue where the joystick position would
never be centred. With this change, the joystick
is centred when the mouse is in the centre of the
BeebEm window.
- Moved joystick handling to separate class and files
- Up to 4 joysticks mapped to keyboard
This is somewhat experimental and may be changed or removed in the future
- Autodetect secondary thumbstick axes
- Display joystick names in menu
- More user friendly axis names
- Map right thumbstick axes Z/RZ to RX/RY in joystick to keyboard mapping if those axes are not present to make mapping files more portable
- Changed axes order, old mapping files may need to be updated
and removed unneeded backward compatiblity for jmap files
- Move joystick configuration to "Joysticks" menu
- Update menus.html and keyboard.html
- Add joystick sensitivity to menu
- Add joystick to keyboard threshold to menu
- Update menus.html
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants