remapping the keyboard joystick

If you have feature requests, this is the place to post them. Please note your idea may already be something we have already discussed and decided against, or something we are working on privately, and we cannot be held responsible for any similarities in such instance. Whilst we cannot respond to every suggestion, your idea will be read and responded to where possible. Thank you for your input!
Post Reply
Ed Minchau
Posts: 508
Joined: Sat Jul 11, 2020 3:30 pm

remapping the keyboard joystick

Post by Ed Minchau »

The joystick_get routine allows us to use the keyboard as joystick 0 by passing 0 in the accumulator. The current mapping of SNES button to keyboard key is

Code: Select all

SNES Button	Keyboard Key	Alt. Keyboard Key
A		X		Left Ctrl
B		Z		Left Alt
X		S	
Y		A	
L		D	
R		C	
START		Enter	
SELECT		Left Shift	
D-Pad		Cursor Keys
Is there any way to re-map this in software, or can it be changed in the ROM? Say, using XDAW for ABXY and / and right shift to L and R, or using WASD for the D Pad and Q and R for L and R, and MLJI for ABXY. Or any other mapping the user might want. Then we could treat any arbitrary mapping of the keyboard as JOY0, even allowing the end user to map it themselves.
grml
Posts: 60
Joined: Sat Aug 13, 2022 8:31 pm

Re: remapping the keyboard joystick

Post by grml »

As a side node: if you have positional keyboard inputs like this and you don't want to piss off large parts of your international audience: please do not hardcode 'Z' and 'X' as 'A' and 'B' buttons. A lot of people would need to break their own fingers just to play your game. Having this hardcoded in ROM and enforced for everything and everyone would be a huge error in design.

Edit: on a second thought, breaking fingers only happens with localized input, not with scancodes, which is hopefully how it's implemented. In that case t's just the UIs that will be wrong all the time :mrgreen:
Post Reply