Pi2Jamma turns your arcade cab into full emulation machine based on the famous Raspberry Pi:
- native 15 khz video output,
- direct lagless controls
- sound amplifier with volume control
- video amplifier for great colors
- 6 Button Support for each player
- Jamma interface
- Pixel perfect resolution setting on the fly
ReGamebox is the image distribution which is best to use with Pi2jamma and Pi2scart.
ReGamebox has the following features.
- Backup solution
- Key Setting,
- Video Settings,
- Emulators Configurations
- Export and import of configuration files
- Support of USB sticks and HDs
- Access via SFTP, SSH, Samba and Shell
- Custom pixel perfect resolutions for all console emulators
- Support of horizontal and vertical screen with automatic generation of game lists.
- Video snaps in advmame
- Snaps for all other emulators
- Dynamic Resolution Switcher Algorithms for Arcade Games
- Patch Management System
- Reboot and Shutdown Procedurs
- Support of thousands of games
- Game Menu is developed for display at 15Khz and low resolutions.
- Dozen of themes
- backgound music
ReGamebox Software write to SD Card
Console Image 20170427
copy to usb stick and put your roms
USB Stick for Console Image 20140304
- Pi2Jamma Installation
- Pi2Jamma Hardware
- Pi2Jamma Enclosure
- ReGamebox Software Image
End of content table.
- Pi2Jamma PCB
- Stock Audio Cable for Pi2Jamma
- SD Card for Raspberry Pi
- Raspberry Pi 3
- USB Stick
- Windows Tool Win32diskimager
- Download Software Image (see above)
Step 1. Insert SD card to Raspberry Pi
Step 2. Insert USB Stick to Raspberry Pi
Step 3. Plug Audio Cable to Raspberry Pi
Step 4. Plug Raspberry Pi to Pi2jamma
Step 5. Plug Audio Cable to Pi2jamma
Step 6. Plug Pi2jamma to your Arcade Cab
You should see menu booting up. Congratulations you can now start copying your roms to the USB Stick.
The Pi2Jamma comes with a GPIO female connector and will be plugged directly on the Raspberry Pi.
The Pi2Jamma has a Jamma Interface. The Jamma harness will plugged on the Jamma connector without any modification on the cab. Parts side is the top Side.
For Audio the stock audio cable will be plugged to the audio connector of the Pi2Jamma and Raspberry Pi.
Volume control is on the black potentiometer on the Pi2Jamma. Adjust it to your needs.
Button 4, 5 for both Player is on Jamma Connector Pin 25 and 26 and bottom side. Bottom 6 for both players is available on the screw terminal. The screw terminals has also one GND.
Raspberry Pi is powered via Jamma. Again, there’s no need for extra power, just Jamma interface. Raspberry Pi has over voltage protection.
ReGamebox Software Image
ReGamebox is based on the Arch Linux OS.
Emulators and Roms
It supports :
- PC Engine
- Atari 2600
- PC Engine CD
- SEGA CD
- Master System
- Game Gear
- Sega 32x
- N64 (experimental)
- NEC supergrafx
All roms are stored on USB Stick folder. On windows a USB Stick is listed as normal drive. Please format as fat32 or extfs. The downloaded image contains the files needed for the USB Stick. Search the folder rpi2jamma and copy this folder to the USB Stick.
Next copying of roms is described. Please copy roms to rpi2jamma/ plus the folder name in the table below.
i.e. Copy roms for atari2600 to folder rpi2jamma/roms/atari2600″ on USB stick. In the Pi2jamma distribution the path for the USB Stick is /mnt/sda.
|AdvMenu||roms/advmame||Front end AdvMame|
|Genesis||roms/genesis||Genesis Plus GX|
|Megadrive||roms/genesis||Genesis Plus GX|
|Master System||roms/mastersystem||Genesis Plus GX|
|Sega CD||roms/segacd||Genesis Plus GX|
|Gamegear||roms/gamegear||Genesis Plus GX|
For Rom Set information refer to https://github.com/retropie/retropie-setup/wiki/Managing-ROMs
Do check the correct rom set speccification. Roms will be scanned on each start of system. The game menu shows the roms according the roms in your rom folders.
For emulator specific setting refer to emulator documentation.
For NES emulator the alternative nestopia exists. Use rom folder nestopia for using this this emulator.
For Megadrive emulator the alternative picodrive exists. Please adjust in autostart_test.sh if you want to to use this emulator.
The N64 is experimental and not good enough for playing.
Arcade Rom Versions
- Mame4All and Mame2000 – 0.37b5
- Mame2003 – 0.78
- AdvMame – 0.106
- FBA2X – 0.2.96.71
- lr-fbalpha – 0.2.97.39
For downloading rom set basic knowledge of using zip files and torrent downloads is needed.
The following console emulators require bios files to operate.
- FDS – DISKSYS.ROM
- PC Engine CD – SYSCARD3.PCE
- Sega CD – bios_CD_E.bin, bios_CD_J.bin, bios_CD_U.bin
Place these bios files in their respective rom folders.
Dynamic Resolution Switching
DSR is offered for piFBA and mame4all. It works with two tables. One table is deduced from the emualtor and roms. One table maps the games resolution to the best resolution for your CRT and rpi. This table can be found in /root/res_table.txt. If you want to add or improve resolutions, then use this table.
Options and Themes
In section some functions are offered that gives you controls for the whole software installation.
- Command Shell : Image starts command shell. Start “/root/autostart_test.sh” to get again to the menu.
- Shutdown : Shutdown System
- Reboot : Reboots System
- Export config : Stores important configurations files like keymapping, retroarch, advmame, front end lemonlauncher config to USB Stick “/mnt/sda/config”. Compressed file is generated “/mnt/sda/config_pi2jamma.tgz”.
- Import config : Restores config from “/mnt/sda/config_pi2jamma.tgz”. Take care. This can mess up your system of course. Old configs will be backed up in /mnt/sda/backup_config
- Edit *.config : Various configs can be edited directly with the onbaord editor nano. Save with CTRL + x. Keyboard is needed.
- Backup : Whole Image will be backed up. The system files without roms of your USB Stick will be backed as well. All files will be copied as image file to “/mnt/sda/export_pi2jamma.tgz”
- IP Adress : If you connnected your rpi to network, this shows the ip.
- Toggle H/V changes the orientation settings for your CRT on the fly.
- Custom Resolutions see extra sections
- Lock and Unlock mode : This mode lock the ESC key and options shortcuts from the keyboard layout. Take this option if you want to run only one game and user should not change any setting, ie cabs in your store or public.
- Admin or Gamer mode: Admin mode has all options and themes. Gamer mode has only emulators. This is for hiding all the configuration features from users. Ie for your game party. If you put your setup in game mode you need to modify file game_mode to admin_mode on your USB Stick in folder rpi2jamma to get again admin features.
- PI2SCART Mode : This mode disable the emulators piFBA and Mame4all since the only run with direct controls.
In the root folder is a file called custom_resolutions.txt . This table contains hdmi_settings for various resolutions. The best resolutions will be cho0sen for your emulator.
Resolutions can be added to the Optionmenu and select the resolution you want and it will be set for the system. This list can extended of course. Add your desired in the custom_resolutions.txt and add a menupoint in /root/.lemonlauncher/games_options.conf
Another nice resolutions can be achieved by taking this hdmi_timings settings:
hdmi_timings=1600 1 115 150 170 240 1 4 3 15 0 0 0 60 0 32000000 1
for arcade setups
hdmi_timings=1536 1 115 150 170 224 1 4 3 15 0 0 0 60 0 32000000 1
Sir Ironic posted in our “free the raspberry pixel clock!” following resolutions.
hdmi_timings 450 1 50 30 85 288 1 10 1 25 0 0 0 60 0 9600000 1
hdmi_timings 1920 1 152 247 280 224 1 13 8 19 0 0 0 59.186 0 40610000 1
hdmi_timings 1920 1 158 250 286 232 1 4 3 23 0 0 0 59.94 0 41060000 1
hdmi_timings 1920 1 152 247 280 240 1 1 7 14 0 0 0 60 0 40860000 1
hdmi_timings 1920 1 132 247 280 288 1 3 3 18 0 0 0 50 0 40240000 1
hdmi_timings 1920 1 48 192 240 240 1 3 3 16 0 0 0 59.92 0 37680000 1
hdmi_timings 1920 1 48 192 240 288 1 6 3 16 0 0 0 49.70 0 37340000 1
hdmi_timings 1920 1 158 200 286 240 1 1 8 13 0 0 0 60.10 0 40380000 1
hdmi_timings 1920 1 158 200 314 240 1 23 6 43 0 0 0 50.01 0 40450000 1
hdmi_timings 1920 1 160 200 286 224 1 9 8 21 0 0 0 60.10 0 40410000 1
hdmi_timings 1920 1 158 200 314 239 1 25 6 42 0 0 0 50.01 0 40450000 1
hdmi_timings 1920 1 180 192 334 262 1 14 15 22 0 0 0 50 0 41200000 1
224p x 60Hz
hdmi_timings 1920 1 152 247 280 224 1 8 7 23 0 0 0 60 0 40860000 1
240p x 60Hz
hdmi_timings 1920 1 152 247 280 240 1 3 7 12 0 0 0 60 0 40860000 1
216 x 60Hz
hdmi_timings 1920 1 152 247 280 224 1 8 7 23 0 0 0 60 0 40860000 1
192 x 60Hz
hdmi_timings 1920 1 152 247 280 224 1 8 7 23 0 0 0 60 0 40860000 1
256p x 55Hz
hdmi_timings 1920 1 100 320 260 288 1 1 3 1 0 0 0 55 0 41900000 1
hdmi_timings 1920 1 100 320 260 254 1 1 3 36 0 0 0 53.20 0 40670000 1
hdmi_timings 1920 1 50 250 250 250 1 8 10 8 0 0 0 58.97 0 38750000 1
hdmi_timings 1920 1 50 250 250 260 1 4 5 8 0 0 0 55.72 0 38130000 1
For retropie good experience was made with this setting (advanced user only)
vcgencmd hdmi_timings 1600 1 115 150 170 240 1 4 3 15 0 0 0 60 0 32000000 1
tvservice -e "DMT 87"
fbset -depth 8 && fbset -depth 16 -xres 1600 -yres 240
vcgencmd hdmi_timings 320 1 23 25 39 240 1 4 3 15 0 0 0 60 0 6400000 1
tvservice -e "DMT 87"
fbset -depth 8 && fbset -depth 16 -xres 320 -yres 240
Themes can be selected in the section themes and will be installed on the fly. There is a test theme for adjusting your Arcade TV.
Here are some examples
The test section is for finding the correct button mapping. Since Pi2Jamma deals now with loads of stand alone emulators plus retroarch cores, special attention is needed for button mapping. Thus we added for a test section. The test section needs the rom “sf2ce”, because this rom is a 6 button game. The following emulators are listed :
- Find the service menu with “P1 coin + P1 start + P1 Button3″
- Find the service menu with key F1, Go to list of previously played games>options>game mode = test
- Key F2
- Key F2
For all emulators a common key layout is used
- Player 1 Start + Player 2 Start = ESC (Quit Game)
- Player 1 Up = Arrow Up
- Player 1 Down = Arrow Down
- Player 1 Left = Arrow Left
- Player 1 Right = Arrow Right
- Player 1 Button 1 = LEFT CTRL
- Player 1 Button 2 = LEFT ALT
- Player 1 Button 3 = SPACE
- Player 1 Button 4 = LEFT SHIFT
- Player 1 Button 5 = Z
- Player 1 Button 6 = X
- Player 1 Start = 1
- Player 1 Coin = 5
- Player 2 Up = R
- Player 2 Down = F
- Player 2 Left = D
- Player 2 Right = G
- Player 2 Button 1 = A
- Player 2 Button 2 = S
- Player 2 Button 3 = Q
- Player 2 Button 4 = W
- Player 2 Button 5 = I
- Player 2 Button 6 = K
- Player 2 Start = 2
Player 1 Start + Player Start 2 + Player 1 Button 1 = F1 (Service Menu) Player 1 Start + Player Start 2 + Player 1 Button 2 = F2 (Service Menu) Player 1 Start + Player Start 2 + Player 1 Button 3 = TAB (Settings Menu) Player 2 Start + Player 1 Button 1 = F12 (Menu C64, Filter ADVMAME)
- Player 1 coin + Player 2 Start = 6 (Coin Player 2)
- Player 1 Start + Player 2 Start + Player 1 up = 5 (Coin Player 1)
piFba and m4all do work with direct controls and the exit key is hard coded : coin+p1start+p1down
C64 and similar home computers needs extra settings. To change this settings go to options – edit keys.
Background Music is played when started. If a USB Stick is used, then check folder USB Stick rpi2jamma/menu-audio
All the items in playlist file arcade.pls are played. Add your music mp3 files in this folder and add them to the playlist file. Player app used is mpg123
Turn Off Background Music in Options – Toggle Music
A splash screen is loaded on startup. Find this file on /root/pleasewait.png.
Implementation via splash.service file
Description = Splashscreen during boot
ExecStart=/bin/sh -c ‘fbv /root/pleasewait.png’
This /boot/cmdline.txt is used
root=/dev/mmcblk0p2 rw rootwait console=ttyAMA0,115200 console=tty9 selinux=0 plymouth.enable=0 smsc95xx.turbo_mode=N dwc_otg.lpm_enable=0 kgdboc=ttyAMA0,115200 elevator=noop
Put these files in splash folder on usb stick and use this script splash.sh for installation
#pacman -S fbv
cp /mnt/sda/splash/cmdline.txt /boot
cp /mnt/sda/splash/pleasewait.png /root/
cp splash.service /lib/systemd/system
systemctl enable /lib/systemd/system/splash.service
#Taken from https://natahori.wordpress.com/2013/04/04/silentboot-und-bootsplash-auf-raspberry-pi/
Snaps show a little preview image on lemonlauncher and advmenu. The snaps for lemonlauncher are located on the USB Stick folder rpi2jamma/snaps. The snaps for lemonlauncher are not full screen so a resolution of 140x 105 can be used. For the snaps in advmenu the preview is almost fullscreen, so a higher resolution is recommended. For this snaps use folder rpi2jamma/roms_advmame/snap
Find below new 4443 Images for NES, SNES, MegaDrive, Atari2600, Sega32x, GamesGear, Genesis, Master System, PC Engine
NES, 1271 Images
SNES, 973 Images
Atari 2600, 349 Images
Sega 32x, 36 Images
Mega Drive, Genesis, 948 Images
GameGear, 293 Images
MasterSystem, 312 Images
PC Engine, 261 Images
Patches must be copied to USB Stick in folder “rpi2jamma”. Plug in usb stick, start your arcade machine. Patch is executed automatically by ReGamebox. After installation the patch will receive the file name addition “done”.
Creating own patch. Create the folders and file you want to patch. Compress the files to tar and gzip format using 7zip or similar programs. Patch name extension name is .tgz
Find here a patch for fixing game emulator exits and blurry advmame screen.
Q: It seems that Raspberry has a minimum pixel clock value of 31.25 MHz on the DPI interface. Can you confirm?
A: We use different resolutions according to the game that is played. Common resolutions are 320×240 at 50 or 60 hz. Pixel clock of 6.400.000 or 9.600.000 can be choosen, but nothing inbetween.
Q: What the heck about this resolution and pixel perfect display?
A: The resolution of an arcade game is different from game to game. Some games don’t display at a true 15khz and therefore won’t display a picture. What the dsr tool does is set the pi output to match the game as close to the original hardware as possible. Arcade hardware also made use of the overscan to increase there horizontal pixel count and tweaked the vertical sync to display more lines. The point of it is to display the games as true to original hardware as possible. Because the pi doesn’t output all the resolutions natively if it’s set to say 320×240 @ 15khz any game with a different resolution displays a blank screen the dsr fixed that issue and also allows the resolution to change without a reboot.
Q: How does the dynamic resolution switching works?
A: We work with two tables. One table is deduced from the emualtor and roms. One table maps the games resolution to the best resolution for your CRT. This table can be found in /root/res_table.txt. If you want to add or improve resolutions, then use this table.
i.e. m4all: file named “m4all_games_res.txt”..
344×240@60;hdmi_timings 506 1 8 44 52 256 1 6 10 6 0 0 0 60 0 9600000 1
ie : for Gauntlet
336×240@60;hdmi_timings 506 1 8 44 52 240 1 6 10 6 0 0 0 60 0 9600000 1
Q: Is it possible to map your gpio interface to keyboard events?
Q: How to change keyboard leayout?
A: To change keyboard layout edit this file:
That’s for British input. Use ‘us’ for American.
Q: Vertical mode is flipped. How can I change orientation of display ?
A: in /boot/config.txt add one of this option.
display_rotate=1 90 degrees
display_rotate=2 180 degrees
display_rotate=3 270 degrees
display_rotate=0x10000 horizontal flip
display_rotate=0x20000 vertical flip
Q: Which fs types will be supported for the USB Sticks
A: fat32, exfat
Q: Is ssh possible?
A: Login with use x pass y, change to su pass root
Q: CPS has a pixel clock of 7Mhz. Is is supported natively?
A: Rpi has 6,4 and 9,6 Mhz. Important is to get as close as possible to the V-fequency, because this defines the speed of the game. By adjusting the V-Freq ie. for R-Type one can get very close to 55hz, and this is the exact gameplay. See above question for dynamic resolution switching, how to configure the resolution and V-freq. We’re have retrieved the best values using an o-scope.
Ie. R-ytpe /opt/vc/bin/vcgencmd hdmi_timings 506 1 8 44 52 264 1 6 10 6 0 0 0 60 0 9600000 1
is giving 55hz measured with o-scope.
Q: How does this game menu work?
A: Look at directory /root
.lemonlauncher -> .lemonlauncherH
lemonlauncherH == Horizontal Config
lemonlauncherV == VerticaleConfig
file .lemonlauncher is a link on one of both. link will be set with startup script according orientation set.
Make your changes to .lemonlauncherH and .lemonlauncherV .
Q: How to wifi?
A: Edit /etc/netctl/wireless-home is needed
/etc/netctl# nano /etc/netctl/wireless-home Description='A simple WPA encrypted wireless connection' Interface=wlan0 Connection=wireless Security=wpa IP=dhcp ESSID='MyNetwork' # Prepend hexadecimal keys with \" # If your key starts with ", write it as '""<key>"' # See also: the section on special quoting rules in netctl.profile(5) Key='WirelessKey' # Uncomment this if your ssid is hidden #Hidden=yes
WirelessKey as needed.
Proceed with start :
# netctl start wireless-home
To make this network start on boot:
# netctl enable wireless-home
Find out your ip adress with ifconfig. It should start with 192.168.x.x. Take care if you use cable connection eth0 or wlan wlan0.
Q: How to play vertical games on a horizontal monitor in AdvMame?
A: Open shell, type “nano root/.advance/advmame.rc” or options – command shell
Add the following line:
To do it on a per game basis:
Q: How is the joystick mapped?
A: Start options – Edit Keys -configuration files is in /etc/pikeyd165.conf
Q: Is there a documentation to edit retroarch.config
A: Look here
some nice forum posts
For core dependent control remapping read this
This may also help (input remapping is outside of the retroarch.cfg files)
Q: how to change to USB Joystick for retroarch emulator. A: Start retroarch emulator core like lr-fbaalpha, snes or other. Change to menu with F1. Apply your settings.
Changes in Image
New background music loop
New splash screen
Option background audio on and off
Pi2scart mode with ghost key fix
New emulators mame 2003, mame 2000 retroarch core, picodrive for 32x and Megadrive , nestopia, , n64 experimental, nec supergrafx
New game menu sort order
Bug fixes on themes
Retroarch pixel theme icons fixed
Coin hotkey is start and joystick up
- Splash Screen
- Background Audio
- New Keyboard Layout (exit is Start P1 and Start P2)
full names for advmame
- lr-alpha esc fixed
- snaps for advmame
- snaps for themes
- Exports with date stamp
- Game and EMU Escape now Start1 plus Start2
- fixed Player Button4 issue
- Samples for advmame and m4all
- reworked Vertical settings
- added 10 new themes simple, lava and yellow, mashup-1, mashup-2, marioinvaders, tron arcade, tron flynn, forge-vert, simple-vert. We now have about 30 themes
- added toggle hv without reboot. See options
- no consoles in vertical mode, because all consoles will play horizontal
- admin and game mode
if on USB Stick folder rpi2jamma file admin_mode exists, then options will be shown
if on USB Stick folder rpi2jamma file gamer_mode exists, no options will be shown
- pi2scart mode: no emulators with direct controls are in the list
- test version for mame2003
- fixed pikeyd165 loop
- fixed saving of temp files in rom folders
- Gamelister with parameter files and filter lists for advmame and lr-fbaalpha
- Support for AdcMame 3.1
- snaps on sd card
- pi2scart function
- added package mame2003(test), fbv, joy2key, midnight commander (mc)
Console image version 20170129
resolution 240p corrected
resolution scart fixed
reworked resolutions section
added resolution Mark
add in option the point “edit key config” making own key layouts
reworked themes. for own just add themes in /root/themes/themes and games_options.conf
reworked rom startup
new themes outrun v2, internaional karate, ps wide and align
reworked c64, p1start = F12, P1B1 = ENTER. emulator quit without keyboard
installed wifi support wpa_supplicant
samples copied to /root/.advance/sample, added this path to mame4all
made pixel perfect settings for lr-fbalpha
alpha sorting corrected. Joy left or right plus P1B3 jumps letter