free5ty1e
Participant
Post count: 37

Good news fulfilled!!! xD

Edited to include multiplayer too!

So, here’s my mapping section for my genuine PS3 controller connected via my CSR 4.0 bluetooth adapter, added to emu.cfg:


[PLAYSTATION(R)3 Controller]
button.0=Btn_Z
button.1=Btn_C
button.2=Btn_D
button.3=Btn_Start
button.4=DPad_Up
button.5=DPad_Right
button.6=DPad_Down
button.7=DPad_Left
button.8=Axis_LT
button.9=Axis_RT
button.10=DPad2_Left
button.11=DPad2_Right
button.12=Btn_Y
button.13=Btn_B
button.14=Btn_A
button.15=Btn_X
button.16=Quit
axis.0=Axis_X
axis.1=Axis_Y
axis.2=DPad2_Up
axis.3=DPad2_Down
axis.4=DPad2_Left
axis.5=DPad2_Right

You can add as many of these sections to the emu.cfg as you’d like, and if you have a matching controller name connected during Reicast startup, your custom button maps will be applied (overlaid, actually) to the default map.

Post your configs! :D

Oh! Here’s the updated script I’m using to build and install Reicast from my github repo (still piggybacking on the RetroPie script awesomeness), pointing to the new branch free5ty1e/rpi2/multiplayer (it’s been rebased on the upstream master and I have submitted a pull request to get raspberry pi 2 included in the official Reicast repo):


#!/bin/bash
echo "Temporarily modifying RetroPie module..."
sed -i '/gitPullOrClone/c\gitPullOrClone "$md_build" https://github.com/free5ty1e/reicast-emulator.git free5ty1e/rpi2/multiplayer' ~/RetroPie-Setup/scriptmodules/emulators/reicast.sh

echo "Requesting a build through official RetroPie calls..."
sudo ~/RetroPie-Setup/retropie_packages.sh reicast

echo "Restoring original RetroPie-Setup state..."
pushd ~/RetroPie-Setup
git reset --hard
popd

And here is the script — let’s call it /home/pi/dreamcast.sh — that I am using to run Reicast smoothly with no visual stuttering / pausing (uses tmpfs to run in memory and not allocate virtual memory on the SD card. Audio is still not that smooth):


#!/bin/bash

pushd /opt/retropie/emulators/reicast

echo Reading the entire Reicast emulator into memory to execute from there...
sudo mkdir tmpfs
sudo mount -t tmpfs none tmpfs/
sudo cp -a * tmpfs/

echo Reading your user VMUs into memory...
sudo cp /home/pi/.dcvmu/*.bin .

cd tmpfs
sudo aoss ./reicast.elf -config config:image="$1"
cd ..
echo Updating VMU units from memory...
sudo cp tmpfs/*.bin .

mkdir /home/pi/.dcvmu
cp *.bin /home/pi/.dcvmu/

echo Freeing up memory...
sudo umount /opt/retropie/emulators/reicast/tmpfs
sudo rm -rf tmpfs

popd

…and here is even the entry for your es_systems.cfg to launch via this script in EmulationStation, for completeness:


    <system>
        <fullname>Sega Dreamcast - Reicast</fullname>
        <name>dreamcast</name>
        <path>~/RetroPie/roms/dreamcast</path>
        <extension>.cdi .CDI</extension>
        <command>/opt/retropie/supplementary/runcommand/runcommand.sh 0 "/home/pi/dreamcast.sh %ROM%" "dreamcast"</command>
        <platform>dreamcast</platform>
        <theme>dreamcast</theme>
    </system>