Pi2Jamma

Pi2Jamma is a PCB that gives you 15Khz RGB via Jamma interface. It has direct controls, so zero lag. Pi2Jamma offers pixel perfect resolution for some emulators. Resolution will be set on the fly.

Pi2Jamma is available here

Pi2Jamma Software write to SD Card
Console Image 20170304

copy to usb stick and put your roms
USB Stick for Console Image 20140304

Facebook Group Pi2Jamma

 

Contents

End of content table.

Pi2Jamma Installation

Prerequisites:

Hardware

  • Pi2Jamma PCB
  • Stock Audio Cable for Pi2Jamma
  • SD Card for Raspberry Pi
  • Raspberry Pi 3
  • USB Stick

Software

  • Windows Tool Win32diskimager
  • Download Arcade Image (see above)
    • Unzip Arcade Image
    • Write Arcade Image (big file with ending .img) to your SD card.
      Youtube Video
    • copy folder “rpi2jamma” to the top level of your USB Stick.

Installation

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.

Pi2Jamma Hardware

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.

Pi2Jamma Enclosure

3d Printable Enclosure v1 with 2 pcb holes

Pi2Jamma_Enc Pi2Jamma_Enc_01 Pi2Jamma_Enc_02 Pi2Jamma_Enc_03

Pi2Jamma 3D Enclosure for PCB with holes

pi2jamma_enc_4_01 pi2jamma_enc_4_02 pi2jamma_enc_4_03 pi2jamma_enc_4_04 pi2jamma_enc_4_05 pi2jamma_enc_4_06

Pi2Jamma Software Image

Pi2Jamma is based on the Arch Linux OS. We offer two Software Image for your Pi2Jamma.

Console Image

Emulators and Roms

It supports :

  • AdvMame
  • AdvMenu
  • Genesis
  • MegaDrive
  • lr-fbalpha
  • piFBA
  • Mame4All
  • PC Engine
  • Turbografx16
  • C64
  • SNES
  • NES
  • FDS
  • Atari 2600
  • PC Engine CD
  • SEGA CD
  • Master System
  • Game Gear

commodore genesis snes pce tg16 gba arcadeNES atari2600gamegear master system sega cd

All roms are stored on USB Stick folder

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.

System Folder Emulator
AdvMenu roms/advmame Front end AdvMame
AdvMame roms/advmame AdvMame
mame4all roms_m4all mame4all
piFba roms_fba piFba
lr-fbalpha roms/lr-fbalpha lr-fbalpha
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
C64 roms/C64 Vice
PCE roms/pce lr-beetle-pce-fast
PCE CD roms/pcecd lr-beetle-pce-fast
TG16 roms/pce lr-beetle-pce-fast
SNES roms/snes lr-snes9x-next
NES/FDS roms/nes fceumm
Atari2600 roms/atari2600 stella

For Rom Set information refer to https://github.com/retropie/retropie-setup/wiki/Managing-ROMs

Copy roms to the correspondig roms folder on USB Stick. Do check the correct rom set speccification. Roms will be scanned on each start of system.

For emulator specific setting refer to emulator documentation.

Arcade Rom Versions

Console Bios Files

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.

  • rpi2jamma/roms/nes
  • rpi2jamma/roms/pcecd
  • rpi2jamma/roms/segacd

Download the console bios files here

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.

Custom Resolutions

In the root folder is a file called custom_resolutions.txt . his table contains hdmi_settings for the following resolutions

384:224×60 – CPS1 + CPS2 + CPS3
256:192 Sega Master System NTSC
256:224 NES, SNES NTSC
320:224 Sega Genesis NTSC
320:256 Amiga (PAL)
240p
256p
TV SCART
55khz, R-Type and other

Just go with to Option 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

Themes

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

theme_00 theme_01 theme_02 theme_03 theme_04

Test

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 :

  • piFBA
    • Find the service menu with “P1 coin + P1 start + P1 Button3″
  • lr-fbalpha
    • Find the service menu with key F1, Go to list of previously played games>options>game mode = test
  • advmame
    • Key F2
  • mame4all
    • Key F2

Key Settings

For all emulators a common key layout is used

  • 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 1 Button 1 = F1
  • Player 1 Start + Player 1 Button 2 = F2
  • Player 1 Start + Player 1 Button 3 = TAB
  • Player 2 Start + Player 1 Button 1 = F12
  • Player 1 Start + Player 2 Start = ESC

piFba and m4all do work with direct controls. C64 and similar home computers needs extra settings.

Background Music

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

Splash Screen

A splash screen is loaded on startup. Find this file on /root/pleasewait.png.

Implementation via splash.service file

[Unit]
Description = Splashscreen during boot
DefaultDependencies=no
After=local-fs.target
Before=base.target

[Service]
type=oneshot
ExecStart=/bin/sh -c ‘fbv /root/pleasewait.png’
RemainAfterExit=yes

[Install]
WantedBy=getty.target

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

#!/bin/bash
#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

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

Arcade Image

The Arcade Image is the second offered Image for the Raspberry Pi and contains only Arcade Emulators. Please do not use Arcade Image for Pi2SCART.

Download arcade image
Password “arcade-zone”

The Arcade Image offers Mame4all and piFBA. For further features see readme file on USB Stick.

The Arcade Image has three roms folders on the USB Stick

  • rpi2jamma/roms_m4all
  • rpi2jamma/roms_fba
  • rpi2jamma/roms_advmame

Copy your roms in this directories. Take care that your take the correct rom set.

  • Mame4All – 0.37b5
  • AdvMame – 0.106
  • FBA2X – 0.2.96.71

 

FAQ

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”..
..
gauntlet;”Gauntlet”;336×240@60;H
.
.
/root/res_table.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?

A: Yes, use pikeyd https://github.com/mmoller2k/pikeyd . We made a version called pikeyd165. Lib http://www.airspayce.com/mikem/bcm2835/ is needed for that.

Q: How to change keyboard leayout?

A: To change keyboard layout edit this file:

etc/vconsole.conf

KEYMAP=de-latin1-nodeadkeys

Change to:

KEYMAP=gb-latin1-nodeadkeys

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=0 Normal
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

.lemonlauncherH
.lemonlauncherV
.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: goto options -command shell

sudo nano /etc/wpa_supplicant/wpa_supplicant.conf

set your SSID and PASSWORD, save and exit.

sudo reboot

 

Q: How to play vertical games on a horizontal monitor in AdvMame?

A: Open root/.advance/advmame.rc

Add the following line:

vertical/display_ror yes

Disable with:

verical/display_ror no

To do it on a per game basis:

dkong/display_ror yes

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

https://github.com/libretro/RetroArch/blob/master/retroarch.cfg

some nice forum posts

https://retropie.org.uk/forum/topic/3634/core-input-remapping-and-saving-core-retroarch-cfg-files/8

https://retropie.org.uk/forum/post/12587

For core dependent control remapping read this

https://github.com/RetroPie/RetroPie-Setup/wiki/RetroArch-Configuration#core-input-remapping

This may also help (input remapping is outside of the retroarch.cfg files)

https://retropie.org.uk/forum/topic/2199/specific-retroarch-emulator-settings-are-being-over-written-after-i-quit-the-game/24

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 console Image

Version 20170403

  • 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

Changes

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

Comments are closed.