r2
Free open-source Cloudflare R2 desktop client and S3 GUI for macOS, Windows, and Linux. Manage Cloudflare R2, AWS S3, M…
This is a PIU simulator for the GBA that uses StepMania SSC charts.
Created by [r]labs.
Join our community!
The downloads provided in our Releases section include:
To play, you need to build a ROM with your songs.
A node.js script (the importer) converts a list of SSC/MP3/PNG files into binary files which the GBA can then understand. For audio, it uses GSM audio files which are very small in size.
Charts are converted into a format created for this project called PIUS. Then everything is bundled in a GBFS file (a filesystem created by the GBA scene) and appended to the final ROM.
Read the wiki for more details!
# download docker image
docker pull afska/piugba-dev
# compile game assets
./dockermake.sh assets
# install importer dependencies
./dockermake.sh install
# run ./dockermake.sh {action} {arguments...}
# for example, to build a clean Arcade ROM, use:
./dockermake.sh build ENV=production ARCADE=true
make install: Installs the importer dependenciesmake check: Verifies that all the tools are installed correctlymake clean: Cleans build artifacts (except assets)make assets: Compiles the needed assets in src/data/content/_compiled_sprites (required for compiling)make build: Compiles and generates a .gba file without datamake import: Imports the songs from src/data/content/songs to a GBFS filemake pkg: Appends the GBFS file to the ROM (piugba.gba -> piugba.out.gba)make package: Compiles and appends the GBFS file to the ROM (build+pkg)make start: Packages and starts the compiled ROM (package + launch rom)make rebuild: Recompiles a full ROM (clean+package)make restart: Recompiles and starts the ROM (rebuild+start)make reimport: Reimports the songs and starts the ROM without recompiling (import+package+start)| Name | Values | Description |
|---|---|---|
ENV |
development, or debug or production |
debug: everything is unlocked, backgrounds are disabled, and stage-break is OFF.development: the same thing, but including backgrounds.production: backgrounds, stage-break ON, and working locks.Non-production versions also have: 1) PIU-style controls by default, and a debug menu to correct songs' offsets. See Wiki: Correcting offsets. 2) If SELECT is pressed when a campaign song starts, stage-break will be ON regardless of the environment. 3) Profiling code and some logs. |
BOSS |
false or true | Automatically adds boss levels to the campaign modes. |
ARCADE |
false or true | Creates an arcade-only version of the game that only uses numeric levels, without the campaign modes. Add this parameter to both import and build commands! |
SONGS |
path to a directory | Songs directory. Defaults to: src/data/content/songs |
VIDEOLIB |
path to a directory | Video library output directory. Defaults to: src/data/content/piuGBA_videos |
VIDEOENABLE |
false or true | Enables the conversion of video files (from ${SONGS}/_videos) to the VIDEOLIB folder. |
HQAUDIOLIB |
path to a directory | HQ Audio library output directory. Defaults to: src/data/content/piuGBA_audios |
HQAUDIOENABLE |
false or true | Enables the conversion of HQ audio files to the HQAUDIOLIB folder. |
FAST |
false or true | Uses async I/O to import songs faster. It may disrupt stdout order. |
In Docker builds, for
SONGS,VIDEOLIBandHQAUDIOLIB, only use relative paths to folders inside your project's directory!
Advanced usage only! The code requires specific versions of tools that are difficult to obtain, and I cannot provide them. I created the Docker image so everyone can have the same environment.
GBA_DIR) and use this file structure:
gba
tools
devkitProprojects
piugbar53 (with gcc 9.1.0): The devkit for compiling GBA ROMs. It comes with:
14.*: The JS runtime3.81 (compiled for i386-pc-mingw32): The build automation tool7.0.10.3: The tool used to convert images to paletted bitmaps3.3.3 (bundled with libgsm): The tool used to convert audio files to GSM
ffmpeg.exe binary included with ImageMagick or any other version. After 3.3.3, they stopped including libgsm on Windows builds.0.5: A small command line util to fix corrupted PNG filescd scripts/importer npm install
~/.bash_profile:# set your ImageMagick install path here: export PATH=$PATH:/c/Program\ Files/ImageMagick-7.0.10-Q16 export GBA_DIR="/c/Work/gba" # <<< CHANGE THIS PATH export DEVKITPRO="$GBA_DIR/tools/devkitPro" export PATH="$PATH:$GBA_DIR/tools/devkitPro/bin" export PATH="$PATH:$GBA_DIR/tools/devkitPro/devkitARM/bin" export PATH="$PATH:$GBA_DIR/tools/devkitPro/tools/bin"
make checkC/C++ Extensions, EditorConfig, Prettier - Code formatter# use #FF00FD as transparency color grit *.bmp -ftc -pS -gB8 -gT ff00fd -O shared_palette.c
magick file.png -resize 240x160\! -colors 255 file.bmp grit file.bmp -gt -gB8 -mRtf -mLs -ftb
ffmpeg -y -i file.mp3 -ac 1 -af 'aresample=18157' -strict unofficial -c:a gsm file.gsm ffplay -ar 18157 file.gsm
gbfs files.gbfs *.pius *.gsm *.bin # pad rom.gba to a 256-byte boundary cat rom.gba files.gbfs > rom.out.gba
rm -rf cmake-build-debug ; mkdir cmake-build-debug ; cd cmake-build-debug ; cmake ../ -G "Unix Makefiles" ; make ; cp engine/libgba-sprite-engine.a ../../piugba/libs/libgba-sprite-engine/lib/libgba-sprite-engine.a ; cd ../ ; rm -rf ../piugba/libs/libgba-sprite-engine/include/ ; cp -r ./engine/include ../piugba/libs/libgba-sprite-engine/
cd scripts/importer npm install -g pkg pkg --targets node14-win --config package.json -o importer.exe --public --public-packages "*" --no-bytecode --compress GZip src/importer.js
Makefile, replace -Ofast by -Og -g to include debug symbols in the .elf fileIf you've added new folders, ensure they're in Makefile's SRCDIRS list!
more like this
Free open-source Cloudflare R2 desktop client and S3 GUI for macOS, Windows, and Linux. Manage Cloudflare R2, AWS S3, M…
search projects, people, and tags