Arcade Machine
Projects | |
---|---|
Participants | Control-k, Maijin, Realitygaps, Wizzup |
Skills | Programming |
Status | Active |
Niche | Software |
Purpose | Fun |
We now own an Arcade Machine. The plan is to bring new life into the machine by putting a computer in there and hooking that computer to the joystick input and screens. The computer runs MAME and other emulators, such as Amiga or SNES emulators.
Contents
Getting it to start
There's a basic Dell machine in the Arcade Box; with Wake on Lan. Just send the WOL packet to the right mac address, which can be found on the machine:
00:21:70:03:31:1b
Here is an example command line that will turn on the machine (etherwake defaults to eth0, so wlan0 is specified)
sudo etherwake 00:21:70:03:31:1b -i wlan0
Or, equivalently:
wakeonlan 00:21:70:03:31:1b
From: http://gsd.di.uminho.pt/jpo/software/wakeonlan/
Power button
The button next to the coin slit is now also a power button.
Input
Arcade Machine input
The input can be read as PS2 (and USB); using a chip that we got alongside the Arcade Machine:
http://www.ultimarc.com/jpac.html http://www.ultimarc.com/jpac2.html
The Arcade Machine input exposes itself as a single keyboard over USB and PS/2. This is problematic for most games, with the exception of MAME and a few emulators. Some games expect an input device per player, so one "keyboard" then simply is not enough.
More straight forward scripts will be provided to change de input mapping at a later time; for now, read on.
Other Input
We attached two PlayStation controllers, but I (Wizzup) am not a big fan of them. Regardless, there's a USB hub so feel free to plug in other controllers! It would be nice to have proper SNES ones.
This may be useful: https://www.thinkgeek.com/product/f08d/ and http://www.amazon.com/Classic-USB-Super-Nintendo-Controller-PC/dp/B002JAU20W Or we can make our own.
Coin Input
This should be handled by the Input over PS2/USB as well. It is probably mapped to some a key.
Video
We replaced the built-in monitor with a TFT monitor.
Sound
The sound works and is connected to the computer as well.
Common tasks
There are a few simple tasks until we've written a pretty interface + set of scritps.
It mostly boils down to two tasks:
1) disable/enable the "keyboard" interface in X (to avoid double input):
~/disable_*.sh or ~/enable_*.sh
2) start/stop uinput-mapper with the right configuration:
sudo input-read -D /dev/input/by-id/usb-Cypress_I-PAC_Arcade_Control_Interface-event-kbd | sudo input-create configs/techinc.py
And just hit ^C to stop it.
Games (with instructions)
Super Hexagon
Just start it from the menu
Jamestown
Disable the "keyboard" interface; enable uinput-mapper with techinc.py configuration
Emulators
- ZSNES (SNES)
- UAE (Amiga)
- MAME
- ...
Writing our own input driver
Axes to axes, Buttons to buttons
Code: https://github.com/MerlijnWajer/uinput-mapper
For instructions, see: http://hetgrotebos.org/wiki/uinput-mapper
And the techinc.py config can be viewed online:
http://googleco.de/uinput-mapper/tree/configs/techinc.py
Map:
- Creates two joystick input devices in /dev/input
- Both joystick devices are mapped sanely.
- HAT0X / HAT0Y seem to work now that we specified absmin and absmax.
Keys are mapped like this:
HAT -> HAT0X, HAT0Y Red Buttons, left to right: BTN_0, BTN_1, BTN_2 Yellow Button: BTN_3
User Interface
There is a custom menu for the arcade machine, it should start automaticly. You can use the left joystick to choose a game/program. Press the most right button of player 1 to start it. For games that are not added yet, xterm is also in the menu.
If the menu is closed and you want to start it, the python script is in "/home/techinc/arcade/game.py", run it using python2.
Adding programs
You can use the supllied GUI in the menu, it will ask some questions. You can either choose a file to run or insert a custom command Then it asks for a name and descition Finaly, you will need a picture, you can use the standart questionmark, insert a file or taka a screenshot. When you take a screenshot, the command will be executed (so make sure it is alright) and after some seconds scrot is used to take a picture.
You can also edit the ~/arcade/gamelist.conf file for more flexebilety.
Removeing a program can be done by pressing [DEL] in the main menu while you have the program selected.
Sometimes things go wrong when adding games, specifecly while adding a screenshot, this can make the menu crash. You can fix it by removing the broken entry from ~/arcade/gamelist.conf manualy.
Games
List of games:
Native
- superhexagon
- Jamestown (works with joysticks)
- Syobon (not yet! Ubuntu didn't have it in their repo ☹)
Amiga
In UAE, just add the games as floppies.
- SWIV (Great shoot them up game)
- Pinball Fantasies
SNES
...
in general
Let's not overload the console with ALL MAME games, make a selection and allow people to make wishes, otherwise you have clutter
Suggestion: focus on at least 50% co-op games! Fun is best shared! ;)
metal gear, swiv, bubble bobble, alien vs predator, metal slug, ikari warriors, gauntlet, smash tv, TMNT, Rampage, NARC, etc.
anything that makes fun together :)
Other uses
- We can use it to control a variety of stuff. (light, sound)
- We can hook other consoles into it.
- Some kind of game that integrates with the space? interacts with some light / stuff around the arcade machine
- ???
To-Do List
- wheels! Everything that can move is not in the way
-
power and/or reset button - make selection of like 50 MAME games - ask Mailing list for everyone's top-3 nostalgia favorites?
- USB/HID controls vs. input-mapper - Wizzup and Justa have to fight that one out...
- reinstall OS on SSD