Top Gear 2 Recomp

Top Gear 2 Recomp is a native PC port of Top Gear 2 for Sega Genesis that offers widescreen display, true 60 fps races, and combined music and sound effects.

README

Top Gear 2 Recomp

TG2Recomp: silver sports car at a fiery sunset

A native, widescreen, 60 fps static recompilation of Top Gear 2 (USA) for the Sega Genesis / Mega Drive.

The game's 68000 code is translated to C and compiled into a native program. No emulator core is involved. You supply your own cartridge dump: no ROM is included, and generated C is not part of the source repository.

Top Gear 2 title screen The start of a race in Egypt in 16:9 The game's Race Sound menu showing the new BOTH choice

Status and features

Top Gear 2 Recomp plays the whole game, from the title screen through races in all 16 countries, on Linux (x86_64, including Steam Deck), Windows (x64) and macOS (Apple Silicon and Intel).

  • Original, Adaptive, 16:9, 21:9 and 32:9 display modes. The road, scenery, opponents and roadside objects extend into the extra width. Adaptive fits the width of your window or screen. Rain and snow are drawn across the widescreen margins. The HUD can stay centred or move to the screen edges.

  • True 60 fps races. The original draws about 30 new race pictures per second. This mode presents 60, while gameplay, physics and lap times stay identical to the original. The cost is 50 ms of extra display latency, and you can turn it off.

  • Music and sound effects together. The original makes you choose music or sound effects during races. A new BOTH choice in the game's own Sound → Race Sound menu plays them together.

  • Hide overscan. Removes the empty black bands a CRT television never showed: eight lines at the top of the race screen (they held only the stray boot marks) and sixteen at the bottom, so the race picture fills the window. Menus, results and split-screen keep their full picture.

  • Quality of life. A launcher, an in-game options menu that works with a controller alone, save states, rewind and fast-forward. Save and load show notices at the top left (for example STATE SAVED TO SLOT 1 and STATE LOADED FROM SLOT 1). A save requested between races is written at the start of the next race (SAVING AT NEXT BOUNDARY...). The button that closes the options menu does not leak into the game.

With every option off, the picture is byte-identical to the original game.

It has been played on Linux (x86_64), macOS (Apple Silicon) and the Steam Deck. Windows and macOS on Intel are built in CI and pass headless smoke tests, but they still need play on real hardware; treat those builds as release candidates until they are. See docs/STATUS.md for the current state and docs/ROADMAP.md for what comes next.

Widescreen

The same moment of a race in Original (the Genesis's 256-pixel-wide race frame), 16:9 and 21:9. The wider views reveal the tyre stack on the left and the tree on the right, which the original frame cuts off. All three have Hide overscan on, so the empty black bands above and below the race are cropped.

Original view of the race
Original

16:9 view of the same race moment
16:9

21:9 view of the same race moment
21:9

Menus, the shop and the results screens are shown in their original width, centred. Extending every non-race screen that has scenery is planned.

Tracks

The game has 64 races in 16 countries, with night, snow, rain and fog.

A sunny race in France in 16:9 A night race in Australasia in 16:9 A snow race in Canada in 16:9
France, Australasia at night, and Canada in the snow.

ROM requirements

Use a Top Gear 2 (USA) cartridge dump:

PropertyValue
Size1,048,576 bytes
CRC32BD3074D2
SHA-256b41909d53090e28c1d1e50941dad01676dd3d19caf26c75f66aac6a3ad689ba6

The game finds the ROM by its content, so any file name and extension work.

Download and install

Download versioned builds from the GitHub Releases page. Every download is self-contained: SDL and the C/C++ runtime are linked in, and there is nothing to install, compile or generate.

Release assets:

PlatformFileRequirements
Linux / Steam DeckTG2Recomp-x86_64.AppImage (single file) or TG2Recomp-linux-x86_64.tar.gzx86_64, glibc 2.35 or newer (SteamOS 3.x, Ubuntu 22.04+), OpenGL
WindowsTG2Recomp-windows-x64.zipWindows 10/11 x64
macOSTG2Recomp-macos.zip (universal: Apple Silicon and Intel; contains TG2Recomp.app)macOS 11 or newer
All platformsSHA256SUMSchecksums for the files above
Linux
  1. Put TG2Recomp-x86_64.AppImage and your ROM in the same folder.
  2. Make the AppImage executable once (file manager: Properties → Permissions → Is executable, or chmod +x TG2Recomp-x86_64.AppImage).
  3. Double-click it, or run ./TG2Recomp-x86_64.AppImage.

If your system has no FUSE, run it once as ./TG2Recomp-x86_64.AppImage --appimage-extract-and-run. The tarball is the same program as a plain folder: extract it, put the ROM next to TG2Recomp and run it.

Steam Deck
  1. In Desktop Mode, copy the AppImage and your ROM into one folder, for example ~/Games/TopGear2.
  2. Right-click the AppImage → Properties → Permissions → Is executable.
  3. In Steam: Games → Add a Non-Steam Game → Browse, select the AppImage, then Add Selected Programs.
  4. Return to Game Mode. The game is in your library. It is designed for controller-only play in Game Mode; no terminal is needed after setup.

In Game Mode (gamescope) the game starts fullscreen at the panel's own size, so Widescreen → Adaptive fills the Deck's 16:10 screen instead of showing a 16:9 picture with bars. Set Fullscreen in the options menu if you want to change that.

Windows
  1. Extract the whole ZIP to a writable folder, such as one under your user account. Don't run it from inside the ZIP.
  2. Put your ROM in the same folder as TG2Recomp.exe.
  3. Open TG2Recomp.exe.
macOS
  1. Extract TG2Recomp-macos.zip and move TG2Recomp.app to Applications.
  2. The app is not signed with an Apple Developer ID or notarised, so clear the download quarantine once in Terminal: xattr -dr com.apple.quarantine /Applications/TG2Recomp.app
  3. Open TG2Recomp.app. On the first launch, pick your ROM in the launcher. The app copies it to ~/Library/Application Support/TG2Recomp/ and boots straight into the game from then on, so the original file can go.

Instead of the Terminal step you can allow the app under System Settings → Privacy & Security → Open Anyway (see Apple's instructions). If the icon then keeps bouncing and the game never opens, macOS lost its confirmation dialog: restart the Mac and use the Terminal step.

To keep the game portable instead, leave TG2Recomp.app in any folder outside Applications and put the ROM in the same folder, next to the app.

Settings, saves and updating

If no matching ROM is found next to the program, the launcher lets you pick one.

settings.ini, save states and (only when you turn diagnostics on for a bug report) logs are written next to the executable. On macOS an app in Applications keeps them in ~/Library/Application Support/TG2Recomp/, together with the copy of the ROM you picked, and also looks for the ROM there. A portable copy elsewhere writes them next to TG2Recomp.app, or to that Application Support folder when its own folder is read-only.

Your championship progress is kept by the game's own passwords, as on the cartridge. To restore money and car parts, use CONTINUE → PASSWORD (the upper row), not COUNTRY SELECT. On the password screen the symbol is V, not U. For example, the Germany preset J4?Z 1]PD #F]\ 4\V? gives max money and every upgrade at the top level for both cars, loading at Germany, race 1. Full codec details, country/route notes, and more ready-to-type passwords are in docs/PASSWORDS.md.

To update, quit the game and replace the program files, keeping settings.ini and your save states. On macOS, replacing TG2Recomp.app in Applications is enough: your files stay in Application Support. Delete settings.ini to restore every option to its default.

Controls and settings

GenesisKeyboardGamepad (Xbox layout)
D-padArrow keysD-pad
A / B / CZ / X / CB / A / X
X / Y / ZA / S / DY / LB / RB
StartEnterStart
ModeBackspaceBack

With the game's default control setup, B accelerates, A brakes and C fires the nitro. The game's own Control menu can change this. Player 2 uses I/J/K/L to steer, N/M/comma for A/B/C and Right Shift for Start, or a second gamepad.

ActionKeyboardGamepad
Options menu (pauses the game)EscBack + RB
FullscreenF11, Alt+Enter, or Ctrl/Cmd+F
Save state (slot 1–9)Shift+F1 … Shift+F9
Load state (slot 1–6, 9)F1 … F6, F9
Save-state browserF7
RewindF8Back + R3
Fast-forward (hold)Tab

On Mac keyboards, use fn with the function keys unless System Settings → Keyboard has “Use F1, F2, etc. keys as standard function keys” enabled. Slot 7 and 8 still save with Shift+F7 / Shift+F8; plain F7 opens the save-state browser and plain F8 rewinds.

The options live in the launcher and in the in-game options menu, and are saved to settings.ini:

OptionChoicesDefault
WidescreenOff, Adaptive, 16:9, 21:9, 32:9Adaptive
60 fps racesOn, OffOn
HUDCentered, EdgesCentered
Hide overscanOn (crops the empty top/bottom race bands), OffOn
Race soundSound effects, Music, BothSound effects
Diagnostics (bug report)On, OffOff

Race sound is also in the game's own Sound menu. Both menus change the same setting. Linear filter (Graphics) is off by default and avoids edge artifacts at the picture boundary (see docs/LINEAR_FILTER.md). A change to 60 fps races takes effect from the next race.

Build from source

The build generates C from your ROM, so it needs the ROM at build time. The ROM is read in place: it is never copied into the repository or the output.

Clone the project with its submodules:

git clone --recursive https://github.com/vittau/top-gear-2-genesis-pc.git
cd top-gear-2-genesis-pc
Linux (x86_64)

Requirements: Git, Python 3, CMake 3.19+, Ninja, a C11/C++17 compiler, and the SDL2 build dependencies. On Ubuntu or Debian:

sudo apt-get install --no-install-recommends \
  build-essential cmake ninja-build pkg-config python3 \
  libasound2-dev libpulse-dev libudev-dev \
  libx11-dev libxext-dev libxrandr-dev libxi-dev libxcursor-dev \
  libxss-dev libxxf86vm-dev \
  libwayland-dev libxkbcommon-dev wayland-protocols \
  libgl1-mesa-dev libegl1-mesa-dev libgles2-mesa-dev

Then build and run a development build:

JOBS=4 tools/build-linux.sh /path/to/your/tg2.bin build
build/TG2Recomp /path/to/your/tg2.bin

tools/build-linux.sh applies the engine patches from patches/segagenesisrecomp/, generates C from the ROM and compiles. JOBS sets the number of parallel compile jobs. The generated C is large, so keep it low on machines with little RAM. The development build includes a debug server and diagnostics. Release builds leave them out:

sdl=$(python3 tools/release/fetch-sdl.py --dest /tmp/tg2-sdl)
tools/release/build-linux.sh --rom /path/to/your/tg2.bin --sdl "$sdl"

This downloads and verifies the pinned SDL2 source, links it statically, and stages the release folder, tarball and AppImage under build-release/. Run it on the oldest glibc you want to support. The official builds use Ubuntu 22.04 (glibc 2.35). On a newer host, set TG2_SKIP_GLIBC_CHECK=1 to skip the glibc 2.35 floor check for a local package.

macOS

Requirements: Xcode Command Line Tools, Python 3, CMake 3.19+ and Ninja (brew install cmake ninja).

sdl=$(python3 tools/release/fetch-sdl.py --dest /tmp/tg2-sdl)
tools/release/build-macos.sh --rom /path/to/your/tg2.bin --sdl "$sdl"

This builds a universal2 TG2Recomp.app and its ZIP under build-release/. Add --architectures arm64 (or x86_64) for a faster build for your own Mac only.

Windows (x64, MSVC)

Requirements: Git, Python 3, and Visual Studio 2022 (or its Build Tools) with the Desktop development with C++ workload and CMake. From a x64 Native Tools PowerShell:

$sdl = python tools/release/fetch-sdl.py --dest "$env:TEMP\tg2-sdl"
.\tools\release\build-windows.ps1 -Rom C:\path\to\tg2.bin -SdlSource $sdl

The staged folder, with TG2Recomp.exe, is under build-release\dist\windows\.

Packaging, CI and the release process are described in docs/RELEASING.md.

Documentation

DocContent
docs/STATUS.mdCurrent state and known limitations
docs/ROADMAP.mdPlanned work after v0.1.0
docs/BRINGUP.mdHow the recompilation was brought up
docs/WIDESCREEN.mdWidescreen renderer design
docs/FRAMERATE.md60 fps design and the physics parity proof
docs/AUDIO.mdThe sound drivers and the BOTH option
docs/PERFORMANCE.mdFrame timing and audio pacing
docs/VALIDATION.mdTest ledger: all 16 tracks, long soak runs
docs/RELEASING.mdBuilds, packaging and releases
docs/RAM_MAP.md, docs/PASSWORDS.mdReverse-engineering notes

Report bugs with your platform, the build version (in BUILD-INFO.txt; on macOS inside the app, under Contents/Resources), your settings, and the steps to reproduce them. Don't attach ROMs, save states or generated code.

Diagnostics are off in normal play, so a normal session writes no logs. For a bug report, turn them on for one session:

  • On a Steam Deck or with a controller: open the options menu (Esc / Back + RB), choose Mods → Diagnostics (bug report) → On, then quit and start the game again and reproduce the problem. The choice is saved, so turn it back Off afterwards.
  • On desktop: the same switch is in the launcher's Mods page, or start the game once with --debug (for example ./TG2Recomp-x86_64.AppImage --debug); --debug is not saved.

Diagnostics write a feedback replay to logs/ next to the program (TG2-feedback.replay plus its .config.ini, .mods.txt and .sav sidecars), together with the runtime evidence files (dispatch_misses.toml and friends). Attach the whole logs/ folder and those .toml files; they are not needed for ordinary play and can be deleted afterwards.

Support the project

If you enjoy the port, you can support its development through GitHub Sponsors or Buy Me a Coffee.

Development disclosure

AI coding assistants wrote most of the code, tools, tests and documentation in this repository, under the maintainer's direction and review.

Credits and license

Built on segagenesisrecomp and recomp-ui, by Matthew Stanley and contributors: the recompiler, runtime and launcher this port uses.

Original code in this repository is licensed under the PolyForm Noncommercial License 1.0.0: free for non-commercial use.

Required Notice: Copyright 2026 Vitor Machado (https://github.com/vittau)

The submodules keep their own licenses (see LICENSE.md). The ROM, the generated game code and the game's artwork are not covered by the project license. The screenshots illustrate the project; the artwork shown belongs to its rights holders. This is an unofficial fan project, not affiliated with or endorsed by Kemco, Gremlin Graphics, Sega or any other rights holder. Top Gear 2 is © 1994 Kemco / Gremlin Graphics Software.