A Supaplex clone for TMS9918A powered computers with a PICO9918 enhanced VDP replacement, written in CVBasic with a TMS9900 assembly GPU engine.
| Platform | Windows | Linux | macOS |
|---|---|---|---|
| ROMs |
Any of the following, fitted with a PICO9918 (or compatible enhanced VDP with sufficient VRAM) in place of the stock TMS9918A:
- TI-99/4A
- ColecoVision
- MSX
- NABU
- SC-3000/SG-1000
Can be compiled for other targets supported by CVBasic too.
The original F18A is not currently supported - it does not have enough VRAM to hold all of RetroPLEX's assets and GPU code. Making it fit is on the roadmap.
You can play the latest build for the TI-99/4A (with PICO9918) online courtesy of JS99'er: RetroPLEX on JS99'er
RetroPLEX loads the original Supaplex LEVELS.DAT and runs the game engine on the enhanced VDP's GPU. The host CPU (TMS9900, Z80, or 6502, depending on target) is used primarily for orchestration, audio, and I/O. Rendering, scrolling, and enemy logic run as TMS9900 assembly executing in VRAM on the GPU itself - that code is portable across hosts because it runs on the VDP.
- A supported host (see Supported devices) fitted with a PICO9918 in place of the stock TMS9918A
- TI-99/4A additionally needs a 32K memory expansion
- A way to run the built cartridge/ROM on the host (cartridge loader, disk, emulator with PICO9918 support, etc.)
Work in progress. Expect missing features, rough edges, and ongoing changes.
- CMake 3.13 or later
- Python 3 with Pillow (for graphics conversion - see
tools/requirements.txt) - Git
- C compiler (GCC, Clang, MSVC, etc.)
The build system automatically downloads and builds all required tools from source:
- CVBasic - Cross-compiler
- gasm80 - Z80/6502 assembler
- XDT99 - TI-99/4A cross-assembler
- Pletter - Graphics compression
# Clone the repository
git clone https://github.com/visrealm/retroplex.git
cd retroplex
# Create build directory
mkdir build
cd build
# Configure
cmake ..
# Build all platforms
cmake --build . --target all_platformsROMs will be generated in build/roms/, with intermediate assembly under build/asm/.
Build specific platforms:
cmake --build . --target ti99 # TI-99/4A
cmake --build . --target coleco # ColecoVision
cmake --build . --target msx_asc16 # MSX (ASCII 16K)
cmake --build . --target msx_konami # MSX (Konami)
cmake --build . --target nabu # NABU
cmake --build . --target sg1000 # SG-1000/SC-3000
cmake --build . --target creativision # CreatiVisionEnabled targets are listed in project-config.cmake.
# Use existing tools instead of building from source
cmake .. -DBUILD_TOOLS_FROM_SOURCE=OFFGitHub Actions workflows under .github/workflows/ build on Windows, Linux, and macOS for every push, pull request, and manual dispatch. Each run uploads the produced ROMs as an artifact named retroplex_<version>_<os>.
The build is glob-driven - drop a file into the right directory and it is picked up automatically on the next CMake run (via CONFIGURE_DEPENDS globs). There are three automatic pipelines:
Any .a99 file anywhere under src/gpu/ is run through the full GPU pipeline:
.a99 --[xas99]--> .bin --[bin2cvb]--> .bin.bas --[pletter]--> .bin.pletter.bas
- xas99 (from XDT99) assembles TMS9900 source to a raw binary.
tools/bin2cvb.pywraps the binary as CVBasicDATA BYTErows so it can be embedded in the cart.tools/cvpletter.pyruns the payload through Pletter compression and emits a.pletter.basthat unpacks at runtime.
Outputs land in src/gen/gpu/ (gitignored). They're regenerated whenever the source .a99 changes. This is how the game engine (gameloop, scrolling, moving objects, renderers) gets shipped into the cartridge and uploaded to VRAM for the F18A/PICO9918 GPU to execute.
Any .bas file in src/pletter/ is treated as uncompressed DATA BYTE payload and run through Pletter:
file.bas --[pletter]--> file.pletter.bas
Outputs land in src/gen/pletter/ (gitignored). This is where tile sheets, sprites, palettes, the status panel, font bitmaps, and the level pack are compressed before being linked into the ROM.
The root-level .bas files (CVBasic source for the host CPU) are compiled by CVBasic into platform-specific assembly, then assembled and linked into cartridges for each enabled target. The TI-99 pipeline additionally runs linkticart.py to produce a properly headered cartridge, auto-detecting banked vs non-banked builds.
CMake fetches and builds the required toolchains on first configure. You don't need to install anything by hand:
- CVBasic - Oscar Toledo G.'s BASIC-like cross-compiler; the host CPU language.
- gasm80 - Z80/6502/TMS9900 assembler used by CVBasic's output.
- XDT99 - TI-99 developer toolkit (provides
xas99andlinkticart). - Pletter - LZ-family compressor with a small unpacker suitable for 8-bit machines.
cvpletter.py- wraps Pletter to operate on CVBasicDATA BYTEsections.bin2cvb.py- converts a raw binary into a CVBasicDATA BYTEblock.bmpfont2cvb.py- converts a bitmap font PNG into CVBasic data.levels_dat_to_bas.py- converts a SupaplexLEVELS.DATinto a.basthat the pletter pipeline can compress.a99lint.py/cvblint.py- lightweight linters for TMS9900 assembly and CVBasic sources.
- New GPU code: create a
.a99file anywhere undersrc/gpu/- no CMake edits required. - New compressed asset: drop a
.basfile intosrc/pletter/- no CMake edits required. - New platform target: add it to
ENABLED_TARGETSinproject-config.cmake.
src/*.bas- CVBasic sources compiled for the host CPU (TMS9900 / Z80 / 6502 depending on target): boot, loader, audio, input, level unpackingsrc/gpu/*.a99- TMS9900 assembly that runs on the F18A/PICO9918 GPUsrc/gpu/game/- gameplay engine: game loop, scrolling, movement, renderingsrc/gpu/game/moving/- per-object behaviour (Murphy, zonks, infotrons, sniksnaks, electrons, orange disks, explosions, bugs)src/gpu/game/render/- sprite, tile, and text renderingsrc/pletter/- compressed asset sources (tiles, sprites, palette, panel, levels, fonts)src/lib/- CVBasic runtime prologues/epiloguesres/- game assets:LEVELS.DAT, Magellan tile/sprite sheets, palettes, panel graphicstools/- helper scripts:cvpletter.py,bin2cvb.py, bitmap/font converters, lintersdocs/- design spreadsheets (VRAM map, tile map, object state encoding).vscode/extensions/- syntax highlighting for CVBasic and TMS9900 assemblyCMakeLists.txt+visrealm_cvbasic.cmake- build systemproject-config.cmake- enabled targets and project metadata
- Original Supaplex - Dream Factory / Digital Integration (1991)
This code is licensed under the MIT license.
Supaplex and its assets remain the property of their respective owners. This repository contains no original Supaplex code or artwork; LEVELS.DAT is the standard community level pack bundled for compatibility testing.