MakeCode Arcade on Raspberry Pi (including RetroPie, Recalbox, Batocera etc.)

With reference to previous correspondence with @richard and @peli, and happy to announce that McAirpos now supports running MakeCode Arcade games natively and with controller support on Batocera retro-gaming distro in addition to RetroPie, Recalbox and the Raspberry Pi OS console and presumably other similar ARM hardware and Linux flavours, as well as a new working Ansible playbook template that allows quickly scripted installation onto several devices in parallel in e.g. a classroom, collaborative project or makerspace setting…

…I hereby launch this topic as all things regarding getting MakeCode Arcade(MCA) games to run freely and natively on the Raspberry Pi, at the moment probably focused on, but not meant to be exclusively about McAirpos.*


(*My hope as the developer - having gone far past my initial aim of getting my son’s MCA games to run on the big screen together with the rest of his retro games and even though it is a learning and joyful experience - is rather that the fabulous @makecode team (re-)discovers the synergy and where retro-gaming and unbounded creativity and tinkering really is the Big Thing in a great many places on Tellus, and that they unite and share in mutual love, respect and cooperation with the Raspberry Pi(RPi) community and foundation, and instead make their own solid and official solution for running MCA games natively, freely and functioning on any distro, with built-in controller support, support for both reading from and writing to the GPIOs and popular peripherals, sensors and actuators, and open to whatever the combined and larger and presumably even more creative and unified world-citizenry might hack together of fun and impressive stuff, in our common journey for world peace, unity, prosperity, education, future and technological advancement.)


The rationale for this thread are earlier fragmented and confusing contributions to the topic, where I think it might be a good idea to gather and consolidate relevant information in one place, and some themes for this topic might be:

  • News and updates about McAirpos and MCA on RPi in general
  • Current general challenges and information gathering and sharing to solve obstacles
  • A place to start and nurse collaboration
  • Exchange of ideas for new functionality and improvements
  • Info about good alternatives and related projects
  • Feedback, show and tell about your own successful projects, or if and why it has been a catastrophic failure and waste of your time
  • Whatever the community has of thoughts and would like to air or contribute on the matter

Preferably, since moderation sometimes takes somewhere between 24 and 48 hours pr. post, support requests for particular installations should instead be posted as an issue at the GitHub repo, and I hope eventual heated discussions with numerous posts on small details could move into separate topics and not dominate or hijack this thread.


Happy retro games making and playing, looking forward to hearing from you!

@Vegz78

2 Likes

This thread continues, complements, references or replaces in whole or the relevant posts included in the following topics:

Interesting development projects? - Tighter integration of MakeCode Arcade games with Batocera, Recalbox and RetroPie

While I was working with McAirpos and getting MCA games to show up in and run from the game menus in RetroPie, Recalbox and Batocera, I had the pleasure to receive both good help and support from all the retro games systems’ developer teams.

They were all interested in integrating and supporting MakeCode Arcade games in a more official fashion than my kitchen door hack approach, like for all the other emulator systems, and they all offered technical support along the way to help make it happen.

My understanding is that the major steps to accomplish such integration are:

  1. Make and add a MCA installation script entry the right way in their respective installation channels
  2. Configure the MCA games launching to work in conjunction with their built-in launchers (emulationlauncher/runcommand.sh Python/shell scripts), and especially, but not exclusive to
  3. Integrate with their gamepad/controller configuration system(SDL?)

The last point might be the one requiring the most work, as the current MCA (arm) Linux executables utilizes RAW Linux Input Subsystem events for controllers. But I have seen many references to SDL in the pxt source code, which might imply that this could be accomplished in a much more direct and better way than through all the detours I take with uinput-mapper etc. in McAirpos.

All the three retro gaming systems are great, all with nice and welcoming teams and communities, so I would not dare to prefer or recommend any one over the other, at least not as a retro gaming system on their own terms.

But my communication most recently has coincidentally been with the Batocera team(meaning this is freshest in their memory), and they are the only ones who really focuses big on the DIY/homebrew retro gaming scene(like MakeCode Arcade), where they include emulator entries for PyGame, TIC-80, Pico-8 etc. in their default installation ready to play from the main menu with example games, and not as optional add-ons or only showing up after having added such games. They were also the only ones who took MakeCode Arcade as far as advertising even the current working McAirpos hack support on their blog and have support people on Discord who answer within minutes on the subject:

Ceteris paribus, this might indicate that Batocera are the most eager to include MakeCode Arcade games in their official portfolio.

Though pretty big on the Raspberry as well, one downside compared to RetroPie and Recalbox, is that Batocers largest group of users seems to be on Linux and Windows x64 computers. Even though I suspect that MakeCode Arcade games already could quite easily be compiled also to x64 executables(especially Linux), I have still not found out how nor gotten any real affirmative response on the matter from the @makecode team, except a little from @eanders regarding UWP apps(with compilation of MCA x64 native executables, I imagine that bundling of MCA games with Batocera also on these platforms would be a breeze, and make the market and interest for MakeCode even bigger);

At the moment, I am swamped with trying to understand the pxt source code and getting McAirpos to open uf2 files directly, and I have no feeling of ownership or wish to be some kind of “syvende far i huset” for anyone who might wish to take on a project like this.

This is just a tip about 3 potential interesting learning/development projects, which definitely have both a confirmed user market/demand and teams that wants to help, and an offer to help as much as I can if it is somehow based on McAirpos(or not based on McAirpos, which probably is a better way forward in the long run). I can also convey any initiative/contact request to the people I was in touch with at Batocera, Recalbox and RetroPie, if of interest.

Just updated the online download link generator for MakeCode Arcade(MCA) games .elf native executables running on RetroPie, Recalbox, Batocera and RPi OS on the Raspberry Pi or similar ARM SBCs to also recognize the «new» S-type MCA share links
(https://arcade.makecode.com/S72437-68398-41355-55299):

Generate URL links to download your .elf MCA executables here:

More about the MCA share links here:
https://forum.makecode.com/t/share-links-and-editor-magic-url-confusion/16173

I"m triying using Batocera v35 at virtual machine. When Inusing memeory 2 GB d game always exit back to menu list game, when I using 4 gb memory game run so longger.

How to.solve this problem?

Hi @Kokoadi,

I am not sure I understand the “virtual machine” part?

As far as I know, MakeCode Arcade games only run natively on a Raspberry Pi/Linux ARM device outside the browser simulator and the various officially supported handheld micro controller devices.

If I remember correctly, there were some early efforts at running MakeCode Arcade games in a SDL interpreter on all x86/x64 machines(Windows, MacOS and Linux), but I was told by @mmoskal that this does not work anymore and never located it or managed to find out more about it myself.

If yours is a Raspberry Pi issue, please open an issue here: https://github.com/Vegz78/McAirpos/Issues
I am planning to check if this still works on newer versions of the retro games systems soon.

If yours is a virtual machine issue, or an issue for MakeCode Arcade games in Batocera on any other hardware than the Raspberry Pi, please reach out and try to get some help from the @MakeCode team or others in a new or other relevant existing threads on this forum, like maybe: https://forum.makecode.com/t/play-makecode-arcade-game-in-app/10787/3