A C++ and SDL transcode of the Road Fighter for the MSX (copyright Konami 1985).
Based on the disassembly at https://github.com/howprice/road-fighter-msx
Features
- 1:1 transcode of original game logic from Z80 to C++
- Lightweight emulation of MSX hardware (required features only):
- Texas Instruments TMS9918A Video Display Processor
- General Instruments AY-3-8910 Programmable Sound Generator
- Both versions of the original game
- Debugging windows
- Quick save/load
- Cheats
- Pause and frame step
I have tried to annotate just enough of the data to make its usage clear.
- CMake 3.22 or higher
- C++20 compatible compiler (MSVC, GCC, or Clang)
- SDL3 (automatically managed via vcpkg)
- Original MSX Road Fighter ROM (for extracting graphics)
Tested on Windows and Linux.
Install core Linux dependencies:
sudo apt-get update
sudo apt install -y build-essential curl zip unzip tar pkg-config autoconf autoconf-archive libtool ninja-build python3 python3-pip python3.12-venv libegl1-mesa-dev libxft-dev libwayland-dev
Please install all SDL3 dependencies before building for the first time. Rebuilding SDL3 later with added depenencies, may require deleting the build folder and any cached vcpkg files (see build log). e.g. "Restored N package(s) from /home/bob/.cache/vcpkg/archives"
SDL dependencies for Ubuntu 22.04 with all features:
sudo apt-get install build-essential git make \
pkg-config cmake ninja-build gnome-desktop-testing libasound2-dev libpulse-dev \
libaudio-dev libfribidi-dev libjack-dev libsndio-dev libx11-dev libxext-dev \
libxrandr-dev libxcursor-dev libxfixes-dev libxi-dev libxss-dev libxtst-dev \
libxkbcommon-dev libdrm-dev libgbm-dev libgl1-mesa-dev libgles2-mesa-dev \
libegl1-mesa-dev libdbus-1-dev libibus-1.0-dev libudev-dev libthai-dev
The repository contains two projects: asset-ripper and game.
The game project uses vcpkg for dependencies. Clone with:
git clone https://github.com/howprice/road-fighter-msx-cpp.git --recurse-submodules
Or, if already cloned (without submodules) run:
git submodule update --init --recursive
For convenience, build scripts (.bat and .sh) build scripts are provided in
Visual Studio users may prefer to use the accompanying gensln.bat files to generate .sln/.slnx/.vcxproj files and build and debug from within the IDE.
The game requires graphics from the original game ROM. In the original game, graphics are stored compressed on the ROM and are decompressed to VRAM as required. In this remake, asset-ripper is used to decompress the data from the ROM and store as files on disk, which are loaded once at initialisation time.
To extract the graphics data:
- Build
asset-ripper - Copy your legally-owned ROM to
<root>/data - Extract assets by passing rom file path as first command line argument to the tool:
cd <root>/data
../asset-ripper/build/<compiler>/<config>/asset-ripper road-fighter.rom
The game uses SDL GPU for rendering, which requires locally build shaders.
- Clone https://github.com/howprice/SDL_shadercross_build with submodules
- Build SDL_shadercross_build
- Copy binaries:
- Windows: Copy
SDL_shadercross_build/bin/shadercross.exeto<root>/bin/Windows/ - Linux: Copy
SDL_shadercross_build/bin/shadercrossand*.soto<root>/bin/Linux/
- Windows: Copy
- Run appropriate shader build script from
game/shaders/
Run the game with data/ as the working directory:
cd data
../game/build/<compiler>/<config>/RoadFighter
Playing:
- Arrow Keys / D-Pad / Left Stick: Steer
- Space / A Button: Accelerate
Debug:
- Tab: Toggle menu bar
- F5: Start: Pause
- F6: Select: Step frame (when paused)
- S: Quick save
- L: Quick load
- F1: Skip stage (debug)
Access the menu bar (Tab) for game options, debug tools, display scaling, and debug windows showing emulation internals.
Road Fighter is copyright 1985 Konami. This is a fan-made preservation project released for educational and preservation purposes. If Konami requests removal, this project will be immediately deleted.
This repository includes:
- C++ transcode of game logic
- Original game design data (level layouts, music sequences, gameplay parameters) extracted from the original ROM for preservation and educational purposes
- Hardware emulation code (VDP/PSG)
The user must provide:
- A legally-owned copy of the original MSX ROM, from which graphics will be extracted
This source code is provided under MIT LICENSE (see LICENSE)
Original game content remains © Konami.
