Giter Club home page Giter Club logo

snestang's Introduction

SNESTang - SNES for Sipeed Tang FPGA Boards

SNESTang is an open source project to recreate the Super Nintendo Entertainment System (SNES) with the affordable Sipeed Tang FPGA boards. Currently Tang Primer 25K, Tang Nano 20K and Tang Mega 138K Pro are supported.

  • 720p HDMI output.
  • Cycle accurate gameplay.
  • Supports LoROM, HiROM and ExHiROM.
  • ROM loading from MicroSD with an easy-to-use menu system, powered by a RISC-V softcore.
  • Extension chips: DSP-1/2/3/4, S-RTC, OBC-1.
  • Automatic BSRAM backup and restore.
  • SNES or DS2 controllers.

If you haven't bought your board yet, Tang Primer 25K is probably the one to get. Tang Nano 20K only runs games smaller than 3.75MB (30Mbits) due to its limited SDRAM size.

Current development focus,

  • SNAC native controller adapter support.
  • Core switching between SNESTang and NESTang.

Setup Instructions

Detailed step-by-step instructions.

Quick instructions for experienced users:

  • Tang Primer 25K needs 4 modules: Tang sdram, DVI, SNES/Dualshock2 controller, SD and a pair of controllers. Currently these should cost ~$60 in total. Tang Nano 20K just needs controller adapters. Check instructions for how to connect the modules / adapters.
  • Download a SNESTang release, and program the corresponding snestang_*.fs to the board with Gowin programmer.
  • Program the softcore firmware firmware.bin to address 0x500000 of the on-board flash. See this screenshot for how to do it.
  • Put your .sfc or .smc roms on a MicroSD card (exFAT or FAT32 file system).
  • Connect one or two DualShock2 controllers to the DS2 pmod.
  • Insert the MicroSD card, connect an HDMI monitor or TV, and enjoy your games.

More information on game compatibility.

Usage

Basic operations

  • .SFC and .SMC roms should be automatically recognized.
  • SELECT-RIGHT BUTTON to open OSD.

Backup SRAM support

  • Many SNES gamepaks include battery-backed SRAM chips to store game saves, for example Super Mario World. Since 0.5, SNESTang supports fully-automatic backup and restore of BSRAM content, with no interruption to the game play.
  • The function is by default turned off. To use it, first enable it in options. Then launch a game with BSRAM support. Every 10 seconds, SNESTang will check if there's new BSRAM content, and if yes saves it into /saves/<rom_name>.srm. BSRAM is also automatically restored at game launch if the corresponding .srm file exists, and BSRAM function is on.
  • List of games with save batteries.

Development

I am developing with Gowin IDE 1.9.9 Pro version (not the EDU version). It requires a free license. Just open the project file snestang_primer25k.gprj.

Read the updated design notes to understand the code or to add features.

You can also simulate the code with our verilator harness. src/test_loader.v specifies which rom is used by the simulation. Then make sim will start a SDL-based graphical simulation.

Special Thanks

  • SNES_FPGA by Sergiy Dvodnenko (srg320) and gyurco. SNESTang is a port of this core for MiSTer and MIST.
  • hdl-util/hdmi by Sameer Puri.

nand2mario (nand2mario at outlook.com)

Since 2024.1

snestang's People

Contributors

nand2mario avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.