Retro Porting Toolkit · Bring classic console games to modern hardware

Build a toolchain

Build the console framework before you touch a game: the recompiler, the runtime, and the quick checks that prove your local setup works.

A toolchain is the developer side of a port.

It is not the game. It is the set of programs that can read a game file, generate native code, and build the runtime that surrounds it.

Before you try to port a game, prove the toolchain builds by itself.

Who is this for?

This page is for people who want to build or work on ports.

If you only want to play a finished port, you probably do not need this page. Download the port, run it, and give it the game file it asks for. Some projects may also ask for a BIOS.

Use legally obtained files. This site does not provide games or retail BIOS files.

What do I install first?

Most projects need the same basics:

NeedWhy it matters
GitGets the repository and its submodules.
CMakeCreates the build files.
Ninja or Visual StudioRuns the build.
A C or C++ compilerBuilds the runtime and generated code.
PythonRuns helper scripts, tests, and packaging tools.
SDLProvides windows, input, and audio for many runners.

Exact versions vary by project. If a project has a setup script, use it first.

When something fails, read the first error. The first error is usually the one that matters.

What am I building?

Usually two things:

  1. The recompiler.
  2. The runtime.

The recompiler translates the original machine code into host code.

The runtime models the console around that translated code: memory, video, audio, input, timing, storage, and other hardware behavior.

A clean toolchain build only proves the tools compile. It does not prove a game works.

Why use PlayStation as the example?

psxrecomp is the strongest reference path today.

Other systems differ, but the shape is similar:

  1. clone the framework;
  2. fetch submodules;
  3. build the recompiler;
  4. generate any framework support files;
  5. build the runtime;
  6. run the project's smoke checks.

The Developer quickstart walks through that reference path.

What changes by console?

ConsoleWhat to expect
PlayStationThe clearest reference flow today.
SNESStrong results, but more CPU-mode and game-specific discovery work.
NESSmall target where mappers and banking matter.
Game Boy AdvanceAlpha/experimental work with ARM and Thumb code. Some projects need BIOS handling.
Sega GenesisTwo-CPU scheduling around the 68000 and Z80.
Master System and Game GearVery early Z80 tech-demo path.
Nintendo DSAlpha-stage work around two ARM CPUs and optimization.
Virtual BoyFocused one-game tech demo.
CD-iBIOS-focused research path.

Use the platform page for the maturity level. Use the project repository for exact build commands.

What should I see after a good build?

You should have:

  • a recompiler executable;
  • a runtime build;
  • any generated framework support files the project expects;
  • passing smoke checks, if the project has them;
  • no game file copied into the framework repository.

That last point matters. Framework repositories should not contain games, BIOS dumps, or generated game code.

What usually goes wrong?

SymptomLikely cause
CMake cannot find a generated file.A generation step was skipped.
CMake cannot compile a test program.The compiler install is broken or not on PATH.
The UI build fails.A submodule was not fetched.
The build dies with little output.Too many compile jobs for available memory.
A command works in one shell but not another.The shells have different tools on PATH.

For large generated projects, try fewer build jobs before assuming the source is wrong.