Skip to content

keronian/software-defined-retro-rom

 
 

Repository files navigation

Software Defined Retro ROM (SDRR)

A highly configurable and low-cost ROM replacement solution for vintage computers. Replace failed ROMs in Commodore 64s, VIC-20s, PETs, and other retro systems with a $2 microcontroller.

Emulates 2364, 2332 and 2316 ROMs using the STM32F4 family of microcontrollers. Replaces kernel, BASIC, character set, diagnostic, and application ROMs.

Key Features

  • 💰 Based on $2 microcontroller.
  • Fast enough for PETs, VIC-20s, C64s, 1541s, IEEE drives, etc. Support faster systems with STM32F405R.
  • 📐 Same footprint as original ROMs - doesn't overhang the socket like other solutions.
  • 🚀 Quick programming - just connect 4 wires and make run. No programming jigs necessary.
  • 🔌 Use a $5 programmer - no expensive EEPROM programmer required.
  • 🛠️ Reflash in situ - no need to remove the ROM from the host when reprogramming.
  • ⚙️ Software configurable chip select lines - no hardware jumpers required.
  • 💾 Stores up to 16 ROM images of different sizes and chip select configurations. Image selectable via jumpers.
  • 📦 Replace multiple ROMs with one ROM one SDRR can replace up to 3 original ROMs e.g. all of C64 kernel, BASIC, character set.
  • 🔀 Dynamic bank switching - switch between ROM images on the fly, e.g. different char ROMs.
  • 🧩 Images combined automatically - no need to manually build up your own larger PROM image containing multiple retro ROMs.
  • 🏭 Two layer PCB, component on single-side, limited BOM for low manufacturing cost/complexity.
  • 🎯 Supports multiple STM32F4xxR variants: F401, F411, F405, F446 (others can be added).
  • 🔓 Open source software and hardware - see License

Introduction

The video below provides an introduction to the Software Defined Retro ROM:

Video Title

Hardware

This is the STM32F4 24-pin version, hardware revison F. See sdrr-pcb for the hardware designs and documentation.

Quick Start

You have two options

Pre-built Binaries

Use your favourite STM32 programmer to flash the pre-built binaries from the project's releases page. Scroll down to the "Assets" section of the latest release, and download the bin-*.zip or elf-*.zip file for your STM32 variant. These zip files contain pre-built binaries for the various SDRR image collections, including the C64, VIC-20, PET, and 1541 disk drive.

Build Yourself

Once you have the project cloned, and the required dependencies installed, you can build and flash an SDRR image using the following commands - replace f411re with your target STM32 variant, and config/c64.mk with the configuration you want to use.

# C64
STM=f411re CONFIG=config/c64.mk make run
# VIC-20 (PAL)
STM=f411re CONFIG=config/vic20-pal.mk make run
# PET 40 column 50Hz
STM=f411re CONFIG=config/pet-4-40-50.mk make run

This will download the desired ROM images automatically, generate the required firmware, and flash it to the SDRR device.

After Flashing

Set the SDRR jumpers to select the desired ROM image (see the config file, or logs from your SDRR device, for which # corresponds to which image) and you're now ready to install the SDRR device in your retro system.

For configuration options, see Configuration and the Makefile.

Documentation

Supported STM32 Microcontrollers

Most STM32F4xxR (LQFP-64) variants will work, but the following are supported out of the box by the build system:

Model Max single ROM Images Max multi-ROM Sets Build variant
STM32F401RBT6 6 1 f401rb
STM32F401RCT6 14 3 f401rc
STM32F401RET6 16 7 f401re
STM32F411RCT6 14 3 f411rc
STM32F411RET6 16 7 f411re
STM32F405RGT6 16 15 f405rg
STM32F446RCT6 16 3 f446rc
STM32F446RET6 16 7 f446re

Selecting between more than 8 ROM images or sets requires hardware revision E onwards, as the PCB has more jumpers to select the images.

The vast majority of ROMs can be emulated by the cheapest variant, the F401. The best bang for buck are likely to be either:

The F401 may require a small overclock for some systems, such as running the C64 multi-ROM set (~90MHz vs 84MHz rated maximum).

There are also cheap clones available, with a clone F405 coming in at around the same price as a genuine F411 (from LCSC).

For more details about selecting the appropriate STM32 variant for your application, see docs/STM32-SELECTION.md.

If you'd like another variant supported, raise an issue via github or add it yourself and submit a PR.

Debugging

The best place to start with debugging is Logging. This will help you see what the SDRR is doing, and why it may not be working as expected.

License

See LICENSE for software and hardware licensing information.

About

The most flexible ROM replacement for 8-bit computers - using a $2 STM32 microcontroller.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages

  • Rust 47.7%
  • C 34.5%
  • Makefile 10.7%
  • Shell 4.7%
  • Assembly 0.9%
  • Linker Script 0.7%
  • Other 0.8%