Super Miyamoto Sprint Save

Homebrew game for homebrew FPGA game console

Project README

Super Miyamoto Sprint (WIP)

This is a simple retro-inspired platformer game (implemented in C11) targetting a retro-inspired FPGA game console by the same author (implemented in Verilog). It is a bare metal program using sprites and tilemaps to displays graphics similar to other games of the period and works with modest CPU speed and RAM.

2 complete levels are playable.

Photo

Video

This video was captured from a ULX3S using a HDMI capture stick, an SPDIF DAC for audio and a Bluetooth gamepad for controls. Click the thumbnail to watch the video on Youtube.

Gameplay video

Binaries

FPGA bitstreams and game binaries for the program can be downloaded from the Releases page. The game should start after flashing the bitstream.

Flashing to iCEBreaker

iceprog -o 2M prog.bin
iceprog ics32-icebreaker.bit

Flashing to ULX3S

fujprog -j flash -f 0x200000 prog.bin
fujprog -j flash ics32-ulx3s.bit
  • Only the 85F boards are supported as the 12F doesn't have enough block RAM.
  • Note that fujprog will be slow to flash if you are using a game binary with music included.
  • Binaries with music included require a board with 16MByte of flash.

Build prerequisites

  • GNU RISC-V toolchain for cross compilation
  • GNU Make (any version >= 3.81 should work)

If running in the simulator using the make sim target for example, the prerequisites here are also needed.

If running on an iCEBreaker, ULX3S or other supported board, the prerequsites here are also needed.

Audio

Sound effects are included by default but music is not. Running any of the Makefile targets with MUSIC=1 will:

  1. Download and extract audio from preconfigured Youtube videos using youtube-dl with (default is included but can be changed in Makefile)
  2. Convert them using ffmpeg to the required system format (IMA-ADPCM)
  3. Include them in the output binary

Extra prerequisities

Including music adds two prerequisities:

Usage

The CROSS variable in the Makefile should match the prefix of the RISC-V toolchain. By default it is set to riscv-none-embed- which may not match the one installed on the machine.

This project depends on the system repo which is included as a submodule:

git submodule update --init --recursive

Simulator (SDL2)

To build and run in the simulator:

make sim

Usage on FPGA boards

The bitstream for the system itself must be flashed first using these instructions.

To build and run on a given FPGA board:

ULX3S

make ulx3s_prog
make MUSIC=1 ulx3s_prog

The default ULX3S programmer used is fujprog which can be a bit slow for large files. If the built with MUSIC=1 then it might take a minute or two.

iCEBreaker

make icebreaker_prog
make MUSIC=1 icebreaker_prog

Controls

The game can be controlled with (limited) buttons on the FPGA board or with certain USB gamepads. Top level verilog modules for each board show which options are available if any. The simulator uses SDL keyboard input for control.

  • Left/Right: Move
  • Up: Climb
  • Down: Duck
  • B: Jump
  • Y: Run
  • L: Exit vehicle*
  • R: Perform vehicele action (like firing a projectile)*
  • Select: Reset game state (debug)*
  • Start: Pause*

*: USB gamepad is needed for these.

Acknowledgements

Open game art was used for the graphics and audio with some minor alterations. A full list of attributions to the artists is in the ATTRIBUTIONS.md file.

Open Source Agenda is not affiliated with "Super Miyamoto Sprint" Project. README Source: dan-rodrigues/super-miyamoto-sprint
Stars
51
Open Issues
0
Last Commit
3 years ago
License
MIT

Open Source Agenda Badge

Open Source Agenda Rating