Page 1 of 1

Mapping Keyboard to Gamepad?

Posted: Thu Sep 07, 2023 10:14 pm
by RexMendicorvm

I’d like to be able to map keys onto my gamepad for the Minimig core, but this seems impossible from the menu (aside from the temporary remap while the core is loaded). Is there anyway to edit the .map file for the core directly in order to assign keys to button presses? Please pardon my ignorance; still figuring out some of the basics!


Re: Mapping Keyboard to Gamepad?

Posted: Mon Sep 11, 2023 10:26 pm
by CeeDeeVee

This would be useful and I'm not aware of a persistent feature like this (I only answer here as no one else has so far). I usually map my second button to [space bar] on the c64 games as that was a very well used key in most games and playing on mister, I often don't want a keyboard on my lap (plus it was always awkward and just made me jealous of all my console friends who has 2 button game pads). It would be good if there's a solution to have this mapped per core, so that we don't have to assign it each time.


Re: Mapping Keyboard to Gamepad?

Posted: Tue Sep 12, 2023 2:13 am
by Retro-Nerd

The button/key remap option is now permanently saved. Get the latest unstable Mister main.


Re: Mapping Keyboard to Gamepad?

Posted: Wed Sep 13, 2023 4:57 pm
by CeeDeeVee

That's great news, I'd missed that this had been implemented. Thank you


Re: Mapping Keyboard to Gamepad?

Posted: Wed Sep 13, 2023 7:37 pm
by aberu

https://github.com/MiSTer-unstable-nigh ... 911_20d799 - Download link for the latest unstable.


Re: Mapping Keyboard to Gamepad?

Posted: Thu Sep 14, 2023 8:39 am
by LamerDeluxe

This is a huge improvement! Very handy for Atari 8-bit cores, for instance. Also for Commodore 8-bit machines.

I never expected this to be implemented so suddenly. There have been multiple discussions about it before.


Re: Mapping Keyboard to Gamepad?

Posted: Thu Sep 14, 2023 10:10 am
by akeley

It's a step forward, but it's not really solving what my original Github request was about - saveable per-game configs. As it is, it can help with some more generic buttons, or if you are only playing one game for a longer period of time with a specific remap. But ideally, it'd be great to be able to configure and save keymaps for different games - it'd work wonders for playability of more complex games and be a huge QoL improvement across the board.

I wish somebody could clarify if it really isn't possible technically (current Sorgelig's comments are of a more ideological nature), because then I could stop thinking about it.


Re: Mapping Keyboard to Gamepad?

Posted: Thu Sep 14, 2023 11:06 am
by rhester72

@akeley I think it may help if you can suggest a model that follows another emulator out there...to be honest, outside of Retroarch (which has an entire infrastructure around per-game settings), I'm not aware of any general emulators that offer this (particularly for consoles).


Re: Mapping Keyboard to Gamepad?

Posted: Thu Sep 14, 2023 11:06 pm
by LamerDeluxe

The C64 (and Mini) / The VIC-20 have functionality to map keys to controller buttons per game. They can only map a preset collection of keys though. It is really handy though and used with a lot of games.


Re: Mapping Keyboard to Gamepad?

Posted: Fri Sep 15, 2023 8:12 am
by akeley

I'd have thought Retroarch, big and popular as it is, is enough of a model ;) In general, on PC you can also do it via Joy2Key or some other program like that, which is quite an universal solution.

In any case, I'm not a designer/dev - it's just a feature request from a user. I don't know how feasible it is. There are some intereting comments in that Github thread but ultimately I'm still unsure what the status quo is.


Re: Mapping Keyboard to Gamepad?

Posted: Sat Sep 16, 2023 3:46 am
by Newsdee
LamerDeluxe wrote: Thu Sep 14, 2023 11:06 pm

The C64 (and Mini) / The VIC-20 have functionality to map keys to controller buttons per game. They can only map a preset collection of keys though. It is really handy though and used with a lot of games.

That's because they have a fixed list of games with predefined settings. As a comparison, on MiSTer you could use MGL files to boot each core preloading a game.

Perhaps the solution here would be the ability to predefine joy2key mappings in an MGL file? But you would still need to create a bunch of files to launch your games.

Another solution is to use the core's OS to run a TSR to map the core's joystick to keys. It's only possible on PC and maybe Amiga (AFAIK) and you would have less buttons available for mapping (4 on PC max?)


Re: Mapping Keyboard to Gamepad?

Posted: Sat Sep 16, 2023 10:26 am
by LamerDeluxe
Newsdee wrote: Sat Sep 16, 2023 3:46 am
LamerDeluxe wrote: Thu Sep 14, 2023 11:06 pm

The C64 (and Mini) / The VIC-20 have functionality to map keys to controller buttons per game. They can only map a preset collection of keys though. It is really handy though and used with a lot of games.

That's because they have a fixed list of games with predefined settings. As a comparison, on MiSTer you could use MGL files to boot each core preloading a game.

Perhaps the solution here would be the ability to predefine joy2key mappings in an MGL file? But you would still need to create a bunch of files to launch your games.

Another solution is to use the core's OS to run a TSR to map the core's joystick to keys. It's only possible on PC and maybe Amiga (AFAIK) and you would have less buttons available for mapping (4 on PC max?)

You can set key to button mappings for the games you load from an SD card as well. From the top of my head, you can define a configuration per game, or for a whole folder. Something similar might work on MiSTer.


Re: Mapping Keyboard to Gamepad?

Posted: Tue Sep 19, 2023 8:51 am
by akeley
Newsdee wrote: Sat Sep 16, 2023 3:46 am

Perhaps the solution here would be the ability to predefine joy2key mappings in an MGL file? But you would still need to create a bunch of files to launch your games.

It's an interesting idea. Doing it once per game sure beats having to remap controls everytime you want to play.

Newsdee wrote: Sat Sep 16, 2023 3:46 am

Another solution is to use the core's OS to run a TSR to map the core's joystick to keys. It's only possible on PC and maybe Amiga (AFAIK) and you would have less buttons available for mapping (4 on PC max?)

If that means direction keys already mapped, then 4 is not ideal but way better than nothing. It could work well for a lot of games, barring some key-heavy ones such as flight sims (even with these it'd shorten the time it takes to remap everything though).


Re: Mapping Keyboard to Gamepad?

Posted: Tue Sep 19, 2023 11:48 pm
by Newsdee
akeley wrote: Tue Sep 19, 2023 8:51 am

If that means direction keys already mapped, then 4 is not ideal but way better than nothing. It could work well for a lot of games, barring some key-heavy ones such as flight sims (even with these it'd shorten the time it takes to remap everything though).

Just to clarify, this approach does not use the MiSTer feature at all, but instead maps to the core's internal joystick.

It looks like ao486 support the Gravis Gamepad Pro, which has 10 buttons plus a dpad. But say on Amiga you would only have 3 buttons max (and dpad). If there is a joy2key program for DOS for the Gravis then this would work. A game launcher menu in a single HDD image could set it up per game.