wizzomafizzo / mrext

Collection of extensions and utilities for the MiSTer system.
GNU General Public License v3.0
163 stars 11 forks source link

Request: Virtual game controller keypad for Colecovision and similar systems #56

Open famiclone6502 opened 9 months ago

famiclone6502 commented 9 months ago

Game systems like Colecovision and Intellivision have unusual controllers with numeric keypads, but currently the remote script's keypad function only mimics the keyboard's keypad, which unfortunately can't be mapped as game controller buttons.

I would like to request a keypad function that would work for two controllers / two players, which could be mapped as game controller keys when remapping buttons for their respective systems. Ideally two people could be using their smart phones as keypads for these systems, where they probably need to choose their player/controller when remapping and using those buttons.

A good example of two player games might be Fortune Builder on Colecovision and Utopia on Intellivision. I do know there is a controller test for Colecovision that would provide good feedback for this option during development.

Also, a nice-to-have for a distant future enhancement could be to allow importing an image overlay for these number pads, which many games used for these systems back in the day. But, just having the ability to use a basic virtual game controller number pad would be very useful today on their appropriate systems.

Thank you!

retrob0t commented 9 months ago

Related to this, it would be great to have an interface for the console switches in the 2600/7800 core (Select, Reset, P1/P2 Difficulty, B&W).

Unlike with other consoles, these console switches are required to play games. The issue is that those of us using original 1-button joysticks with the core have no way to activate these without having a secondary controller or keyboard at hand. (These switches do have keyboard shortcut equivalents in the core, maybe that would be the easiest way to implement?)

The 2600 does have a numeric keypad as well, but it is used infrequently in games (whereas the console switches are a necessity).

wizzomafizzo commented 9 months ago

I'll have to have a think about these, I think the ideas are great and would love to add support but it's a complex problem

So it's not possible to map keyboard keys to these extra controller buttons, but it is possible to map a second controller to the same mapping? That will be key, being able to map 2 or more physical controllers to a single core controller mapping

The multiplayer thing again love the idea but currently remote doesn't distinguish between different user sessions for anything meaningful. Will take some time to design something nice

Image overlays would actually be quite easy

For the Atari toggle switches I'm not sure. Is it possible to toggle these with a controller? If they can only be changed from the OSD that makes it tricky. Perhaps I could add a way to trigger a custom macro (open OSD, move to option, toggle, close OSD) not very pretty but should work

retrob0t commented 9 months ago

For the Atari toggle switches I'm not sure. Is it possible to toggle these with a controller? If they can only be changed from the OSD that makes it tricky. Perhaps I could add a way to trigger a custom macro (open OSD, move to option, toggle, close OSD) not very pretty but should work

Actually the commands can be sent from either the keyboard or a controller!

famiclone6502 commented 9 months ago

I'm sure there are other systems that have weird layouts that this would be useful for, too. Even a custom overlay for keyboard layouts for the various computer systems would be very useful, since they aren't physically the same as the plugged-in keyboard. So maybe these custom layouts could be a combination of mapped controller assignments and keyboard keys, the definitions of each virtual button (dimension, text, layout) could be stored in a JSON file and an image could be loaded when it exists with the same filename. The JSON file could also determine which player's controller this is mapped to. So multiple phones can pull up this interface, click the button for a custom controller/keyboard, load Player 1 Coleco or Player 2 Coleco files respectively... or they load up the toggle switches for the Atari, or even a virtual ZX Spectrum keyboard. When the user goes to remap buttons for the core, they press the corresponding virtual button on their phones and start playing.

retrob0t commented 9 months ago

When the user goes to remap buttons for the core, they press the corresponding virtual button on their phones and start playing.

Many cores already have predefined keyboard shortcuts (e.g. the aforementioned Atari core), so button mapping may not even be required in many cases.