Skip to content

Instantly share code, notes, and snippets.

@brarcher
Last active March 7, 2025 06:21
Show Gist options
  • Save brarcher/451b37017c00ce81b76932b83ed9e292 to your computer and use it in GitHub Desktop.
Save brarcher/451b37017c00ce81b76932b83ed9e292 to your computer and use it in GitHub Desktop.
Installing StepMania for Raspberry Pi 3B+ for an LCD TV

These are instructions for installing and configuring the StepMania fork OutFox to run on a Raspberry Pi 3B+ using a soft dancepad and an LCD TV.

Equipment to buy

Item Cost
CanaKit Raspberry Pi 3 B+ Starter Kit $80
256GB Micro SD card $35
Dance Pad $26

Setup Raspberry Pi

Download the Raspberry Pi Imager and launch it with the SD card plugged in. Select RetroPie (v4.7.1) for RPI 2/3 and flash SD card.

  • There was difficulty launching StepMania from the Raspberry Pi Full OS.

Boot the Raspberry Pi with the SD card with a keyboard attached. When RetroPie loads hit F4 to drop to a shell.

The default keyboard configuaton is for United Kingdom. If using a different keyboard layout, edit XKBLAYOUT in /etc/default/keyboard with the correct layout. The two letter layout possibilities are listed in /usr/share/X11/xkb/rules/evdev.lst.

Install the following packages:

sudo apt update -y
sudo apt install xinit libopengl0 -y

The PI has 1GB of RAM. Update /boot/config.txt to allocate 384 MB of RAM to the GPU by updating:

gpu_mem_1024=384

By default the GPU is disabled. Enable the GPU by launching:

sudo raspi-config
  • Select 6 Advanced Options
  • Select A2 GL Driver
  • Select G2 GL (Fake KMS)
    • G3 GL (Full KMS) causes StepMania's audio to not work
  • Reboot
    • Note that changing this setting breaks RetroPie, it will now just drop to a shell on boot.

Setup OutFox

Launch RetroPie, and drop to a shell by hitting F4. Download the arm32 build for OutFox in the home directory and unpack it:

wget https://github.com/TeamRizu/OutFox/releases/download/OF4.10.0/OutFox-5.3.0-alpha-4.10.0-HF1-arm32v7-date-20211001.tar.gz
tar xf OutFox-5.3.0-alpha-4.10.0-HF1-arm32v7-date-20211001.tar.gz
mv OutFox-5.3.0-alpha-4.10.0-HF1-arm32v7-date-20211001 outfox

Create a launcher for OutFox in RetroPie's ports directory, so it can be launched from RetroPie. Create the script /home/pi/RetroPie/roms/ports/OutFox.sh with the following contents:

#!/bin/bash > 
xinit /home/pi/outfox/stepmania $* -- :0 vt$XDG_VTNR

Launch OutFox from the terminal with the script. It may crash the first launch with an GL_OUT_OF_MEMORY error. To avoid this, open ~/.stepmania-5.3/Save/Preferences.ini and reduce MaxTextureResolution to 512.

Launch OutFox again. When it launches, configure the game type to be dance.

In the options menu, configure the following settings:

  • Options > Display & Graphics > Display and Resolution
    • Show Stats: On
      • Enables FPS statistics, to get an indication of performance
    • Display Resolution: 1280x720
  • Options > Display & Graphics > Graphics Settings
    • Fast Note Rendering: Yes

To configure the gamepad, plug it in and navigate to Options > Input & Calibration > Config Key/Joy Mappings. In the secondary column map the gamepad buttons to the following items:

OutFox Gamepad
Start start
Select O
Back X
Left (MenuLeft) left arrow
Right (MenuRight) Right arrow
Up (MenuUp) Up arrow
Down (MenuDown) Down arrow

Go to the bottom of the settings and Save to Disk then Exit.

The audio sync to the TV will need to be calibrated. Enter Options > Input & Calibration > Calibrate Audio Sync. Dance the arrows to the music the best you can. On screen it will suggest an offset. My case was -0.15. If the game asks to accept the offset, say yes. Otherwise, it can be manually input into the GlobalOffsetSeconds setting in ~/.stepmania-5.3/Save/Preferences.ini.

OutFox launch on boot

Boot the pi to a shell, and update the /home/pi/.bashrc file to contain the following at the end which will launch OutFox once at boot:

if [ ! -e /tmp/outfox-started ]; then
  touch /tmp/outfox-started
  /home/pi/RetroPie/roms/ports/OutFox.sh
fi

Resources

Experiments

These are experiments with settings, seeing what the ideal setting combination is.

song wheel: the song selection screen, at rest calibrate: Options > Input & Calibration > Calibrate Audio Sync song: A song in medium difficulty

no gpu, default resolution:

  • song wheel: 8f ps
  • calibrate: 32 fps
  • song: 20 fps

gpu, default resolution:

  • song wheel: 39 fps
  • calibrate: 21 fps
  • song: 26 fps

gpu, resolution 1280x720

  • song wheel: 36 fps
  • calibrate: 7 fps
  • song: 10 fps

gpu, resolution 1280x720, Options > Display & Graphics > Graphics Settings > Fast Note Rendering: On

  • song wheel: 35 fps
  • calibrate: 58 fps
  • song: 54 fps
@zerkman
Copy link

zerkman commented Jan 6, 2025

After setting the resolution to 1280x720 (only available after selecting the output mode to HDMI instead of "windowed"), keyboard and controllers are not responding anymore.

Seems to correspond with this issue: TeamRizu/OutFox#177

Not sure what to do. Any ideas?

@zerkman
Copy link

zerkman commented Jan 7, 2025

After setting the resolution to 1280x720 (only available after selecting the output mode to HDMI instead of "windowed"), keyboard and controllers are not responding anymore.

Seems to correspond with this issue: TeamRizu/OutFox#177

Not sure what to do. Any ideas?

Actually I installed the latest stable Project OutFox 0.4.19 LTS release instead, and it works.
Some executable and config file names have changed, but the procedure globally remains the same.
I also had to switch the vram size to 512K. Maybe with some settings (16 bit textures?) you can use a smaller vram size, but since it works as is, I'm keeping it as is.

the URL of working release: https://github.com/TeamRizu/OutFox/releases/download/OF4.19.0/OutFox-0.4.19-LTS-Linux-RPi32bit-arm32v7-modern-date-20230415.tar.gz

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment