Tutorial 6: Five Minute Fun with your Monku R1: Retro Cubicle Commando
-
Author: Brian A. Ree
Sections
0: Tools Needed
- A Monku Retro 1,2,3 / ODROID-C1+,2,XU4: link C1+ link C2 link XU4
(It's expected these devices are configured with Ubuntu and MATE. Click here
for R1 and R2 devices, and here for R3 devices.)
- A USB Audio Card x1 $10.99: link
- A Wireless GameSir Controller x1 $30.99: link
- An ODROID USB WiFi Adapter x1 $4.80: link
1: Introduction and Tutorial Goals
We all get bored at work and sometimes we have an oppotunity to kill some time. This tutorial shows you how to
convert your Monku Retro console into a Retro Cubicle Commando! The perfect console for gaming discretely on a VGA screen
The steps below will show you how to adjust the scripts on your Monku R1, R2, or R3 (ODROID - C1+, C2, XU4)
so that using the custom control button to switch to VGA mode automatically adjusts the retroarch config file to use
the USB audio card. The R3, XU4, doesn't use custom control scripts but you can just run the scripts that alter retroarch's audio
configuration by hand.
You'll need a Monku Retro device, like the one we show you how to build here (R1, R2),
and here (R3),
a USB audio card, a USB WiFi adapter, and a wireless gamepad for stealth - links provided above.
We'll use earbuds for audio and wireless wherever possible to keep us low profile when gaming during cubicle downtime.
Follow the rest of the steps to create a Retro Cubicle Commando of your own.
A little bit about the parts needed. The wireless GameSir gamepad isn't really required. You can get away with
using the wired version for about half the price. Hardkernel has a very good price on that model
here so be sure to check
it out when your shopping for parts. We recommended getting the wireless version because it's easier to hide and
less noticeable, no long black cord, all things we need for our Retro Cubicle Commando. You can also avoid the
USB audio card cost but who wants to play games with no sound?! The WiFi adapter is also optional if you don't plan
to do any web surfing on the nearbye cafe's customer WiFi network, otherwise, it's a perfect addition to our stealthy
retro gaming console. Alright, let's get started.
2: Setting Up the Audio
First thing's first, let's turn off full screen mode in retroarch. Launch retroarch if needed, Navigate to the Drivers section and scroll down to the
Video option, scroll down to the Start in Fullscreen Mode option and set it to off. Use this same process and turn it back on
when we're done adjusting retroarch. The screen shot below depicts the setting that needs to be adjusted.
Next, navigate to the Drivers section of the menu system and select the Audio option. Change the Audio Driver option
to alsa. Scroll farther down and look for the Device option. Make sure to leave the setting on it's original value. Use the left and right navigation to flip through the available audio devices.
ALERT: If you're unable to select any devices exit retroarch and re-start it and try to flip through the available audio devices again.
We'll be adding the config file changes by hand so this part isn't the most important.
If you are having trouble listing the audio hardware through retroarch exit retroarch and open up a terminal,
menu location Applications -> System Tools -> MATE Terminal. Type the following command, aplay -L you should see
output similar to that shown below.
You should see an entry that is similar to this one, hw:CARD=ODROIDHDMI,DEV=0, and after plugging in the USB audio adapter one that
is similar to this one, front:CARD=Device,DEV=0. Make a copy of these strings and save them in a temporary file.
Run the following commands from the terminal in the odroid home directory, i.e. the default directory.
cp .config/retroarch/retroarch.cfg .config/retroarch/retroarch.cfg.Orig
cp .config/retroarch/retroarch.cfg .config/retroarch/retroarch.cfg.VgaAudio
cp .config/retroarch/retroarch.cfg .config/retroarch/retroarch.cfg.HdmiAudio
We're making a backup of the current retroarch config file and two copies we can use with scripts to alter the audio configuration.
Once those commands are done running let's open up retroarch.cfg.VgaAudio using your favorite CLI editor, I'll use nano.
nano .config/retroarch/retroarch.cfg.VgaAudio
Scroll down to the line that has the audio device setting. Change the value of this setting to front:CARD=Device,DEV=0.
Repeat these steps for the retroarch.cfg.HdmiAudio file except for this file use hw:CARD=ODROIDHDMI,DEV=0 for the audio device value.
Once these changes have been made let's write some scripts that utilize the files we've just created.
Use your favorite editor to create the following files.
#!/bin/bash
#set_hdmi_audio
cp /home/odroid/.config/retroarch/reroarch.cfg.HdmiAudio /home/odroid/.config/retroarch/reroarch.cfg
#!/bin/bash
#set_vga_audio
cp /home/odroid/.config/retroarch/reroarch.cfg.VgaAudio /home/odroid/.config/retroarch/reroarch.cfg
Let's set the proper permissions for these files. Run the following commands at the terminal.
sudo chmod 755 set_vga_audio set_hdmi_audio
sudo chmod +x set_vga_audio set_hdmi_audio
Run the set_vga_audio script you just created and get ready to test out your retro gaming console on a VGA
screen with USB audio adapter. Fire up retroarch and double check the Device setting.
Head over and try out a game with your headset on and experience stealth retro gaming you can pull off at your desk!
ALERT: Don't forget to restore the full screen setting to all copies of the retroarch config files, even the new ones you've made!
Just use Ctrl + W and type in fullscreen to locate the entry, set its value to "on" if it is "off." Do this for all copies of
the config file.
A slightly less stealthy Cubicle Commando setup but it gets the job done.
3: Setting Up the Controller
I'll assume that the GameSire wireless controller hasn't been previously configured for your retro gaming console.
This next part will walk you through configuring a new controller for a Monku Retro 1, 2, 3 (ODROID-C1+, C2, XU4) device.
Let's get antimicro configured so we can start controlling the desktop environment with the gamepad. Open up a terminal, I'll
not list the menu path for it from this point forward.
Type antimicro in the terminal and wait for the app to launch.
Connect your linux supported controller and make sure that antimicro recognizes it. If it doesn't you'll need to try another controller.
Click the Controller Mapping button on the bottom left hand corner of the UI. This is where you tell antimicro about the base functionality of
your controller. If you don't have a button for a specific position in the list, for instance Linux seems to ignore the blue central button on the
GameSir controllers, use your mouse to click down to the next viable option. Match up the buttons on the gamepad with the controller graphic's green button indicator.
ALERT: Some buttons like triggers fire multiple time and you'll have to use the mouse to back up the position of the mapping and fix the double entry.
Click save when you are done and return to the main antimicro UI.
You will see a new mapping on the main antimicro UI that contains buttons for all the new mappings you just made. What we are going to do
here is setup mouse support so that you can control the desktop environment from the gamepad when retroarch isn't running.
We'll use the left thumbstick for fine, slower, mouse control and the right thumbstick for faster mouse control.
The A and B buttons will server as the left and right mouse buttons.
Right click on the left thumb stick area and select mouse normal from the option list.
Click on the left thumb stick buttons again and find the Mouse Settings button at the bottom of the window.
The image above shows the button we're looking for. In the mouse settings window set the Horizontal Speed and
Vertical Speed to 10 for the left thumbstick as depicted below.
Do the same thing for the right thumbstick except now set the Horizontal Speed and
Vertical Speed to 30 as depicted below.
Now let's map the mouse buttons, close all dialogs and get back to the main antimicro UI. Find the A button in the button list below
the thumbstick and dpad listing. Click on it then click on the Mouse tab. Select the left mouse button. Do the same thing for the B button
except choose the right mouse button for that mapping. Below is a screen shot depicting the left mouse button mapping in action.
Take it for a spin while the main antimicro UI is open. You should see the mouse move around the screen as the button
listings in the antimicro UI turn blue to indicate they are active. See how it feels, adjust the speeds on the mouse controls
as you see fit.
When you're all set go back to the antimicro main UI and click the Save As button at the top right hand side of the screen.
Save the controller configuration as game_sir_wired.xml or whatever you want to name your controller in the odroid home directory as
shown below. I'll provide a copy of my XML file here if you are using a GameSir controller you can just use it and save some time.
If you are using an Easy SMX controller use this file.
Click on Options -> Settings in the antimicro menu and make sure only Close To Tray and Launch In Tray
are checked. This will ensure antimicro lives in the app tray and doesn't clutter up our screen. We have one more setting to adjust and then
we'll be done with antimicro and on to retroarch!
While still on the antimicro setting window click on the Auto Profile option on the left. This will determine what profile
will automatically be associated with the attached gamepad. You kind of only get one mapping. It would be cool it if had different options
for different hardware but as far as I can tell you're setting it up for the controller you have. Click the Active checkbox at the top of the
window. Then select the Defualt, and only, row in the table. Click the Edit button and browse to the controller mapping XML file you saved
just a few steps back. Click Ok then quit out of antimicro, if it appears in the system try click the controller icon in the system tray and quit the app.
Nice! We are done with the antimicro configuration!!
Next up let's whip retroarch into shape. Fire up retroarch from the menu system,
I'll not list the menu path for it from this point forward. First let's get the gamepad working in retroarch.
In retroarch you can use the keyboard arrow keys, enter, and backspace to navigate the menu system without the gamepad.
Make sure you have a mouse, keyboard, and game controller connected to your ODROID. First thing we'll do is get the controller
working. Use the arrows on the keyboard to navigate right to the Settings section, the move down to the Input section
as shown below.
Adjust the settings on this screen as you see below. I usually set the max number of controllers to 4 since there are 4 USB ports.
And I like the "L1 + R1 + Start + Select" Menu Toggle Gamepad Combo setting, let's face it if you're accidentally hitting this
combination during game play something ain't right. Leave the remaining settings and scroll down to the User 1 Binds.
You'll have to setup each user input in this way it's not too bad only takes a minute. Tip: Map the A and B buttons by name not position
if you are using a GameSir controller that way the colors green and red map to positive/select, negative/back button usage. It's just what I
like to do you can map em anyway you like!
Perfect, that should be all you need to use your new wireless controller. Stealth gameplay is just around the corner.
4: Setting Up the WiFi USB Adapter
Plug the WiFi USB adapter into your ODROID device configured as a Monku Retro gaming console or otherwise running Ubuntu and MATE.
At the top right hand corner of the desktop screen, after closing retroarch if need be, you should see a network icon, click on it.
Use the menu options to add a new wireless network so you can surf the web when your not gaming. Well that wraps up this tutorial.
I hope you enjoyed it and can now get some stealth retro gaming hours in at your cubicle!