Mapping Keyboard to Gamepad?

RexMendicorvm
Posts: 19
Joined: Mon Oct 10, 2022 11:54 pm
Has thanked: 1 time
Been thanked: 1 time

Mapping Keyboard to Gamepad?

Unread post 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!

CeeDeeVee
Posts: 49
Joined: Fri Nov 13, 2020 8:59 am
Location: Silicon Valley, California
Has thanked: 67 times
Been thanked: 17 times

Re: Mapping Keyboard to Gamepad?

Unread post 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.

Yorkshire fella, living in California, where no one understands a word I say unless it's a quote from Game of Thrones.
I do music, code and burn myself with soldering irons. Part dog, part wolf, all coffee addict.
User avatar
Retro-Nerd
Posts: 279
Joined: Fri Jul 08, 2022 2:47 am
Has thanked: 11 times
Been thanked: 80 times

Re: Mapping Keyboard to Gamepad?

Unread post by Retro-Nerd »

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

CeeDeeVee
Posts: 49
Joined: Fri Nov 13, 2020 8:59 am
Location: Silicon Valley, California
Has thanked: 67 times
Been thanked: 17 times

Re: Mapping Keyboard to Gamepad?

Unread post by CeeDeeVee »

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

Yorkshire fella, living in California, where no one understands a word I say unless it's a quote from Game of Thrones.
I do music, code and burn myself with soldering irons. Part dog, part wolf, all coffee addict.
User avatar
aberu
Core Developer
Posts: 1192
Joined: Tue Jun 09, 2020 8:34 pm
Location: Longmont, CO
Has thanked: 247 times
Been thanked: 411 times
Contact:

Re: Mapping Keyboard to Gamepad?

Unread post by aberu »

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

birdybro~
User avatar
LamerDeluxe
Top Contributor
Posts: 1239
Joined: Sun May 24, 2020 10:25 pm
Has thanked: 887 times
Been thanked: 284 times

Re: Mapping Keyboard to Gamepad?

Unread post 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.

akeley
Top Contributor
Posts: 1441
Joined: Mon May 25, 2020 7:54 pm
Has thanked: 496 times
Been thanked: 467 times

Re: Mapping Keyboard to Gamepad?

Unread post 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.

CRT SCR$ Project - building a collection of high-quality photos of CRT displays
CRT ART Books - retro-gaming books with authentic CRT photos

rhester72
Top Contributor
Posts: 1321
Joined: Thu Jun 11, 2020 2:31 am
Has thanked: 15 times
Been thanked: 213 times

Re: Mapping Keyboard to Gamepad?

Unread post 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).

User avatar
LamerDeluxe
Top Contributor
Posts: 1239
Joined: Sun May 24, 2020 10:25 pm
Has thanked: 887 times
Been thanked: 284 times

Re: Mapping Keyboard to Gamepad?

Unread post 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.

akeley
Top Contributor
Posts: 1441
Joined: Mon May 25, 2020 7:54 pm
Has thanked: 496 times
Been thanked: 467 times

Re: Mapping Keyboard to Gamepad?

Unread post 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.

CRT SCR$ Project - building a collection of high-quality photos of CRT displays
CRT ART Books - retro-gaming books with authentic CRT photos

User avatar
Newsdee
Top Contributor
Posts: 873
Joined: Mon May 25, 2020 1:07 am
Has thanked: 104 times
Been thanked: 239 times

Re: Mapping Keyboard to Gamepad?

Unread post 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?)

User avatar
LamerDeluxe
Top Contributor
Posts: 1239
Joined: Sun May 24, 2020 10:25 pm
Has thanked: 887 times
Been thanked: 284 times

Re: Mapping Keyboard to Gamepad?

Unread post 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.

akeley
Top Contributor
Posts: 1441
Joined: Mon May 25, 2020 7:54 pm
Has thanked: 496 times
Been thanked: 467 times

Re: Mapping Keyboard to Gamepad?

Unread post 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).

CRT SCR$ Project - building a collection of high-quality photos of CRT displays
CRT ART Books - retro-gaming books with authentic CRT photos

User avatar
Newsdee
Top Contributor
Posts: 873
Joined: Mon May 25, 2020 1:07 am
Has thanked: 104 times
Been thanked: 239 times

Re: Mapping Keyboard to Gamepad?

Unread post 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.

Post Reply