• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

dan-rodrigues/super-miyamoto-sprint: Homebrew game for homebrew FPGA game consol ...

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称:

dan-rodrigues/super-miyamoto-sprint

开源软件地址:

https://github.com/dan-rodrigues/super-miyamoto-sprint

开源编程语言:

C 95.6%

开源软件介绍:

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.




鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap