Emulators Collection - jalopezsuarez/piback GitHub Wiki

MAME 0.106 (AdvanceMAME 1.4 RaspberryPi3)

There are a few different version of MAME (Multiple Arcade Machine Emulator) for Raspberry Pi. This release 2006 MAME 0.160 ROMSet (AdvMAME 1.4) performs better with the Raspberry Pi limited resources.

Dependences Libraries

» SDL1 Simple DirectMedia Layer
apt-get install -y libsdl1.2-dev libsdl-image1.2 libsdl-image1.2-dev libsdl-mixer1.2 libsdl-mixer1.2-dev libsdl-net1.2 libsdl-net1.2-dev libsdl-ttf2.0-0 libsdl-ttf2.0-dev libfreetype6

Sources / Repositories

Proceed to create a application folder, download and install:

sudo mkdir /arcade/advancemame
cd /arcade/advancemame
sudo wget http://sheasilverman.com/rpi/raspbian/pi3/advancemame_1.4-1_armhf_pi3.deb
dpkg -i advancemame_1.4-1_armhf_pi3.deb

Revemove Purge Installation

To remove all files use dpkg:

dpkg --purge advancemame
dpkg: warning: while removing advancemame, directory '/usr/local/bin' not empty so not removed
dpkg: warning: while removing advancemame, directory '/usr/local/man/man1' not empty so not removed
dpkg: warning: while removing advancemame, directory '/usr/local/share' not empty so not removed

Configuration / Settings

A configuration file advmame.rc is placed in the ~/.advance/ directory. The file holds a huge list of default settings. We must edit this file to make everything work.

cd ~/.advance/
vi advmame.rc
Default Settings

Set this defaults for all games:

device_joystick raw
display_color bgr16
misc_smp yes
ui_translucency 1
dir_rom /home/pi/.advance/rom:/usr/local/share/advance/rom:/arcade/roms/mame
Improve Save/Load State from Remote Controller

Use the START+X to save state from 8Bitdo Controller, mapping to coin4 key (usually unused) and creating an script to save sate on slot 1. Use START+Y to load state from 8Bitdo Controller, mapping to start4 key (usually unused) and creating an script to load state form slot 1.

input_map[coin4] joystick_button[0,3] joystick_button[0,11]
input_map[start4] joystick_button[0,4] joystick_button[0,11]
script_coin4 simulate_event(ui_save_state,100); delay(200); simulate_key(key_1,100);
script_start4 simulate_event(ui_load_state,100); delay(200); simulate_key(key_1,100);
Monitor TV Display

If the Pi is connected to a HDMI TV or monitor add the following to your settings.

device_video_clock 5 – 50 / 15.62 / 50 ; 5 – 50 / 15.73 / 60

For Pi using a HDMI to VGA converter this setting worked well for me.

device_video_clock 5 – 50 / 15.75 / 50

Data Files Location

mkdir /arcade/roms/mame

Setup Controlles

For advmame I had to change a setting in the advmame.rc to help mame recognize the y-axis. Once set up the gamepad has worked with almost everything I have installed (~/.advance/advmame.rc)

device_joystick raw

Configure HDMI TV and 8Bitdo SF30 controllers stored in configuration file ~/.advance/advmame.rc

device_video_clock 5 - 50 / 15.62 / 50 ; 5 - 50 / 15.73 / 60
input_map[start1] joystick_button[0,11]
input_map[start2] joystick_button[1,11]
input_map[coin1] joystick_button[0,10]
input_map[coin2] joystick_button[1,10]
input_map[ui_configure] joystick_button[0,0] joystick_button[0,11] or joystick_button[1,0] joystick_button[1,11]
input_map[ui_up] joystick_digital[0,0,1,1] or joystick_digital[1,0,1,1]
input_map[ui_down] joystick_digital[0,0,1,0] or joystick_digital[1,0,1,0]
input_map[ui_left] joystick_digital[0,0,0,1] or joystick_digital[1,0,0,1]
input_map[ui_right] joystick_digital[0,0,0,0] or joystick_digital[1,0,0,0]
input_map[ui_select] joystick_button[0,11] or joystick_button[1,11]
input_map[ui_cancel] joystick_button[0,1] joystick_button[0,11] or joystick_button[1,1] joystick_button[1,11]
input_map[p1_up] joystick_digital[0,0,1,1]
input_map[p1_down] joystick_digital[0,0,1,0]
input_map[p1_left] joystick_digital[0,0,0,1]
input_map[p1_right] joystick_digital[0,0,0,0]
input_map[p1_doubleright_up] joystick_digital[0,0,0,0] joystick_digital[0,0,1,1]
input_map[p1_doubleright_down] joystick_digital[0,0,0,0] joystick_digital[0,0,1,0]
input_map[p1_doubleright_left]
input_map[p1_doubleright_right]
input_map[p1_doubleleft_up] joystick_digital[0,0,0,1] joystick_digital[0,0,1,1]
input_map[p1_doubleleft_down] joystick_digital[0,0,0,1] joystick_digital[0,0,1,0]
input_map[p1_doubleleft_left]
input_map[p1_doubleleft_right]
input_map[p1_button1] joystick_button[0,4]
input_map[p1_button2] joystick_button[0,1]
input_map[p1_button3] joystick_button[0,0]
input_map[p1_button4] joystick_button[0,3]
input_map[p1_button5] joystick_button[0,6]
input_map[p1_button6] joystick_button[0,7]
input_map[p1_button7]
input_map[p1_button8]
input_map[p1_button9]
input_map[p1_button10]
input_map[p1_dialx] joystick[0,0,0] -joystick[0,0,0]
input_map[p1_dialy] joystick[0,0,1] -joystick[0,0,1]
input_map[p1_paddlex] joystick[0,0,0] -joystick[0,0,0]
input_map[p1_paddley] joystick[0,0,1] -joystick[0,0,1]
input_map[p1_trackballx] joystick[0,0,0] -joystick[0,0,0]
input_map[p1_trackbally] joystick[0,0,1] -joystick[0,0,1]
input_map[p2_up] joystick_digital[1,0,1,1]
input_map[p2_down] joystick_digital[1,0,1,0]
input_map[p2_left] joystick_digital[1,0,0,1]
input_map[p2_right] joystick_digital[1,0,0,0]
input_map[p2_doubleright_up] joystick_digital[1,0,0,0] joystick_digital[1,0,1,1]
input_map[p2_doubleright_down] joystick_digital[1,0,0,0] joystick_digital[1,0,1,0]
input_map[p2_doubleleft_up] joystick_digital[1,0,0,1] joystick_digital[1,0,1,1]
input_map[p2_doubleleft_down] joystick_digital[1,0,0,1] joystick_digital[1,0,1,0]
input_map[p2_button1] joystick_button[1,4]
input_map[p2_button2] joystick_button[1,1]
input_map[p2_button3] joystick_button[1,0]
input_map[p2_button4] joystick_button[1,3]
input_map[p2_button5] joystick_button[1,6]
input_map[p2_button6] joystick_button[1,7]
input_map[p2_button7]
input_map[p2_button8]
input_map[p2_button9]
input_map[p2_button10]
input_map[p2_dialx] joystick[1,0,0] -joystick[1,0,0]
input_map[p2_dialy] joystick[1,0,1] -joystick[1,0,1]
input_map[p2_paddlex] joystick[1,0,0] -joystick[1,0,0]
input_map[p2_paddley] joystick[1,0,1] -joystick[1,0,1]
input_map[p2_trackballx] joystick[1,0,0] -joystick[1,0,0]
input_map[p2_trackbally] joystick[1,0,1] -joystick[1,0,1]

Trackball Controllers (others)

Some games have different controls from the digital joystick: sliders, pallets, trackball. By default they are emulated by the joystick.

With AdvanceMAME and USB joystick Lioncast Fighting Stick you can not emulate well the dial-type controls, paddle and trackball (eg. In Arkanoid games, Out Run and Lemmings, respectively). When the joystick is recognized as the emulator stick, the input is not usable because it produces a hopping movement and not fluid, rather if it is recognized as a hat is working properly. To see how the joystick is recognized using the tool advj MAME, to switch from one configuration you must reprogram the joypad (see specific paragraph).

input_map[p1_dial_left] keyboard[0,right] or joystick_digital[0,1,0,0]
input_map[p1_dial_right] keyboard[0,left] or joystick_digital[0,1,0,1]
input_map[p1_paddle_left] keyboard[0,right] or joystick_digital[0,1,0,0]
input_map[p1_paddle_right] keyboard[0,left] or joystick_digital[0,1,0,1]
input_map[p1_trackball_left] keyboard[0,right] or joystick_digital[0,1,0,0]
input_map[p1_trackball_right] keyboard[0,left] or joystick_digital[0,1,0,1]
input_map[p1_trackball_up] keyboard[0,down] or joystick_digital[0,1,1,0]
input_map[p1_trackball_down] keyboard[0,up] or joystick_digital[0,1,1,1]

Capcom Play System I/II/III

This emulator Final Burn Alpha adapted to compile and run in Raspberry Pi2/Pi3 works with ROMS Mame 0.130 (ROMSET).

Dependencies

sudo apt-get install  -y build-essential libfreeimage-dev libopenal-dev  libsndfile-dev libudev-dev libasound2-dev libjpeg-dev libtiff5-dev libwebp-dev automake git libsdl1.2-dev gcc-4.8 g++-4.8

Sources / Repositories

git clone https://github.com/barrybarryk/pifba

And when it's all good was a bit fba2x pretty:

cd /arcade/pifba
mkdir /arcade/pifba/.obj
make -f Makefile.PiCPS3 -j4

CPSIII

For CPSII the only game works is of SFIII NOCD version. NOCD version of that is that when you unzip -l made you must have the following file sfiii3_japan_nocd.29f400.u2

Edit file burn/driverlist.h and add:

DRV             BurnDrvSfiii;
DRV             BurnDrvSfiiin;
DRV             BurnDrvSfiii2;
DRV             BurnDrvSfiii2n;
DRV             BurnDrvSfiii3;
DRV             BurnDrvSfiii3n;
 
DRV             BurnDrvJojo;
DRV             BurnDrvJojon;
DRV             BurnDrvJojoba;
DRV             BurnDrvJojoban;
DRV             BurnDrvJojobane;
DRV             BurnDrvRedearth;
DRV             BurnDrvRedeartn;
DRV             BurnDrvWarzard;

        &BurnDrvSfiii,				// Street Fighter III: New Generation (Japan 970204)
        &BurnDrvSfiiin,				// Street Fighter III: New Generation (Asia 970204, NO CD)
        &BurnDrvSfiii2,				// Street Fighter III 2nd Impact: Giant Attack (Japan 970930)
        &BurnDrvSfiii2n,			// Street Fighter III 2nd Impact: Giant Attack (Asia 970930, NO CD)
        &BurnDrvSfiii3,				// Street Fighter III 3rd Strike: Fight for the Future (USA 990512)
        &BurnDrvSfiii3n,			// Street Fighter III 3rd Strike: Fight for the Future (Japan 990512, NO CD)
        &BurnDrvJojo,
        &BurnDrvJojon,
        &BurnDrvJojoba,
        &BurnDrvJojoban,
        &BurnDrvJojobane,
        &BurnDrvRedearth,
        &BurnDrvRedeartn,
        &BurnDrvWarzard,

Setup Joystick

[Joystick]
# Get codes from "jstest /dev/input/js0"
# from package "joystick"
A_1=4
B_1=0
X_1=1
Y_1=3
L_1=6
R_1=7
START_1=11
SELECT_1=10
#Joystick axis
JA_LR=0
JA_UD=1
#player 2 button configuration
A_2=4
B_2=0
X_2=1
Y_2=3
L_2=6
R_2=7
START_2=11
SELECT_2=10
#Joystick axis
JA_LR_2=0
JA_UD_2=1

Nintendo Entertaiment System (NES)

Fceux Nintendo Famicom/NES. Ported an optimised version of Fceux. All criteria considered it is currently the best emulator for the system on the Raspberry Pi.

Dependences Libraries

» SDL1 Simple DirectMedia Layer

Sources / Repositories

FCEUX 2.2.1 is a Nintendo Entertainment System (NES), Famicom, and Famicom Disk System (FDS) emulator. The main goal is vsynced PAL/NTSC video and good sound (but without uber-filters). Get it here:

wget https://www.dropbox.com/s/uu751ibdqmvq0co/fceux.zip

Compile / Installation

Unpack binary from zip to some folder in your home folder. Then remove ~/.fceux folder (if you installed fceux already by another way).

Configuration home/.fceux/fceux.cfg

PS3 Remote Controller Mapping
NES 8Bitdo FC30 GamePad Bluetooth Mapping
SDL.Input.GamePad.0A = 1
SDL.Input.GamePad.0B = 4
SDL.Input.GamePad.0DeviceNum = 0
SDL.Input.GamePad.0Down = 32769
SDL.Input.GamePad.0Left = 49152
SDL.Input.GamePad.0Right = 32768
SDL.Input.GamePad.0Select = 10
SDL.Input.GamePad.0Start = 11
SDL.Input.GamePad.0TurboA = 0
SDL.Input.GamePad.0TurboB = 3
SDL.Input.GamePad.0Up = 49153
SDL.Input.GamePad.0DeviceType = Joystick

Launch Application

To launch fceux you need to provide rom name in command line because there is no GUI.

./fceux <rom file>

Super Nintendo (SNES)

PiSNES Nintendo Super Famicom/SNES. Ported an optimised version of Snes9x. All criteria considered it is currently the best emulator for the system on the Raspberry Pi.

Dependences Libraries

» SDL1 Simple DirectMedia Layer

Sources / Repositories

PiSNES released - Super Nintendo Emulator port based on SNES9X 1.39

