Vegz78 / McAirpos

MakeCode Arcade games in RetroPie, Recalbox 7/8 and Batocera, running natively as ELF executables on Raspberry Pi OS/Linux ARM with 1-2 gamepads
https://Vegz78.github.io/McAirpos
MIT License
83 stars 11 forks source link

[Easyget Classic Arcade Game DIY] Arcade controls not responding on MakeCode #44

Open Lrigby22 opened 1 year ago

Lrigby22 commented 1 year ago

Hi, I have just put together a Retropie arcade machine using custom Arcade controls (https://www.amazon.com/gp/product/B00WDQWK5M) and running through a Raspberry Pi 3. I can successfully get NES and SNES games working properly, and after a while I managed to get MakeCode installed too - but whenever I open one of the elf. games the controls do not respond at all (not even to quit meaning a manual shutdown/restart each time). I'm very new at this - but where should I look to fix the controls? Any help would be appreciated as I'm an absolute beginner! Thanks

Vegz78 commented 1 year ago

Hi @Lrigby22,

Thanks for getting touch and trying MakeCode Arcade(MCA) games in RetroPie!

Hmmm, I do not think those Easyget Classic Arcade Game DIY controllers have been tested before with McAirpos, at least not as far as I know....

  1. Did you install McAirpos using the automatic installation script or manual installation steps here?: https://github.com/Vegz78/McAirpos#quick-automatic-installation-for-retropierpi-os

  2. What does your /tmp/McAirpos.log says when attempting to start a MCA game with McAirpos? Please provide a copy of this file.

  3. In general, the easiest way to get MCA games to work on a RPi with McAirpos, is to first connect the controller direction and button wires physically in accordance with any of the already working profiles included in McAirpos. This is because, since MCA games use lowest level controller signals - the raw Linux Input Subsystem -, it is less work to get your DIY controllers working here first, then easily reconfigure the controllers on a higher level inside RetroPie afterwards(RetroPie controller configurations have nothing to do with the controller configurations inside MCA games, but you can configure them the same).

Firstly, I would get acquainted with the evtest command line utility. Connect to the corresponding /dev/inputX device for your controllers in evtest and rewire so that left direction on stick gives something resembling left in evtest, same for other directions, then button A etc., etc. Then, when working in MCA games, reconfigure inside RetroPie accordingly.

Depending on your controllers, which may be EV_KEY(like a keyboard) instead of EVABS(analog sticks), it might be easier instead to use the nomap option with McAirpos' launCharc launcher, drop going via uinput-mapper and configure /sd/arcade.cfg_ directly according to you controller directions and buttons results in evtest.

Please see here for some more detailed help: https://github.com/Vegz78/McAirpos#default-and-modifying-the-layout-for-controls https://github.com/Vegz78/McAirpos#Usage

And search the issues section for solutions for similar DYI controllers, like the EG STARTS and Zero Delay Encoder etc.: https://github.com/Vegz78/McAirpos/issues?q=is%3Aissue+label%3AController+

Vegz78 commented 1 year ago

Did you get this to work, @Lrigby22?

Lrigby22 commented 1 year ago

Hi, sorry for not responding. I've just returned to work and haven't go around to trying yet! I'll be attempting it next week so I'll let you know how I get on. Thanks

edthedev commented 1 year ago

I use MCA via McAirpos with a very similar custom arcade hardware setup (also using Zero Delay USB Encoders) and didn't have any issues getting the controls to respond.

One thing to check is whether the encoder has a 'mode' inuput.

Once when I did this I had to temporarily connect an input to the 'mode' spot on the USB Encoder, and (while powered up) hit the button the right number of times to put the encoder into 'digital', rather than 'analog' mode.

Lrigby22 commented 1 year ago

Hi, sorry for the delay. I did the automatic installation and the Pi works perfectly with NES/SNES etc. I'm a complete newbie so I'm really not sure where to find Logs and encoder modes etc. Is there anyway you could give me a step by step on how to find these options? (Pictures and/or videos would be brilliant - but I appreciate time consuming!) I think I will need to rewire them manually which I will attempt next, however when I managed to do an evtest, the code is running so fast I couldn't read it! Thanks again

Vegz78 commented 1 year ago

Hi @Lrigby22,

Your ask is a little big, given that what you ask for, except videos, already exists in the main repository readme: https://github.com/Vegz78/McAirpos/blob/master/README.md

Please take the time to read.

There are also many issues which resolves different controller hardware, and @edthedev just stepped in and gave you a major hint from his own experiences and contributions with the Zero Delay Encoder, and other similar DIY arcade controllers: https://github.com/Vegz78/McAirpos/issues?q=is%3Aissue+"zero+delay"

This could all probably be better organized and written, but no one has the time, resources or motivation for doing this work, and I fail to see the revenue potential. You could always contribute yourself with the improvements you suggest, with a wiki here, own blogpost, entry to the forum.makecode.com, or whatever.

However, many in the community and I would be happy to help on specific points if you are stuck.

As noted earlier, MCA games operate directly on the lowest RAW Linux Input Subsystem for controllers(/dev/input/eventX).

You therefore have two options to achieve a working configuration: -Either rewire your controller physically to correspond to its logical correct EV_KEY type keys/buttons by name from the start, or -Configure either EV_KEY or EV_ABS type buttons in /SD/arcade.cfg together with the nomap option or /home/pi/McAirpos/McAirpos/uinput-mapper/configs/arcade1.py if the autoconfiguration in automatic mappings do not work.

The first option is by far the easiest path forward, but might require a controller mode change from EV_ABS to EV_KEY for the easiest operation, as @edthedev notes. Though, often, the DIY controllers are already configured as EV_KEY, like a keyboard.

evtest displays your current wiring setup, meaning the buttons configured for your controller as the first display before entering button presses. Then you can note down the configuration for each button press and do the physical rewiring. If too fast, break out for each button press, scroll up in the terminal and take notes and start over for each buttons.

Sometimes, a controller will continually output signals, even if not pressed(often EV_ABS controllers). You can then pipe evtest to a file, evtest > bottons.txt, break quickly after the button press, and search the file.

The log file, I have already provided you the path for earlier.

I know this is hard and frustrating when you have not done this before, but the main effort will be on your side, nevertheless.

Please read and tinker and try for a couple of days, and don't give up. Then come back here again if you are still stuck on a specific new thing. We will all also be glad if you get it to work and report back about that and how to do it, for others to read in the future.

Good luck!

Vegz78 commented 1 year ago

Any progress with this, @Lrigby22?