# How to launch Makecode Arcade UF2s in Raspbian/RetroPie?

**URL:** <https://forum.makecode.com/t/how-to-launch-makecode-arcade-uf2s-in-raspbian-retropie/2725>\
**Category:** Help\
**Created:** [July 10, 2020, 1:10pm UTC](https://forum.makecode.com/t/how-to-launch-makecode-arcade-uf2s-in-raspbian-retropie/2725 "2020-07-10T13:10:42Z")\
**Posts on this page:** 8\
**Page:** 2

<div class="post-metadata">

**Author:** ![Vegz78](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/vegz78/32/1201_2.png) [@Vegz78](https://forum.makecode.com/u/Vegz78)\
**Post date:** [October 26, 2020, 10:32am UTC](https://forum.makecode.com/t/how-to-launch-makecode-arcade-uf2s-in-raspbian-retropie/2725/21 "2020-10-26T10:32:57Z")

</div>

Hi @mmoskal and @peli,

I’m sorry to bother you again during no doubt busy times and I don’t mean to nag. But I’m waiting like a kid on Christmas eve here, for MakeCode Arcade ELFs to work correctly(exit back to console) on Raspberry Pi OS and to spread the happy word about it… No doubt, many others would welcome this as well.

Any new information on whether or when this will be addressed on GitHub?

Have a nice day and hope for a quick and positive reply! Don’t hesitate to get in touch if I can help with testing or anything else.

Br,  
Vegard

---

<div class="post-metadata">

**Author:** ![peli](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/peli/32/12_2.png) [@peli](https://forum.makecode.com/u/peli)\
**Post date:** [October 28, 2020, 2:38pm UTC](https://forum.makecode.com/t/how-to-launch-makecode-arcade-uf2s-in-raspbian-retropie/2725/22 "2020-10-28T14:38:29Z")

</div>

> [@Vegz78](#):
>
> re, for MakeCode Arcade ELFs to work correctly(exit back to console) on Raspberry Pi OS and to spread the happy word about i

We haven’t been able to look into this issue. Any taker on trying to diagnose this?

---

<div class="post-metadata">

**Author:** ![Vegz78](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/vegz78/32/1201_2.png) [@Vegz78](https://forum.makecode.com/u/Vegz78)\
**Post date:** [December 23, 2020, 2:58am UTC](https://forum.makecode.com/t/how-to-launch-makecode-arcade-uf2s-in-raspbian-retropie/2725/25 "2020-12-23T02:58:03Z")

</div>

Finally, there’s a working work-around, with gamepad and/or keyboard controls for up to 2 players!

> **[Vegz78/McAirpos](https://github.com/Vegz78/McAirpos)**
>
> MakeCode Arcade games in RetroPie, running natively as ELF executables on Raspberry Pi OS with gamepad support.

Thanks for all the help and support, @mmoskal and @peli!

Br,  
Vegard

---

<div class="post-metadata">

**Author:** ![Vegz78](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/vegz78/32/1201_2.png) [@Vegz78](https://forum.makecode.com/u/Vegz78)\
**Post date:** [December 24, 2020, 10:22pm UTC](https://forum.makecode.com/t/how-to-launch-makecode-arcade-uf2s-in-raspbian-retropie/2725/26 "2020-12-24T22:22:39Z")

</div>

By the way, @njp. I forgot to mention what eluded me for a long time; that the screen and keyboard were still frozen even though the MakeCode game PIDs were killed and gone. By pure coincidence I found the termfix repo, which helped me, and those same 2-3 last ioctl commands might also be of help in your project, from what you have described above, and if you haven’t already found a solution:

> <https://github.com/hobbitalastair/termfix/blob/8e1e79e050e0725fa1e5895491beac02ac6c340a/termfix.c#L38>

Would be nice if I could check out your setup up with xboxdrv. It’s the recommended choice by RetroPie for key mapping, but I found it a bit difficult and I didn’t want to have any extra external dependencies/drivers to install.

Br, Vegard

---

<div class="post-metadata">

**Author:** ![Vegz78](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/vegz78/32/1201_2.png) [@Vegz78](https://forum.makecode.com/u/Vegz78)\
**Post date:** [January 16, 2021, 4:49pm UTC](https://forum.makecode.com/t/how-to-launch-makecode-arcade-uf2s-in-raspbian-retropie/2725/27 "2021-01-16T16:49:58Z")

</div>

McAirpos now updated and tested ok with improved controller support:

> [@Remote Code Club](https://forum.makecode.com/t/remote-code-club/2102/32):
>
> Expanded and tested support for more gamepads/controllers today, and added a “nomap” optional argument so that people can configure controllers manually if they want. I would be very happy to hear about other controllers that work(or don’t work…), as well! wink Br, Vegard

---

<div class="post-metadata">

**Author:** ![Vegz78](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/vegz78/32/1201_2.png) [@Vegz78](https://forum.makecode.com/u/Vegz78)\
**Post date:** [February 4, 2022, 11:23pm UTC](https://forum.makecode.com/t/how-to-launch-makecode-arcade-uf2s-in-raspbian-retropie/2725/28 "2022-02-04T23:23:50Z")

</div>

Hi,

I have lately been studying the article “One chip to flash them all”, the uf2 and uf2-linux bootloader Github repos, to better understand the uf2 file format.

My goal is maybe to embark on a hobby/training programming project to get McAirpos to open MakeCode Arcade uf2 files for the rpi directly, instead of having to download rawElf files.

The greatest benefit, if I understand this correctly, would be that the uf2 files would still contain the MakeCode code and blocks in the file itself, while the rawELFs are stripped of this information(?).

I am also under the impression that the uf2 files have their own included memory area for saved game states and settings, which then can be carried around with the uf2 files, instead of the seperate folders which are created for rawELFs(?).

However, I am just not able to figure out what part of the source code to include and use, just to be able to open the uf2 files and read/run the executables within these files.

Would anyone have an idea if this would be feasible, and could they please point me just a little bit in the right direction and to what part of the uf2 code that would be needed to include/call to make this work?

Any help is greatly appreciated!

---

<div class="post-metadata">

**Author:** ![Vegz78](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/vegz78/32/1201_2.png) [@Vegz78](https://forum.makecode.com/u/Vegz78)\
**Post date:** [June 22, 2022, 3:56pm UTC](https://forum.makecode.com/t/how-to-launch-makecode-arcade-uf2s-in-raspbian-retropie/2725/29 "2022-06-22T15:56:13Z")

</div>

This post from @kwx surely gives me some hope in the matter of getting uf2s to run directly on the Raspberry, thereby saving both blocks and code together with the executable, so we don’t need separate file copies and we can load them back into the editor to make changes:

> [@Lost main.ts code, is there a way to recover?](https://forum.makecode.com/t/lost-main-ts-code-is-there-a-way-to-recover/6281/2):
>
> Edit: See UnsignedArduino’s response, simply drag&drop the UF2 file into [arcade.makecode.com](http://arcade.makecode.com), same as loading a saved image. I’m keeping the unnecessarily complicated method below for curiosity’s sake. The UF2 file does indeed contain a copy of the source slight_smile There’s likely a cleaner way to do that, but here’s how I got the data out using command line tools. First confirm that the “source” magic number is present - this part isn’t part of recovering, but I wanted to check if it has…

---

<div class="post-metadata">

**Author:** ![Vegz78](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/vegz78/32/1201_2.png) [@Vegz78](https://forum.makecode.com/u/Vegz78)\
**Post date:** [October 31, 2022, 5:12pm UTC](https://forum.makecode.com/t/how-to-launch-makecode-arcade-uf2s-in-raspbian-retropie/2725/30 "2022-10-31T17:12:30Z")

</div>

I suggest that everything regarding running MakeCode Arcade natively on Raspberry Pi OS, including RetroPie, Recalbox, Batocero, should be in the topic linked to below going forward, except directly regarding the related UF2 files, which should still be in this thread:

> [@MakeCode Arcade on Raspberry Pi (including RetroPie, Recalbox, Batocera etc.)](https://forum.makecode.com/t/makecode-arcade-on-raspberry-pi-including-retropie-recalbox-batocera-etc/14267):
>
> 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](https://batocera.org) retro-gaming distro in addition to [RetroPie](https://retropie.org.uk), [Recalbox](https://www.recalbox.com) and the [Raspberry Pi OS](https://www.raspberrypi.com/software/) [console](https://en.wikipedia.org/wiki/Linux_console) and presumably other similar ARM hardware and Linux flavours, as well as a new working [Ansible](https://www.ansible.com) playbook template that allows quickly scripted installation onto several devices in parallel in e.g. a classroom, collaborat…

[Previous page](https://forum.makecode.com/t/how-to-launch-makecode-arcade-uf2s-in-raspbian-retropie/2725.md?page=1)
