Bloodcade - Full frontal nerdity
One geek's dream to build an ultimate gaming system for his shop.
| Table of Contents: | [ Hide TOC ] |
|---|---|
▲TopHardware
▲TopEnclosure
This was perfect FRAME for my project as I don't have the resources to fabricate my own case and it came fully assembled and (nearly) ready to rock! It also came with the rad X-Arcade Tankstick controller that saved me heaps of time.
As the name suggests, it did required a fair bit of DIY to get everything working. Mostly just drilling holes to run cables, but there quite a few pesky things that come half finished. Many of the locks either didn't work or had to be modified with reinforcements, the marque perspex came cracked and the keyboard draw rails were ripped out,
The glass screen protector was a bit of a mission to paint. I messed it up the first time and had to use paint thinners to clean it down. I then installed the screen and sensors so I could mask exactly where the screen and sensors were. It was then just a case of spray painting the backside with a few coats of matte spray paint and hey-presto! The finished look is truly amazing and professional.
▲TopScreen
Wells Gardner 26" LCD Arcade Monitor (www.wellsgardner.com)
This is a really sweet industrial grade monitor with DVI and VGA inputs, it came with mounting brackets and has awesome backside cooling. Best part is I got it cheap second hand on ebay!
It supports 1366x768 res as well as a variety of different resolutions - Perfect for quick changing in and out of games.
I mounted the gun's 5v infrared LED sensor bars horizontally above and bellow the screen and wired them all up. I found this gave me the best accuracy and didn't interrupt with the brackets.
▲TopPeripherals
▲TopCoin mechanism
I really wanted a fully functional coin slot for my arcade, which as it turns out isn't that commonly done with a PC. It was reality easy to find an electronic mechanism, but I wanted a fully programmable one that can take Australian currency or tokens.
The
Electronic multi-coin slot (www.arcadegamingaustralia.com.au) was a clear choice but tricky to get working correctly as it didn't seem to come with any instructions! It was also only 2/3 the height of the pre-cut door hole, which was a bit annoying. I screwed it in nice and secure and cut a slot for a piece of metal mesh to fill in the hole. All in all, looks pretty neat and gives me an excuse for another cold cathode light.
After tinkering blindly for a while and emailing a number of suppliers, I finally found some documentation online and got it accepting Australian currency (and my elecTRONica tokens!).
It was relatively simple to interface the negative pulse output to the keyboard circuit with a simple clicky 12v relay (thanks JayCar!) and a bit of cable.
▲TopExtra buttons
I got a cheap USB num-pad from eBay, stripped it down and traced a few of the keys back to main board. I used a hole-saw to install the jumbo buttons and soldered them directly to the board and connected the 12v LED power sources.
After I tested the outputs, I then ran wires to the coin slot relay and hey presto!
▲TopUSB relay
This 'lil sucker can turn on or off virtually any device! Pretty fun to play with, but has some real practical usages for this project too.
After playing around a bit, I decided that during game play it should: - turns off marque lights and controller attraction lights (to reduce glare) - enable coin-slot mechanism (so it doesn't take money before you get into a game) - turns off blinking 'enter game' light button and turn on 'exit game' button LEDs
▲TopUSB Inputs
- X-Arcade tankstick (the main arcade controllers and mouse ball)
- 2x NES USB controllers
- 2x SNES USB controllers
- 2x USB EMS TopGun light-guns
- Hidden and locked away keyboard (for future development and debugging)
▲TopSoftware
▲TopOperating System
- Ubuntu 11.04 (Natty)
http://www.ubuntu.com/
- Fluxbox windowmanager
http://fluxbox.org/
- Wah!Cade front-end
http://www.anti-particle.com/wahcade.shtml
▲TopEmulators
Groovy M.A.M.E. 1.4.2 (mame.groovy.org) - Arcade games
- Pretty straight forward set-up, that is once I figured out how to
fix rom dependency issues (advancemame.sourceforge.net). Best part is GroovyMame has no nag screens and supports high-score saving!
mame.ini
- Pretty straight forward set-up, that is once I figured out how to
fceu (www.fceux.com) - NES
- Fiddled around with newer forks, but ended up using v!!!! as it's more command-line based and supports multiple inputs for a single button (ie: joysticks and USB controllers simultaneously)
ZSNES (www.zsnes.com) - Super Nintendo
- A truly fantastic snes emulator. It supports multiple controllers, is really easy to configure and always plays smooth.
Osmose (bcz.asterope.fr) - Sega Mega System
- Turned out to be a pain in the ass to get running nicely. It appears that there is no way to pass a rom via command line and looking at the source code didn't help much either. I decided to write a quick wrapper using the
xdotool package (www.semicomplete.com) to place the rom URI into clipboard, hit open rom, and paste the address into the dialog. This is all totally hidden from the user and it ends up feeling quite seamless. I tried a number of different emulators, but none of them worked anywhere as well. I also had a problem of exiting the game, it was hard coded to 'ctrl+x', but a quick search & replace of the source code fixed that too.
- Turned out to be a pain in the ass to get running nicely. It appears that there is no way to pass a rom via command line and looking at the source code didn't help much either. I decided to write a quick wrapper using the
Gens (www.gens.me) - Sega Genesis
- So much easier than the Sega Mega System to get running! Comes with a nice simple configuration UI and does all I need it to do via command line!
ePSXe (www.epsxe.com) - PlayStation
- The only psx emulator that actually supports a gun input, unfortunately the latest version hasn't been ported to linux - luckily it runs great under window mode wine with the help some xrandr and fluxbox .app magic.
DosBox (www.dosbox.com) - Dos games
- Love some dosbox. All the DOS games I tested worked like a charm and I set-up a quick exit key by mapping the esc key to 'shutdown'. I used a neat package
http://rejoystick.sourceforge.net to easily change joystick inputs to keys (as many old PC games don't allow key remapping).
- Love some dosbox. All the DOS games I tested worked like a charm and I set-up a quick exit key by mapping the esc key to 'shutdown'. I used a neat package
WINE (www.winehq.org) - PC Games
- I wanted to run some classic Windows games too, wine rocks and did most of the heavy lifting for me. I applied some no-cd cracks to get everything running smoothly and once again used rejoystick to map keys.
▲TopCustom Software
▲TopLCDTopGun Module
Download:
topgun-0.2.2.tar.bz2
This wasn't too difficult to update kernel 2.6.38-8-generic, the
original code (ronwarez.com) was based on the xbox controller module for 2.6.24 - so I simply compared versions and updated it. The only downside is that it is coded to work as a joystick, not a mouse. MAME likes joysticks as light guns, but every other emulator seemed to want it differently - but we'll get to that later. :)
▲TopStart-up Script
Upon starting of the window-manager, I wanted the UI to start automatically so I wrote a quick script to automate everything. I actually run it in a 'while [ 1 ]' loop (so it keeps running)
It also does a couple extra things, like probing joystick modules and setting the default emulator back to MAME.
Download:
bloodcade.sh
#!/bin/bash # reset joystick IDs sudo rmmod joydev; sudo rmmod usbhid; sleep 1; sudo modprobe joydev; sudo modprobe usbhid; # disable screen saver xset -dpms; xset s noblank xset s off wahcade_ini="/home/bloodcade/.wahcade/wahcade.ini" unclutter -root -idle .5& killall mame_relay.sh -9 #mame_relay.sh menu& #/usr/local/bin/coin.sh& amixer set PCM 90% killall mame_kill_inactive.sh -9 #/usr/local/bin/mame_kill_inactive.sh& while [ 1 ]; do # set mame as default cat "$wahcade_ini" | grep -v current_emulator > /tmp/wahcade.ini; echo "current_emulator mame" >> /tmp/wahcade.ini; cp /tmp/wahcade.ini $wahcade_ini killall mame -9 killall wahcade -9 killall python -9 sleep 2 strip_brackets_wahcade.sh wahcade done
▲TopEmulator wrapper
I wanted to be able to call a bunch of stuff before and after a game starts. Like change the resolution, pass different configurations and call external applications.
It's written in bash and each different emulator is actually a symlink to the main script. Pretty easy as you can write 'snes.sh rom_uri' and it will do all the work for you. Quite handy indeed!
Download:
emu.sh
#!/bin/bash
emulator=`basename $0 | awk -F. '{ print $1 }'`
use_gun=1
gun_w=0
gun_h=0
gun_mode="absolute"
gun_device='/dev/input/by-id/usb-0b9a_016a-joystick'
res="0"
run=""
free_play=0
num_of_coins=5
emu_time="/tmp/emulate_time"
time_thresh=2
# dont let it run too fast
if [ -f $emu_time ]; then
now=`date +%s`
b4=`cat $emu_time`
diff=`calc $now-$b4`
if [ $diff -lt $time_thresh ]; then
# killall wahcade -9
# killall python -9
date +%s > $emu_time
exit
fi
fi
######## PARSE OPTIONS #########
# start emulator
case $emulator in
"mame" )
free_play=1
use_gun=0
run="cd ~/emulators/mame/mame_142; ./mame $*"
;;
"snes" )
run="zsnes -m \"$*\""
;;
"nes" )
#num_of_coins=2
res="640x480"
run="aoss fceu -sound 1 -fs 0 -opengl 1 \"$*\""
;;
"sms" )
# put int clipboard
echo "$*" | xclip -i -selection clipboard
run="eval \"sleep 1; xdotool key ctrl+o; sleep .2; xdotool key ctrl+v BackSpace Return;\"&"
run="$run aoss ~/emulators/Sega\\ Master\\ System/osmose/osmose"
# xmessage "$run"
;;
"genesis" )
run="gens --enable-sound --fs --quickexit --disable-message --game \"$*\""
;;
"pc" )
run="sh \"$*\"";
;;
"psx" )
gun_w=400
gun_h=300
gun_mode="relative"
#res="1024x768"
# hack to get gun working
run="eval \"sleep 10; xdotool key F5; xdotool key F5;\"&"
run="$run eval \"sleep 10; xdotool key F5; xdotool key F5;\"&"
run="$run cd ~/emulators/psx/epsxe1.7; wine ./ePSXe.exe -nogui -loadiso \"$*\""
;;
"wii" )
run="dolphin-emu -b -e \"$*\""
;;
"n64" )
run="mupen64plus --nogui --fullscreen \"$*\""
;;
esac
xdotool mousemove 1600 1200
killall mame_relay.sh
mame_relay.sh game
######## C.R.E.A.M. #########
if [ "$free_play" -lt 1 ]; then
xterm -geometry 0x0-0-0 -e "/usr/local/bin/wait_for_coins.sh $num_of_coins $$"
mame_relay.sh paid&
# hide cursor
xdotool mousemove 1366 768
fi
######## START GAME #########
killall mame_relay.sh -9
xrandr -s "$res"
if [ "$use_gun" -gt 0 ]; then
#xterm -geometry 0x0-0-0 -e "while [ 1 ]; do /usr/local/bin/joymouse -i /dev/input/js0 -t $gun_mode -w $gun_w -h $gun_h; done"&
/usr/local/bin/joymouse -i "$gun_device" -t $gun_mode -w $gun_w -h $gun_h -o /tmp/gun&
fi
echo $run
eval $run
killall joymouse
######## STOP GAME #########
# reset display
xrandr -s 1360x768;
# relays for menu
killall mame_relay.sh -9
killall xterm -9
mame_relay.sh menu&
date +%s > $emu_time
To install the script and links, enter the following:
$ cd /usr/local/bin; $ wget joeltron.com/bloodcade_files/emu.sh; $ ln -s emu.sh mame.sh; $ ln -s emu.sh snes.sh; $ ln -s emu.sh nes.sh; $ ln -s emu.sh sms.sh; $ ln -s emu.sh genesis.sh; $ ln -s emu.sh pc.sh; $ ln -s emu.sh psx.sh;
▲Topgun2mouse
Download:
gun2mouse-0.1.tar.bz2
This was sure annoying, but unfortunately necessary to get the guns working how I wanted in all emulators. I played with some mouse emulators like
joymouse (sourceforge.net) and
swinput (freshmeat.net), but I wanted something that I could execute and stop whenever I wanted and would allow me to pass different virtual resolutions and odd hacks. I decided to heavily modify
joymouse (sourceforge.net) and make it use xlib.h and XWarpPointer instead of outputting to a fifo (which isn't supported by newer Xorg servers).
Basically it works in two modes:
- relative - ePSXe needs relative mouse movements. It remembers the last joystick position and compares it to current one, it then moves the mouse by that difference.
- absolute - works just like a touchscreen. It figure out what distance from the middle of the screen you are at and moves the cursor to that position.
▲TopDecals
▲TopSide Art
I got some really awesome vinyl stickers from
Blik (www.whatisblik.com), they were easy to apply and give it a really cool look without spending anywhere near the same amount of money as a full vinyl digital print.
I had loads of fun arranging them all and designing my own levels, but just remember to tape them in place first as they are really hard to move once stuck down!
▲TopMarque
Nice and easy digital vinyl sticker - it doesn't get much simpler than this, just print and stick on some perspex. I wired up four 12v mini-fluro lights for an authentic back-light fee. It really does look just like the real thing.
▲TopX-Arcade
The trickiest part of re-skinning the controllers was getting the exact measurements, I tried measuring it and tried taking photos - but I eventually resorted to stripping it down and scanning it in piece by piece.
Removing the glue off the joystick buttons was a pain, but after a couple of them I got it down. I took a bunch of DSLR pics so I could remember where all the wires went. I gues I could have labeled all the wires, but I find pictures are easier.
I spoke to my friendly local printer and got it the designs printed onto some really heavy duty laminate that they normally use on tiles! It's tough indeed and perfect for the laying over the controls.
▲TopMoney Spent
- Enclosure and arcade controlls. $1300 shipped
- LCD Screen. $400
- Coin slot. $100
- Extra buttons. $45
- Enclosure decals. $110
- Marquee and controller decals. $130
- Light-guns (pair). $150
- USB joypads. $100
- USB numpads. $15
- Spray paint/screws/misc parts. $100
- 100+hrs tinkering... priceless.
Total has been around $2,500, give or take as I already had all the computer parts and cables laying around. If you ask me, worth every cent!


_800.jpg)
_807.jpg)
_795.jpg)
_798.jpg)
_802.jpg)
_805.jpg)
_803.jpg)
_796.jpg)
_804.jpg)
_797.jpg)
_806.jpg)
_801.jpg)
_799.jpg)
