Remapping keyboard / joysticks in emulators

Struggling with Fuse or trying to find an emulator with a specific feature. Ask your questions here.
Post Reply
akeley
Dynamite Dan
Posts: 1048
Joined: Sat Feb 01, 2020 5:47 pm

Remapping keyboard / joysticks in emulators

Post by akeley »

This thread is inspired by our HSC woes - as we all know, some (many?) ZX Spectrum games, especially the earlier ones, offer only rather convoluted keyboard bindings, which can be major PITA and obstacle to enjoying the game and playing it properly. Two notable examples from recent HSC rounds are Penetrator and Sea War.

Even with games which offer more sane keyboard layouts, or joysticks, it'd be nice if you could remap them to your own liking. There are two approaches: ZX keyboard-to-PC keyboard and ZX keyboard/joystick-to-PC gamepad. The latter one for those who own such device (highly recommended btw).

When I looked at this issue while playing Penetrator, I could not really see many options amongst existing emulators. Here's a short recap:

Spectatulator:
-ZX joystick-to-PC cursor keys
-keyboard-to-PC gamepad remap (via Comcom Programmable Joystick option).

Fuse
-there are some Joystick/Keyboard remap options but I couldn't figure them out.

Speccy / Z80 Stealth
-could not see any remap options

ZEsaurUX
-keyboard remapping possible: Settings - hardware -Keyboard Settings - Redefine Keys.
Unfortunately it's only possible to remap digits and letters, special keys do not seem to register, at least I could not find the way to do that.

Retroarch
-can fully remap keyboard to gamepad
*****************************************************

So, the best options are: Spectaculator & Retroarch for keyboard-PC gampead remapping and ZEsaurUX for keyboard-keyboard remap (but without special keys).

This was just a quick investigation, I would be most interested in hearing about things I missed and possible other ways to do this (I seem to recall that [mention]Freespirit[/mention] had some keystick solution for one of the emus?). It's also a "feature request", if any emulator authors out there are reading.
User avatar
Joefish
Rick Dangerous
Posts: 2059
Joined: Tue Nov 14, 2017 10:26 am

Re: Remapping keyboard / joysticks in emulators

Post by Joefish »

Don't know if 'Joy2Key' is still supported but I used that with a lot of PC games with stupid keyboard layouts. Works on top of emulators too. It lets you save named profiles you can switch between with a mouse click so you can set up your game controls that way.
User avatar
Ast A. Moore
Rick Dangerous
Posts: 2641
Joined: Mon Nov 13, 2017 3:16 pm

Re: Remapping keyboard / joysticks in emulators

Post by Ast A. Moore »

akeley wrote: Tue Aug 18, 2020 3:29 pm Fuse
-there are some Joystick/Keyboard remap options but I couldn't figure them out.
FUSE maps a variety of joysticks to the standard QAOPM (or Space) layout. A dubious option, but at least it gives you (well, not me, certainly) familiar controls over nothing, I suppose. It’s also useful for testing the Kempston Joystick interface during development.
Every man should plant a tree, build a house, and write a ZX Spectrum game.

Author of A Yankee in Iraq, a 50 fps shoot-’em-up—the first game to utilize the floating bus on the +2A/+3,
and zasm Z80 Assembler syntax highlighter.
User avatar
ketmar
Manic Miner
Posts: 713
Joined: Tue Jun 16, 2020 5:25 pm
Location: Ukraine

Re: Remapping keyboard / joysticks in emulators

Post by ketmar »

as you called emulator authors, i feel that i fit too (ZXEmuT has only one user, but hey, it is more than zero!). i don't own gamepad, so no support for it. but otherwise zx keyboard (this includes kempston joystick for some reason) is freely rebindable. i have several handy procs in my config to bind cusor/sinclair to numpad arrows, for example. (and pc keyboard keys can be binded to any Tcl command -- that's how default hotkeys are done).
User avatar
Alessandro
Dynamite Dan
Posts: 1910
Joined: Wed Nov 15, 2017 11:10 am
Location: Messina, Italy
Contact:

Re: Remapping keyboard / joysticks in emulators

