libretro / vice-libretro

Versatile Commodore 8-bit Emulator
GNU General Public License v2.0
40 stars 70 forks source link

Simple but IMHO ingenious trick for deciding which joystick port to use #65

Closed fmaida closed 5 years ago

fmaida commented 5 years ago

The old Commodore 64 had this annoying problem, where each game can choose to use either the joystick port no. 1 or the joystick port no. 2 in order to play; each time you switch playing from a game to another you might have to switch the joystick plug between those two ports as well.

300px-C64_ControlPorts

Well, do you know the C64 Mini? It's a non-authorized miniature replica of a Commodore 64. I just discovered how the C64 Mini handles this, and it is a really easy but ingenious trick: to tell the C64 Mini if it has to map the joystick to the port no. 1 or no. 2, all you have to do is to put a _j1 or a _j2 at end of the name of each virtual tape / virtual disk you want to use; as you can easily imagine, you can write _j1 if you want to map the joypad on port number 1, or write _j2 (if you want to map the joypad on port 2. If you don't write nothing, nothing changes... it's still up to the emulator to decide how to map the controllers.

Let's make an example: if you have a virtual tape of Arkanoid and you want to map the joypad on port no. 2, you simply have to rename the image to something like this:

arkanoid_j2.t64

If you have Alleykat on disk and you want to map the joystick on port no. 1, you can rename it to something like this:

alleykat_j1.d64

and that's it. Really simple IMHO.

If you think that this could be a quick and useful fix, please consider to add this feature to vice and to frodo cores.

Thank you for your time :-)

rsn8887 commented 5 years ago

There’s a key you can map to a button to swap ports. Just go to quickmenu->options in the Retroarch menu, and look for the “RETROK_KP_MULTIPLY” button map. That’s the one to press to swap ports.

This functionality was kind of hidden, so I just made a PR to label the keys better. It was merged today so tommorow’s nightly should have the change. Then, those keys have better labels that make their function clear.

sonninnos commented 5 years ago

I made a PR on this issue if you'd like to try it out: https://github.com/libretro/vice-libretro/pull/92