<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Xmas Beta cannot take in custom GPIO pin mapping as additional parameters when loading module mk_arcade_joystick_rpi.ko.]]></title><description><![CDATA[<p dir="auto">I built a recalbox portable console with Pi 0 W; 2.2" il9341 TFT LCD with SPI using GPIO 9,10,11,25  supported by the adafruit drivers and GPIO controllers ( mk_arcade_joystick_rpi.ko) and the PWM 2 channel audio output using GPIO 18, 13.  As the LCD and Audio GPIO overlaps with the default GPIO pins map parameters of<br />
mk_arcade_joystick_rpi.ko module. i.e. "map=1" or "map =3", I have to create a custom pin mapping using the parameter of "map=4 gpio=21,24,26,19,5,6,22,4,20,17,27,16,12" to avoid the conflicts of pins used by the joystick buttons , LCD and audio output.<br />
I found that the boot up script file (/recalbox/scripts/recalbox-config.sh) cannot take in the second parameter I put into the recalbox.conf file:<br />
controllers.gpio.enabled=1<br />
controllers.gpio.arg=map=4 gpio=21,24,26,19,5,6,22,4,20,17,27,16,12</p>
<p dir="auto">To fix the issue, please help to consider the following in the new release.<br />
add the following lines to the top of the /recalbox/scripts/recalbox-config.sh. file to take in one additional parameter as $extra3.<br />
extra3=$5</p>
<p dir="auto">Change the line in the section for GPIO controllers<br />
from<br />
map="$extra2"<br />
to<br />
map="$extra2 $extra3"</p>
<p dir="auto">Once the above is done, I can happily make my recalbox console works with TFT LCD; GPIO buttons soldered onto my circuit board, and stereo analog audio output driven by PWM through GPIO pin 13 and 18 and Ground.</p>
<p dir="auto">Here are the parameters I used in the config files to make this work. With the modification I mentioned about for the <a href="http://recalbox-config.sh" rel="nofollow ugc">recalbox-config.sh</a> to take in one extra parameter for GPIO controllers.</p>
<p dir="auto">mount -o remount, rw /boot</p>
<p dir="auto">vi /boot/config.txt</p>
<h1>add this to the end of the /boot/config.txt file  to enable GPIO TFT</h1>
<p dir="auto">hdmi_group=2<br />
hdmi_mode=87<br />
hdmi_cvt=320 240 60 1 0 0 0<br />
dtparam=spi=on<br />
dtparam=i2c1=on<br />
dtparam=i2c_arm=on<br />
dtoverlay=pitft22,rotate=270,speed=64000000,fps=30</p>
<h1>also need to edit recalbox.conf to set  system.fbcp.enabled=1 and global.videomode=default</h1>
<p dir="auto"><strong>#add this to end of the /boot/config.txt file to enable GPIOs analog audio<br />
dtoverlay=pwm-2chan,pin=18,func=2,pin2=13,func2=4</strong></p>
<p dir="auto"><strong># edit recalbox.conf to enable fbp and TFT LCD and GPIO controllers</strong></p>
<p dir="auto">mount -o remount, rw /<br />
cd ~<br />
vi recalbox.conf</p>
<h1>change the following parameters as follows</h1>
<p dir="auto">#Tips for using vi: use “/<em>word</em>” to search for the  <em>word.</em><br />
then press ENTER  to jump to the first match.<br />
then press "a" to add or modify. ESC to stop and “:x!” to save</p>
<p dir="auto">system.fbcp.enabled=1<br />
global.videomode=default</p>
<p dir="auto">system.power.switch=PIN56PUSH<br />
controllers.gpio.enabled=1<br />
controllers.gpio.arg=map=4 gpio=21,24,26,19,5,6,22,4,20,17,27,16,12</p>
]]></description><link>https://forum.recalbox.com/topic/16230/xmas-beta-cannot-take-in-custom-gpio-pin-mapping-as-additional-parameters-when-loading-module-mk_arcade_joystick_rpi-ko</link><generator>RSS for Node</generator><lastBuildDate>Sat, 13 Jun 2026 16:15:42 GMT</lastBuildDate><atom:link href="https://forum.recalbox.com/topic/16230.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 03 Jan 2019 03:09:32 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Xmas Beta cannot take in custom GPIO pin mapping as additional parameters when loading module mk_arcade_joystick_rpi.ko. on Fri, 04 Jan 2019 00:44:05 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://forum.recalbox.com/uid/31733">@cheungbx</a><br />
Note: the last two lines in the recalbox.conf appeared as two  lines on this forum but is actually one single line.</p>
]]></description><link>https://forum.recalbox.com/post/116177</link><guid isPermaLink="true">https://forum.recalbox.com/post/116177</guid><dc:creator><![CDATA[cheungbx]]></dc:creator><pubDate>Fri, 04 Jan 2019 00:44:05 GMT</pubDate></item></channel></rss>