Post by Alessandro »

RealSpectrum allows the user to remap the keys used for the emulation of Kempston joystick. However the Windows executable can be tricky to run under the most recent versions of Windows. I prefer to run the DOS version under DOSBox.
User avatar
Morkin
Bugaboo
Posts: 3277
Joined: Mon Nov 13, 2017 8:50 am
Location: Bristol, UK

Re: Remapping keyboard / joysticks in emulators

Post by Morkin »

akeley wrote: Tue Aug 18, 2020 3:29 pmTwo notable examples from recent HSC rounds are Penetrator and Sea War.
...So as a slight aside, I can understand remapping the Sea War keys, but did anyone have success in remapping Penetrator's keys?

The main issue with the game controls is that it uses the same control key for move right (key hold) and fire laser (key tap), rather than it being separate keys. So I don't understand how remapping this control key would help - it's changing which key it is, but doesn't it still have the inherent problem of its dual-function?

Or is there a way that one key it can somehow be separated into two controls? I wasn't sure how this would be possible unless you hacked into the game itself and mucked with the code.
My Speccy site: thirdharmoniser.com
User avatar
Pobulous
Dynamite Dan
Posts: 1366
Joined: Wed Nov 15, 2017 12:51 pm

Re: Remapping keyboard / joysticks in emulators

Post by Pobulous »

Joy2key would work, although latest versions are now shareware.

An Arduino Leonardo or Pro Micro or clone can be configured to translate joystick controls to PC keyboard presses.
A bunch of preset mappings for specific games could be setup, with button combinations to select a different one for each game.
Used with an arcade controller with multiple buttons that could cater for most games.

For Penetrator, using an Arduino, you could code the fire button to be rapid fire, and map that to a right press.
It might take a little bit of effort to adjust the rapid fire speed for best results.
akeley
Dynamite Dan
Posts: 1048
Joined: Sat Feb 01, 2020 5:47 pm

Re: Remapping keyboard / joysticks in emulators

Post by akeley »

I had been using Joy2Key back in the day, and later on some other paid solution (Pinnacle something?). They were okay, though I'm not sure if they don't add some sort of lag.

Penetrator would need some software hack to separate that one-button silliness. I do remember that I managed to conjure some sort of working remap to my gamepad, where P (forward+fire) were mapped to separate keys and it did work somewhat. I've never felt fully in control though.

But Penetrator really is an unusual game. Most just have some uncomfortable keybind layouts. This can be easily remapped if you have a PC joypad/joystick using methods I mentioned in the first post. For keyboard there is the ZesaurUX, as long as the keys are not the special ones. I left the author a message about it in that emu's thread, maybe it can be remedied in the future.
User avatar
hexaae
Dizzy
Posts: 71
Joined: Thu Feb 27, 2020 4:11 pm

Re: Remapping keyboard / joysticks in emulators

Post by hexaae »

ZX Spin emulator was able to remap any joystick button -> keyboard key. This allowed for example to remap both jump + fire + bomb keys to 3 different buttons on a real arcade joystick connected to your PC and not just the joy-fire button.
I still hope to see ZX Spin 2 one day because original emu is quite old...
User avatar
Lethargeek
Manic Miner
Posts: 743
Joined: Wed Dec 11, 2019 6:47 am

Re: Remapping keyboard / joysticks in emulators

Post by Lethargeek »

As for me, i don't have any gamepads or joysticks now to test, so no support for these. But it's possible to map any zx-key to pc-cursor + ctrl in the ini file, keeping 4 different mappings selectable at runtime. But it turned out not everyone likes playing with arrow keys (and not even wasd, one guy said he'd rather have anything mapped to 6-0 keys in the one row!). So i guess it's impossible to make everybody happy unless you allow to map zx-anything to pc-anything.
User avatar
hexaae
Dizzy
Posts: 71
Joined: Thu Feb 27, 2020 4:11 pm

Re: Remapping keyboard / joysticks in emulators

Post by hexaae »

I suggest the excellent Q/P of Hori Fighting Stick Mini paid less then 30€ from the biggest online re-seller, and is very good ;)
Post Reply