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

Home Page:https://Vegz78.github.io/McAirpos

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[RetroPie] Default Keyboard(Unable to reproduce the issues through tests)

dgray117 opened this issue · comments

I'm wondering if the Makecode games should generally work with a standard USB keyboard out of the box? My .elf files are loading, game is running but I can't get any input at all from the keyboard. I'm using retropie on a raspberry pi 3b.

I can get a PS3 controller in a few days, I know these are confirmed to work, but I'm thinking I may have other issues if keyboard is not working? The keyboard is working normally with SNES ROMs etc..

Any advice would be appreciated. I'm very new to raspberry pi/Linux.

Hi @dgray117,

Thank you for trying McAirpos!

There are a couple of different options for configuring keyboards when running MakeCode Arcade games with McAirpos:

  1. The default option, which uses the uinput-mapper to automatically try to configure connected controllers and keyboard(not always working). If 0 controllers are connected and 1 keyboard, player 1(a,s,d,w,CTRL,SHIFT) and 2(UP,RIGHT,LEFT,DOWN,ALT,SPACE) are configured on different locations on the keybaord, if 1 controller and 1 keyboard are connected, player 1 is on the controller and player 2 on the keyboard(a,s,d,w,CTRL,SHIFT) and if 2 controllers and 0 or more keyboards are connected, both players are on separate controllers.
  2. Sometimes the keyboard is not found(first device recognized as a keyboard is not a keyboard, for instance on one of my RPis at home I have a Lenovo USB dongle for a mouse, but which also has an unused keyboard channel/device), where you might try the launCharc keybswap option, which attempts the last recognized keyboard device instead.
  3. For using only keyboard, or EV_KEY type controllers(no analog sticks), you can go fully manual by running launCharc with the nomap option, and configuring the device path and button mappings manually in the file /sd/arcade.cfg.
  4. As a last resort, you could also try to configure key and button mappings manually for uinput-mapper in the /home/pi/McAirpos/McAirpos/uinput-mapper/configs/arcade*.py files), but this is quite complex.

In general, try to determine you keyboard(and controllers) device path and button mappings using evtest and compare to what is reported in /tmp/McAirpos.log and the /sd/arcade.cfg file. NB!: launCharc overwrites your device path setting inside /sd/arcade.cfg if you do not run it with the nomap option.

For more information, see:

  1. https://github.com/Vegz78/McAirpos#default-and-modifying-the-layout-for-controls, and
  2. https://github.com/Vegz78/McAirpos#Usage

Thank you @Vegz78

I will try to use the evtest like you said to figure out the mappings. I'm new to RPi so the instructions are a little confusing to me. I will figure it out though, I'm learning as I go 😅

Thankyou for making McAirpos!

Good luck and if you are stuck with no success after some hours, don't hesitate to return here again with the problem! ;-)

Maybe I am able to help, but since all systems(RPi OS and emulators) are evolving all the time, some times there is a bit of "code rot", where McAirpos is not quite up to date with the latest changes, unfortunately. The last bigger breaking change was how EmulationStation stored the menu profiles. I made this originally only for my son to show and play his MCA games on the big screen and with (PS3/XBox)controllers around in the house and when travelling with the RPi(mainly for remote game streaming). I am therefore not updated to the bleeding edge on my own systems and don't usually discover bugs without user feedback like this.

Please also report back if and how you succeeded, so everyone can benefit from the issues "knowledge base"(and I know when to close the issue).

Thanks @Vegz78 first thing I'm going to do is try the PS3 controller. I will get one in a couple of days so it will be a little while before I can update.

Hi @Vegz78 I could not get anything working even with the PS3 controller. However, I switched from RetroPie to Batocera and now my controllers work perfectly out of the box with McAirpos. So although I didn't solve the original issue this will be my solution.

There were a couple of games I downloaded from Makecode website that wouldn't load (falling fuck and jumpy platformer). However the games I have made are working perfectly fine.

I'm setting this up so kids at my school can have an arcade display of their makecode games in the library, so thank you for making this.

Thanks for your feedback, @dgray117!

I am glad that you found a kind-of-working workaround with Batocera that you can live with for your needs, but less satisfied that it didn´t work right out-of-the-box for you with controls in RetroPie or most games not working for you in Recalbox(I am using the word most, not all, since there are a few corner cases which are confirmed not work on the raspberry, like a still unresolved floating point exception bug for one of the most advanced 3D-games and some extensions which do not work or are not applicable for the RPi, as you can read about in an older closed issue here).

The newest Jumpy Platformer and Falling Duck and other MS featured MCA games are usually the ones I test with, and they worked for me the last time I tested on both the RP3 and 4 for all three retro gaming - RetroPie, Recalbox and Batocera(all of which are good in their own ways and for which I have no preference over the others, and which I would like for all to work equally well).

But the last time I tested with the newest MCA games on the newest retro gaming systems is now over 5 months ago, so it is probably time to test some fresh installations again.

You mentioned that you were running RPi 3B, and have tried RetroPie and Batocera with keyboard and PS3 controllers.

Do you remember which versions of RetroPie and Batocera, respectively, that you tried and whether you installed from images downloaded from their respective homepages or via the Raspberry Pi imager?

I tried RetroPie 4.8 installed directly from the raspberry pi imager.

Batocera is version 35, I downloaded the image from the homepage then installed using the raspberry pi imager.

Hi again @dgray117,

Just tested the following and could not reproduce your issues:
Freshly compiled(MCA v1.11.37) .elf files of the MCA games Jumpy Platformer, Falling Duck, Planet Putt Putt(JavaScript game) and The Wanderer(Game Jam) from the official https://arcade.microsoft.com front page, on:
-RetroPie v4.8 from the Raspberry Pi Imager downloaded today on a RPi 3B+,
-Batocera v35 downloaded today from https://batocera.org on a RPi 3B+, and
-Raspberry Pi OS buster v5.10.103-v7l on a RPi 4B.
All installed with the automatic installation scripts and working with both USB keyboard and PS3 controller without any issues or special configuration steps except having to configure both the keyboard and the PS3 button mappings in the RetroPie/EmulationStation menu to navigate to the MCA games from there.

-Unfortunately, since I am none the wiser and unable to help you anymore with your controller and keyboard issues for your first selected system, RetroPie, nor with the game issues you experience for Jumpy Platformer etc. on Batocera. At least maybe not unless you provide me with a /tmp/McAirpos.log file.
-Fortunately, since this seems to confirm after 5 months without testing that nothing should be broken yet for MCA games with McAirpos on the Raspberry Pi, at least not for RetroPie, Batocera and RPi OS(did not test Recalbox this time, please report back to me if anyone experiences issues).


Anyways, since you reported back that you seemed satisfied with your current solution on Batocera, maybe we should leave it at that. But please get in touch again if you experience other issues!

Happy retro game making and playing, and appreciate if you award this repository with a star if you are satisfied!

Br, Vegard

PS: I liked the game design course that was linked to through some steps on https://bradleycodeu.github.io. If you are somehow connected with this and have some class codes lying around unused, I know some aspiring (game/web)programmers at my son's newly started computer club that would love to try out the course: https://dataklubb.no
(I do of course not have any such expectation, but normally the worst answer you can get for asking is just no...)

;-)