A bare-metal, native port of OpenTyrian for the Analogue Pocket, running directly on a VexRiscv RISC-V soft-core CPU instantiated on the Pocket's Cyclone V FPGA.
The core is a fork of PocketDoom. See README_POCKETDOOM.md
for details on the underlying core.
- Pixel-Perfect Video: Tear-free, double-buffered rendering at the original 320x200 resolution
- FM Synthesis: Uses a hardware OPL2 block (via
jotego/jtopl2) for AdLib/SoundBlaster music synthesis. - High-Fidelity Effects: Digital PCM sound effects are processed through a custom 64-bit linear interpolator with a 4-pass FIR anti-aliasing filter, upsampled to 48kHz interleaved stereo. We even added 6dB of software headroom to eliminate the nasty clipping found in the original DOS game!
- Console-Optimized UI: Tweaked UI to avoid Keyboard input and unnecessary options.
- Save Support: Persistent config, and storage for 10 saves.
- Gamepad Support: All inputs are mapped natively to the Pocket's face and shoulder buttons.
- Analogizer Support: Play on a legit CRT with the Analogizer!
| Button | Action |
|---|---|
| D-Pad | Move Ship / Navigate Menus |
| A / B | Sidekick Left / Right Weapons |
| X | Primary Fire |
| Y | Change Weapon Mode (if available) |
| R1 | Secondary Weapon Mode |
| Start | Enter / Accept / Start Game |
| Select | Escape / Back / Menu / Pause |
Controls can be remapped in-game.
You will need the original Tyrian v2.1 DOS data files. These are legally available as freeware.
- Copy the
distpackage to the root of your Analogue Pocket SD Card. - Download the officially-sanctioned game data used by OpenTyrian: http://camanis.net/tyrian/tyrian21.zip
- Extract the contents of the ZIP file to a folder on your computer.
- Use the provided Python script to pack these files into a single
.romfile for the Analogue Pocket:python3 bundle_rom.py /path/to/extracted/tyrian21 tyrian.rom
- Copy the resulting
tyrian.rominto yourAssets/tyrian/obsidian.PocketTyrian/folder on your Analogue Pocket's SD Card.
##Building from Source
To build the firmware yourself, you will need a standard RISC-V GCC toolchain (specifically
riscv64-unknown-elf-gcc with multilib support). You will also need the Intel Quartus FPGA
tools to rebuild the bitfile with the corresponding bootloader image.
- Clone this repository.
- Ensure you have the
opentyriansource submoduled inthird_party/opentyrian. - Navigate to the firmware directory:
cd tyrian-pocket/src/firmware - Build the binaries:
make clean && make -j - The resulting
tyrian.binis the engine executable that the bootloader runs. - Copy the generated bootloader
firmware.mifto./src/fpga/core/firmware.mif - Recompile the Quartus project, reverse the resulting bitstream, and copy to the core directory.
This port is technically a fork of PocketDoom.
- The system uses a two-stage boot process: a tiny bootloader in FPGA BRAM loads the 300KB
tyrian.binengine and the 11MBtyrian.romasset package from the SD card into the SDRAM. - The file system (
libc/file.c) intercepts enginefopencalls and routes them to either the read-only asset ROMFS in SDRAM or the read-write nonvolatile RAMFS used for configuration and save games.
- The OpenTyrian engine is licensed under GPL2
- The PocketTyrian bootrom code is licensed under MIT
- See README_POCKETDOOM.md for licensing of the RTL and other components.
- The OpenTyrian Team: For keeping this classic game alive and accessible.
- ThinkElastic / PocketDoom: For providing the high-quality reference VexRiscv architecture and Analogue OS bridge framework that made this port possible.
- Jotego: For the
jtopl2FPGA module used to synthesize the soundtrack. - Dyreschlock: For the
tyrian.binplatform image used for the core. - RndMnkIII: For adding Analogizer support to the core.