I finally found a working solution, please see:
https://github.com/Vegz78/McAirpos
Dowload the precompiled ELF game file above, or compile and download it yourself in your own browser here: https://arcade.makecode.com/#pub:75452-06863-77183-79875?hw=rpi&compile=rawELF
Or, for any other MakeCode Arcade game that you have made or found, open it up in the online editor and add ?hw=rpi&compile=rawELF
to the end of the URL in the editor, so it looks like this:
https://arcade.makecode.com/#editor?hw=rpi&compile=rawELF
Press enter, let the page reload and then press the orange downlad button on the bottom left of the screen to download your game ELF executable file.
Execute from the Linux text console with command ./arcade-jumpy-platformer.elf
, not inside an X Window environment. Make sure its's executable first(chmod +x
).
This is a minor bug which prevents the running of the MakeCode Arcade games on the Raspberry Pi as ELF executables from being as smooth as it could be, with for instance full integration of MakeCode Arcade games in RetroPie, only using a gamepad etc.
Microsoft is currently looking for takers on trying to diagnose this and we can only hope that the skilled, but ever busy, MakeCode team will get a chance to address this issue some time in the future: microsoft/pxt-arcade#2435
Any help on solving or speeding up the solution for this issue from the community is greatly appreciated!
I just found a temporary work-around by pressing a combination of CTRL+C
, CTRL-D
and CTRL-C
on the keyboard to log out from and reset the console, and thereby killing the game and returning control of the screen and keyboard to a new console without having to reboot.
Error descriptions:
From console (a little different with exec ./arcade-jumpy-platformer.elf
, but basically the same):
-Pressing BTN_EXIT
OR CTRL-C
freezes console keyboard and display in-game.
(Running game processes is orphaned during startup and hard to kill. You can ssh and kill parent bash process or using the CTRL+C
, CTRL-D
and CTRL-C
combination, or run it like this: ./gamefile.elf; killall -9 bash
)
From RetroPie:
-Pressing BTN_EXIT
returns control to RetroPie, but game with frozen keyboard and display in-game in background.
-Pressing BTN_RESET
OR CTRL-C
returns control to RetroPie, with game still running in the background.
Make a folder and and file /sd/arcade.cfg with the following contents(for keyboard):
SCAN_CODES=/dev/input/event0
BTN_LEFT=105
BTN_RIGHT=106
BTN_UP=103
BTN_DOWN=108
BTN_A=30
BTN_B=44
BTN_RESET=16
BTN_EXIT=17
BTN_MENU=18
Double check by running evtest
which /dev/input/event# number your keyboard is connected to. If not #0, edit the first line to the correct number.
For a game pad, it's the same procedure, where you have to have the game pad's event number in the first line and using the correct key codes from evtest
for the controller buttons you want to bind in arcade.cfg.
This image shows the blocks code from the last commit in master. This image may take a few minutes to refresh.
- for PXT/arcade