# Remote Code Club

**URL:** <https://forum.makecode.com/t/remote-code-club/2102>\
**Category:** Arcade\
**Created:** [May 15, 2020, 12:53pm UTC](https://forum.makecode.com/t/remote-code-club/2102 "2020-05-15T12:53:20Z")\
**Posts on this page:** 18\
**Page:** 2

<div class="post-metadata">

**Author:** ![NxNMatrixGL](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/nxnmatrixgl/32/2553_2.png) [@NxNMatrixGL](https://forum.makecode.com/u/NxNMatrixGL)\
**Post date:** [January 5, 2021, 2:31am UTC](https://forum.makecode.com/t/remote-code-club/2102/22 "2021-01-05T02:31:12Z")

</div>

Very cool!

---

<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:** [January 5, 2021, 8:29am UTC](https://forum.makecode.com/t/remote-code-club/2102/23 "2021-01-05T08:29:59Z")

</div>

Added to [https://arcade.makecode.com/hardware/raspberry-pi](https://arcade.makecode.com/hardware/raspberry-pi) !

---

<div class="post-metadata">

**Author:** ![Adri314](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/adri314/32/182_2.png) [@Adri314](https://forum.makecode.com/u/Adri314)\
**Post date:** [January 5, 2021, 4:51pm UTC](https://forum.makecode.com/t/remote-code-club/2102/24 "2021-01-05T16:51:53Z")

</div>

I have to try this. Looks awesome!

---

<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 6, 2021, 12:37am UTC](https://forum.makecode.com/t/remote-code-club/2102/25 "2021-01-06T00:37:07Z")

</div>

Thanks @peli for adding McAirpos to the hardware section, and to others for testing!

I’m struggling a little with good gamepad detection and support, as I currently only have PS3 controllers at home. I am hoping at least to support gamepads with DPAD digital directional buttons and the ones normally used in cabinets. I’ll receive some more gamepads to test soon by mail, and since it probably will be difficult to support every possible controller option/setup/driver out there(fearing anolog axis direction will be harder), there might be some narrowing of support ambitions and leaving it more open to manual mappings by the community instead.  
-Any thoughts/inputs in general?  
-Any suggestions for the most commonly (digital)joysticks for arcade cabinets? ( USB and/or GPIO)  
-Anyone who can confirm gamepads other than my own PS3 controllers that are working already? 😉

Any feedback is useful!

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:** [January 6, 2021, 8:35am UTC](https://forum.makecode.com/t/remote-code-club/2102/26 "2021-01-06T08:35:31Z")

</div>

My advice would be to crowdsource it 🙂 Clearly specify which controller you’ve tested and which ones you haven’t. You’ll create an incentive for other enthusiasts to help you add more support over time. I don’t think you can win that fight alone; there’s too much stuff out there.

---

<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 6, 2021, 4:32pm UTC](https://forum.makecode.com/t/remote-code-club/2102/27 "2021-01-06T16:32:19Z")

</div>

Makes sense with such a delimitation and clarification of controller support, and to decouple/modularize it somehow, so it’s easier for others to make manual and custom modifications. -Unless there’s some other way to map whatever controller that already works inside EmulationStation(?). I guess also, that when and if you or someone in the community get the time to fix/pull request the pxt-arcade compilation of the game elf files to run well both inside the Zero uf2 images and natively on any RPi(which would be the best solution and should be possible) and maybe add support for two controllers, my launcher/wrapper and too much effort spent on it would be about as useful as an extra handful of sand in the desert, leaving of interest maybe just the tools for mapping controllers and a web page for downloading elf files(both of which you probably can do better in the long run, as well). 😉

---

<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:** [January 7, 2021, 4:04am UTC](https://forum.makecode.com/t/remote-code-club/2102/28 "2021-01-07T04:04:24Z")

</div>

Have you though about supporting raspbian directly?

---

<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 8, 2021, 9:08pm UTC](https://forum.makecode.com/t/remote-code-club/2102/29 "2021-01-08T21:08:34Z")

</div>

Sorry, @peli, I am not sure I understand your question. The McAirpos launcher and MakeCode’s elf game files already run in Raspberry Pi OS(aka Raspbian) and are only called from the shell in EmulationStation/RetroPie, if that is what you mean?

---

<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:** [January 12, 2021, 8:13pm UTC](https://forum.makecode.com/t/remote-code-club/2102/30 "2021-01-12T20:13:56Z")

</div>

Oh great! My knowledge of RPI is very rusty. I guess my question is what do I do if i get an .elf file in RPI after following [Welcome to McAirpos | McAirpos (vegz78.github.io)](https://vegz78.github.io/McAirpos/) ?

---

<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 13, 2021, 4:01pm UTC](https://forum.makecode.com/t/remote-code-club/2102/31 "2021-01-13T16:01:31Z")

</div>

> [@peli](#):
>
> Welcome to McAirpos | McAirpos ([vegz78.github.io](http://vegz78.github.io))

Ok. With the elf game file downloaded from your provided link above, you can go to [https://github.com/Vegz78/McAirpos#installation](https://github.com/Vegz78/McAirpos#installation) for installation and usage of McAirpos for installing McAirpos and launching the .elf game file from within RetroPie or from the Raspbian Linux console/CLI.

PS at the moment it only works with keyboard controls and up to two PS3 controllers, but I’m working on expanding controllers support/making controller support user configurable.

---

<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, 12:56am UTC](https://forum.makecode.com/t/remote-code-club/2102/32 "2021-01-16T00:56:50Z")

</div>

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.

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

I would be very happy to hear about other controllers that work(or don’t work…), as well! 😉

Br,  
Vegard

---

<div class="post-metadata">

**Author:** ![Adri314](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/adri314/32/182_2.png) [@Adri314](https://forum.makecode.com/u/Adri314)\
**Post date:** [February 24, 2021, 7:07pm UTC](https://forum.makecode.com/t/remote-code-club/2102/33 "2021-02-24T19:07:58Z")

</div>

Hi! This is so cool! Thanks for sharing. I have tried it with a couple of keyboards and a USB NES controller and they all work. I have been trying to make it work in a Picade, but I can’t figure out how to map the keys from the device to the makecode inputs. How do you use the nomap option? Thanks!

---

<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 24, 2021, 7:58pm UTC](https://forum.makecode.com/t/remote-code-club/2102/34 "2021-02-24T19:58:03Z")

</div>

No map option:  
`launCharc nomap game_file.elf`

It launches the game without uinput-mapper and direct mapping of buttons from the file /sd/arcade.cfg, which MS explains and has examples for here:

> **[microsoft/uf2-linux](https://github.com/microsoft/uf2-linux/tree/master/cfg)**
>
> master/cfg

I would love to have support for Picade out of the box, but I have no access to one and am not familiar with its controllers. If you open an issue at the repo page on GitHub, maybe we can help each other figure it out and I can fix support in the code or in a Picade uinput-mapper profile?

---

<div class="post-metadata">

**Author:** ![Adri314](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/adri314/32/182_2.png) [@Adri314](https://forum.makecode.com/u/Adri314)\
**Post date:** [February 25, 2021, 3:54pm UTC](https://forum.makecode.com/t/remote-code-club/2102/35 "2021-02-25T15:54:32Z")

</div>

Thanks! I will try the no map option and see if I can figure something out. If I can find more info I will open the issue on github. Thanks again for your help and for this awesome tool!

---

<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:** [March 24, 2021, 7:51pm UTC](https://forum.makecode.com/t/remote-code-club/2102/36 "2021-03-24T19:51:44Z")

</div>

Hi @Adri314,

I was just curious whether you got McAirpos to work with Picade and if you would like to share the process/configs on GitHub? 😉

Br, Vegard

---

<div class="post-metadata">

**Author:** ![Adri314](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/adri314/32/182_2.png) [@Adri314](https://forum.makecode.com/u/Adri314)\
**Post date:** [March 24, 2021, 8:18pm UTC](https://forum.makecode.com/t/remote-code-club/2102/37 "2021-03-24T20:18:53Z")

</div>

Hi, @Vegz78!

I haven’t had a chance yet, but thanks for reminding me. I’ll try again when I have a moment.

Cheers!

---

<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:** [September 6, 2021, 10:12pm UTC](https://forum.makecode.com/t/remote-code-club/2102/38 "2021-09-06T22:12:23Z")

</div>

Hi again @Adri314,

Just wanted to tip you that @rdmueller got McAirpos to work with the Picade and was kind enough to share with us how to do it!:

> <https://github.com/Vegz78/McAirpos/issues/22#issuecomment-911939494>
>
> thanx for this great tool!
> I try to get my games up and running on a picade and… retroflag GPi case.
> 
> So far, I go with the picade, since I get the games at least up and running. I see the start screen with animations and hear sound.
> 
> But my input will not work. Not a single button.
> 
> What I've done so far:
> 
> used evtest to find out which scan codes I need:
> 
> \`\`\`
> evtest
> No device specified, trying to scan all of /dev/input/event\*
> Not running as root, no devices may be available.
> Available devices:
> /dev/input/event0: gpio\_keys
> Select the device event number \[0-0\]: 0
> Input driver version is 1.0.1
> Input device ID: bus 0x19 vendor 0x1 product 0x1 version 0x100
> Input device name: "gpio\_keys"
> Supported events:
> Event type 0 (EV\_SYN)
> Event type 1 (EV\_KEY)
> Event code 1 (KEY\_ESC)
> Event code 23 (KEY\_I)
> Event code 24 (KEY\_O)
> Event code 28 (KEY\_ENTER)
> Event code 29 (KEY\_LEFTCTRL)
> Event code 42 (KEY\_LEFTSHIFT)
> Event code 44 (KEY\_Z)
> Event code 45 (KEY\_X)
> Event code 56 (KEY\_LEFTALT)
> 
> Event code 57 (KEY\_SPACE)
> 
> Event code 103 (KEY\_UP)
> 
> Event code 105 (KEY\_LEFT)
> Event code 106 (KEY\_RIGHT)
> Event code 108 (KEY\_DOWN)
> Event code 116 (KEY\_POWER)
> \`\`\`
> 
> configures my \`/sd/arcade.cfg\` according to this map:
> 
> \`\`\`
> SCAN\_CODES=/dev/input/event0
> BTN\_LEFT=105
> BTN\_RIGHT=106
> BTN\_UP=103
> BTN\_DOWN=108
> BTN\_A=29
> BTN\_B=56
> BTN\_LEFT2=0
> BTN\_RIGHT2=0
> BTN\_UP2=0
> BTN\_DOWN2=0
> BTN\_A2=0
> BTN\_B2=0
> BTN\_RESET=28
> BTN\_EXIT=1
> BTN\_MENU=23
> \`\`\`
> 
> use the \`nomap\` option to start the games.
> Still, nothing happends. Any Idea?
> 
> \`\`\`
> /home/pi/McAirpos/McAirpos/uinput-mapper/input-read -v -p /dev/input/event0
> Input: 0 Type: EV\_KEY
> KEY\_ESC → (\[0, EV\_KEY\], KEY\_ESC)
> KEY\_UP → (\[0, EV\_KEY\], KEY\_UP)
> KEY\_LEFT → (\[0, EV\_KEY\], KEY\_LEFT)
> KEY\_LEFTSHIFT → (\[0, EV\_KEY\], KEY\_LEFTSHIFT)
> 
> SCAN\_CODES=/dev/input/event0
> KEY\_Z → (\[0, EV\_KEY\], KEY\_Z)
> 
> KEY\_X → (\[0, EV\_KEY\], KEY\_X)
> KEY\_LEFTALT → (\[0, EV\_KEY\], KEY\_LEFTALT)
> KEY\_POWER → (\[0, EV\_KEY\], KEY\_POWER)
> KEY\_RIGHT → (\[0, EV\_KEY\], KEY\_RIGHT)
> KEY\_DOWN → (\[0, EV\_KEY\], KEY\_DOWN)
> KEY\_I → (\[0, EV\_KEY\], KEY\_I)
> KEY\_O → (\[0, EV\_KEY\], KEY\_O)
> KEY\_SPACE → (\[0, EV\_KEY\], KEY\_SPACE)
> KEY\_ENTER → (\[0, EV\_KEY\], KEY\_ENTER)
> KEY\_LEFTCTRL → (\[0, EV\_KEY\], KEY\_LEFTCTRL)
> 
> \`\`\`
> 
> and here are the logs (\`/tmp/McAirpos.log\`):
> 
> \`\`\`
> nomap argument detected,
> launCharc starting /home/pi/RetroPie/roms/makecode/arcade-Brick-Breaker2.elf with no automatic gamepad mappings...
> \[-1607608811\] GC block 16376b @ 0x20000000
> \[0\] runtime starting, pid=31899...
> \[17\] FB: BCM2708 FB at 640x480 640x960 bpp=32
> \[31\] FB: BCM2708 FB at 640x480 640x960 bpp=32 2560
> \[49\] init keys
> \[49\] read config: /sd/arcade.cfg
> \[97\] SCAN\_CODES=/dev/input/event0
> \[113\] BTN\_LEFT=105
> \[128\] BTN\_RIGHT=106
> \[143\] BTN\_UP=103
> \[158\] BTN\_DOWN=108
> \[174\] BTN\_A=29
> \[202\] BTN\_B=56
> \[217\] BTN\_LEFT2=0
> \[232\] BTN\_RIGHT2=0
> \[248\] BTN\_UP2=0
> \[263\] BTN\_DOWN2=0
> \[278\] BTN\_A2=0
> \[293\] BTN\_B2=0
> \[309\] BTN\_RESET=28
> \[324\] BTN\_EXIT=1
> \[339\] BTN\_MENU=23
> \[355\] config done
> \[370\] sx=4 sy=4 ox=0 oy=0 32=1
> \[385\] fbuf=0x76235000 sz:1228800
> \[403\] loop
> \[424\] GC block 16376b @ 0x20004000
> \[1316\] PCM name: 'default'
> \[1333\] PCM state: PREPARED
> \`\`\`

---

<div class="post-metadata">

**Author:** ![Adri314](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/adri314/32/182_2.png) [@Adri314](https://forum.makecode.com/u/Adri314)\
**Post date:** [September 30, 2021, 3:35pm UTC](https://forum.makecode.com/t/remote-code-club/2102/39 "2021-09-30T15:35:51Z")

</div>

That is so awesome! I’ve kind of swamped with work, but I will try that as soon as I can. Thanks so much for letting me know!

[Previous page](https://forum.makecode.com/t/remote-code-club/2102.md?page=1)
