Description
3D Pinball - Space Cadet for 3DS
This is a port of 3D Pinball - Space Cadet for Nintendo 3DS. It’s originally a game that came bundled with Windows from Windows 95 up to Windows XP. This is the current state of the project:
- No menus, options, or results screen.
- It plays sound effects and music (if the player supplies the music in OGG format).
- There are still some bugs here and there.
- It should be running fine on New 3DS, but on a regular 3DS it runs slow.
It is based on the PC decompilation made by k4zmu2a: https://github.com/k4zmu2a/SpaceCadetPinball
The PC decompilation uses SDL2 to render the game. This 3DS port has been changed to use native GPU rendering with the Citro3D library.
How to build
The main requirement is to have devkitPro.
Follow the instructions to install devkitPro here: https://devkitpro.org/wiki/Getting_Started You will also need the 3DS development package, and also the libraries 3ds-sdl and 3ds-sdl_mixer.
If you use Windows or Ubuntu, here are more detailed instructions.
Windows
Even though devkitPro offers a Windows installer, I’ve had some issues setting it up. It’s easier to use WSL. If you want to use the Windows installer anyway, check the link above for instructions.
- Install WSL. By default it will install Ubuntu, which is fine.
- Open a WSL terminal and just follow the Ubuntu instructions below. With the difference that, if you want to clone the project into, for example, the
C:\
folder, you will need move to that folder inside the terminal with the commandcd /mnt/c/
.
Ubuntu and other Debian based linux distros
- Open the terminal in the folder where you want to clone the project.
- Clone it with the command
git clone --branch 3ds https://github.com/MaikelChan/SpaceCadetPinball
. A subfolder calledSpaceCadetPinball
will be created containing the project. - Move to that subfolder with
cd SpaceCadetPinball
. - Download the latest version of the custom devkitPro pacman, that will be used to download the compilers and libraries to build the project. Once downloaded, put it in the
SpaceCadetPinball
folder. - Install devkitPro pacman with this command:
sudo gdebi devkitpro-pacman.amd64.deb
. If gdebi is not found, install it withsudo apt install gdebi-core
, and then try again installing pacman. - Use the following command to sync pacman databases:
sudo dkp-pacman -Sy
. - Now update packages with
sudo dkp-pacman -Syu
. - Install the 3DS development tools with
sudo dkp-pacman -S 3ds-dev
. - Install SDL with
sudo dkp-pacman -S 3ds-sdl
. - Install SDL_mixer with
sudo dkp-pacman -S 3ds-sdl_mixer
. - Set the DEVKITPRO environment variables so the system knows where the compilers and libraries are installed with these commands:
export DEVKITPRO=/opt/devkitpro
.export DEVKITARM=/opt/devkitpro/devkitARM
.
- To generate Build the project with the command
make -j4
. - Optionally, to generate a CIA file, you will need to have bannertool and makerom in the
$DEVKITPRO/tools/bin
folder. Then build the project with the commandmake -j4 BUILD_CIA=1
.
After a successful build, you will get a file called SpaceCadetPinball.3dsx
, which is the main executable.
How to run
3DS with Homebrew Launcher
- Go to your SD card and enter the
3ds
folder. - Copy
SpaceCadetPinbal.3dsx
into the3ds
folder. - Make sure you have your
dspfirm.cdc
in the3ds
folder, as you will need it to have sound in homebrew games. If you don’t have it, dump your DSP. - Inside the
3ds
folder, create a new folder namedSpaceCadetPinball
. - For legal reasons, you will need to get the original PC game on your own to obtain the assets like graphics and sound effects. Those are not contained in this repository.
- Copy all files from the original PC version into the
SpaceCadetPinball
folder that was created earlier. - Optionally, since this port doesn’t play MIDI files, you’ll need to convert the music to ogg format, and call the file
PINBALL.ogg
, and put it along the other assets in theSpaceCadetPinball
folder. Make sure that the music has a sample rate no higher than 44100Hz, or it won’t play correctly. - If everything went fine, you should be able to run the game from the Homebrew Launcher.
Citra
- Get the Citra emulator if you don’t have it.
- Open it and go to the menu
File/Open Citra Folder
. This will open the folder where Citra’s configuration is stored. - Go to the
sdmc
folder and create a new folder there named3ds
if it doesn’t exist already. - Enter the
3ds
folder and create an empty file there nameddspfirm.cdc
. This will allow to have audio in homebrew apps. - Inside the
3ds
folder create another folder namedSpaceCadetPinball
. - For legal reasons, you will need to get the original PC game on your own to obtain the assets like graphics and sound effects. Those are not contained in this repository.
- Copy all PC game’s assets to the
SpaceCadetPinball
folder that was created earlier. - Optionally, since this port doesn’t play MIDI files, you’ll need to convert the music to ogg format, and call the file
PINBALL.ogg
, and put it along the other assets in theSpaceCadetPinball
folder. Make sure that the music has a sample rate no higher than 44100Hz, or it won’t play correctly. - If everything went fine, you should be able to run the game.
How to play
Button | Action |
---|---|
A | Launch the ball |
L | Move the left paddle |
R | Move the right paddle |
DPad Left, Right, Up | Bump table |
X | Start a new game |
Y | Exit the game |
Start | Pause |