Chip Arcade Table

PIK3A+Table+01A friend of mine sent me this picture and I figured that I should try and make it:
I have the CHIP, and a USB Joystick Encoder. I just received my Buttons and Joystick. 
Update 06/14/16 a friend from work donated an old monitor that was destined for the trash.
Update 6/15/16 I received in the mail a VGA-to-RCA adapter.
The only thing that I am missing so far is the Table and Plexi-Glass .
I’ve been playing around with the actual software side of things and here is what I got so far, its sort of a work in progress tutorial.

VGA toRCA

PRE STEP
sudo apt-get install mednafen
sudo apt-get install qjoypad
sudo apt-get install dialog
sudo apt-get install wmctrl
sudo apt-get install xbindkeys-config
sudo apt-get install xbindkeys
 
STEP 1
mkdir roms
cd romsencoder
 
STEP 2
Lets say you have Super Mario Brothers for the NES, you backed it up and it’s named smb.nes
Place smb.nes in /home/chip/roms
 
STEP 3 Create a Ghetto Front End
while in /home/chip/roms
touch mednafenfe.sh
chmod a+x mednafen.sh
pico mednafen.sh
 
This is a fully functional sample script (once again its ghetto). After you exit the rom with ESC the script will run again.arcadejoystick
//Start SCRIPT
 
#!/bin/bash
 
wmctrl -r :ACTIVE: -b add,fullscreen
 
HEIGHT=15
WIDTH=40
CHOICE_HEIGHT=6
BACKTITLE=”Arcade”happFireButton
TITLE=”Arcade”
MENU=”Choose A Game:”
 
OPTIONS=(
1 “SMB”
2 “SMB”
3 “SMB”
4 “SMB”
5 “SMB”
6 “SMB”
)
CHOICE=$(dialog –clear
–backtitle “$BACKTITLE”
–title “$TITLE”download
–menu “$MENU”
$HEIGHT $WIDTH $CHOICE_HEIGHT
“${OPTIONS[@]}”
2>&1 >/dev/tty)
 
clear
case $CHOICE in
1)
echo “SMB1”
mednafen /home/chip/roms/smb.nes
 
;;lcd monitor
2)
echo “SMB2”
mednafen /home/chip/roms/smb.nes
;;
3)
echo “SMB2”
mednafen /home/chip/roms/smb.nes
;;
4)
echo “SMB4”
mednafen /home/chip/roms/smb.nes
;;
5)
echo “SMB5”
mednafen /home/chip/roms/smb.nes
;;
6)
echo “SMB6”
mednafen /home/chip/roms/smb.nes
;;
esac
bash /home/chip/roms/run.sh
 
wmctrl -r :ACTIVE: -b remove,fullscreen
 
//END SCRIPT
 
STEP 4 Auto Start
 
I am going to use chip as a arcade setup, so I decided to run the bash script at startup, here is how I accomplished it.
 
pico ~/.config/autostart/mednafenFE.desktop
//Start
 
[Desktop Entry]
Type=Application
Exec=/home/chip/roms/mednafenfe.sh
Hidden=false
X-GNOME-Autostart-enabled=true
Name=Mednafen Ghetto FE
Comment=Ghetto FE
 
//END
 
I’ll continue working on this as soon as I find some extra time: I want to:
Map Gamepad Keys
Bind Volume UP/DOWN Functions to Key Presses
 
I also welcome ideas on how to make this better.