wget http://sourceforge.net/projects/pisnes/?source=typ_redirect
mkdir /arcade/pisnes

Configure / Installation

root@raspberrypi:/arcade/pisnes# vi snes9x.cfg
Controlles configuration SFC 8Bitdo Controller
[Joystick]
# Get codes from "jstest /dev/input/js0"
# from package "joystick"
# Defaults to XBOX 360 controller
A_1=3
B_1=1
X_1=0
Y_1=4
L_1=6
R_1=7
START_1=11
SELECT_1=10
QUIT=99
ACCEL=99
QLOAD=99
QSAVE=99
#Joystick axis
JA_LR=0
JA_UD=1
#Joystick DPAD buttons
LEFT_1=99
RIGHT_1=99
UP_1=99
DOWN_1=99
#player 2 button configuration
A_2=3
B_2=1
X_2=0
Y_2=4
L_2=6
R_2=7
START_2=11
SELECT_2=10
#Joystick axis
JA_LR_2=0
JA_UD_2=1
#Joystick DPAD buttons
LEFT_2=99
RIGHT_2=99
UP_2=99
DOWN_2=99

Data Files Location

mkdir /arcade/roms/snes

Launch Application (Notes and Comments)

Super Mario All Stars (FIXED)

To play Super Mario All Stars you need to play first to Mario 2 exit and you can play to all versions.

Sega Mega Drive / Genesis / Sega Master System (SMS)

Picodrive from Notaz is 1.91 Sega MegaDrive/Genesis, SEGA/MEGA CD & 32X. Produced an Optimized version of PicoDrive (from Notaz’s original Code). Mega/Sega CD and 32X Titles all work flawlessly, Fullscreen, even in XWindows! Included in the download are two versions, one for the Pi1 and a Pi2 Binary with further optimizations. All criteria considered it is currently the best emulator for the system on the Raspberry Pi.

Dependences Libraries

» SDL1 Simple DirectMedia Layer
apt-get install libsdl1.2-dev

Sources / Repositories

wget http://fdarcel.free.fr/picodrive-rpi-chips-0_1.bz2

Compile / Installation

tar jxf picodrive-rpi-chips-0_1.bz2
export CC=gcc-4.8
export CXX=g++-4.8
./configure --platform=rpi2
make

Access into the directory where you uncompressed the source code and Type -

./configure --disable-opengl 

The “Default” configuration uses Open GL rendering, which DOES NOT work on the RPi! Without this addition it will run, but you will have to add a Boolean expression to turn off Open GL rendering EVERY TIME its run!!!

make
make install (Optional, but useful in this case as running straight from Terminal (Not in X) gives a significant performance increase and negates the need for “CDing” into the folder when you want to use it!) 

Exit Terminal Make an appropriately named folder (I called mine dgenroms) and put any ROMS you have in it (NB DECOMPRESSED! See Above!)

Data Files Location

mkdir /arcade/roms/genesis
mkdir /arcade/roms/sms

Controller Setup (8Bitdo SFC30 SNES)

binddev = sdl:8Bitdo SFC30 GamePad Joystick
bind backspace = Fast forward
bind return = player1 START
bind escape = Enter Menu
bind \xA0 = player1 X
bind \xA1 = player1 C
bind \xA3 = player1 A
bind \xA4 = player1 B
bind \xA6 = player1 Y
bind \xA7 = player1 Z
bind \xAA = enter Menu
bind \xAB = player1 START
bind up = player1 UP
bind down = player1 DOWN
bind right = player1 RIGHT
bind left = player1 LEFT
bind f1 = Save State
bind f2 = Load State
bind f3 = Prev Save Slot
bind f4 = Next Save Slot
bind f5 = Switch Renderer
bind f6 = Pico Prev page
bind f7 = Pico Next page
bind f8 = Pico Switch input
binddev = sdl:8Bitdo SFC30 GamePad Joystick [1]
bind backspace = Fast forward
bind return = player2 START
bind escape = player2 MODE
bind \xA0 = player2 X
bind \xA1 = player2 C
bind \xA3 = player2 A
bind \xA4 = player2 B
bind \xA6 = player2 Y
bind \xA7 = player2 Z
bind \xAA = Enter Menu
bind \xAB = player2 START
bind up = player2 UP
bind down = player2 DOWN
bind right = player2 RIGHT
bind left = player2 LEFT
bind f1 = Save State
bind f2 = Load State
bind f3 = Prev Save Slot
bind f4 = Next Save Slot
bind f5 = Switch Renderer
bind f6 = Pico Prev page
bind f7 = Pico Next page
bind f8 = Pico Switch input
⚠️ **GitHub.com Fallback** ⚠️