
**A native PC port of F-Zero X (N64), including 64DD Expansion Kit support.**
[](#platforms)
[](#platforms)
[](https://github.com/Kenix3/libultraship)
[](https://github.com/inspectredc/fzerox)
[](https://discord.gg/gpaM8qK9NK)
[](LICENSE)
---
G-Diffuser runs F-Zero X natively on your PC — no emulator at runtime. It is a fully decompiled source port
built on top of the [inspectredc/fzerox](https://github.com/inspectredc/fzerox)
matching decompilation and the [Kenix3/libultraship](https://github.com/Kenix3/libultraship)
runtime (the same engine behind Ship of Harkinian and Starship, along with other PC ports like
Battleship). On top of the original
game it adds true widescreen rendering, an in-game enhancement menu, quality-of-life features,
texture-pack modding, and full support for the **64DD Expansion Kit** — Course Edit and the DD
cups included.
The repository ships **no** Nintendo ROM, disk, IPL, or extracted game assets. You bring your own
legally obtained dumps; game data is extracted or loaded locally from the files you supply.
## Features
- **True widescreen** — the game renders in 16:9 (`gEnhancements.Graphics.Widescreen`), with an
optional **widescreen-anchored HUD** so on-screen elements sit at the screen edges instead of
being stretched from 4:3 (`gEnhancements.Graphics.WidescreenUI`).
- **Ultrawide support (21:9 and wider)** — an opt-in mode widens the game's own culling so track
pieces, machines, fireworks and background stars stop popping at the edges of ultrawide
windows; the HUD anchors to the true corners (`gEnhancements.Graphics.UltrawideMode`).
- **Black border removal** — the original game framed every screen inside the CRT overscan-safe
area, which shows as a black border on modern displays. An opt-in toggle opens the picture to
the true edges on every screen (`gEnhancements.Graphics.RemoveBorders`), with a companion
toggle to hide the race-intro wipe curtain (`gEnhancements.Graphics.HideRaceCurtain`).
- **High-refresh frame interpolation** — the simulation runs at its true 60 Hz while rendering
interpolates smoothly up to your monitor's refresh rate (144 Hz and beyond), covering the
camera, racers, effects and UI. WARNING: NOT PERFECT: While I did my best efforts to implement this in full capacity, it might get some slowdowns rarely, especially after screen transitions. I will do my best to keep optimizing this feature in future releases.
- **Discord Rich Presence** — off by default; when enabled it shows your mode, course, lap and
position on your Discord profile, with per-field privacy toggles so you choose exactly what is
visible (`gEnhancements.Online.DiscordPresence`).
- **In-game enhancement menu** — a full ImGui menu opened with **F1** (also Escape or Gamepad
Back). Graphics, audio, gameplay, practice, ghosts and workshop tabs, keyboard- and
controller-navigable.
- **64DD Expansion Kit** — loads the translated EK disk image and the 64DD IPL ROM to unlock the
**Course Edit** track editor and the DD cups.
- **Ghost library** — import/export ghost replays as `.gdg` files, a per-course host-side ghost
library, and a **Ghost Browser** window, all alongside the game's own SRAM ghost slot.
- **Photo mode** — hide the HUD while paused in a race for clean captures
(`gEnhancements.Practice.PhotoMode`).
- **Practice lap deltas** — your last lap versus your session best, drawn in Practice mode
(`gEnhancements.Practice.ShowLapDeltas`).
- **Texture-pack modding** — drop `.o2r` packs in a `mods/` folder to override textures
(`gEnhancements.Workshop.TexturePacks`), with hot reload from the menu.
- **Asset dumping** — decode named assets straight from the extracted archive, per class, from the
Workshop tab. See the [modding guide](docs/MODDING_GUIDE.md) to turn a dump into a pack.
- **Durable 64DD save sidecar** — Course Edit saves and disk writes are journaled to a sidecar
file next to the game; your original `.ndd` disk image is **never** modified.
- **Modern rendering knobs** — internal resolution scale, MSAA, texture filtering, VSync,
z-fighting mitigation, draw distance, and frame pacing.
- **Input** — keyboard and SDL controller support (including DualSense), plus a draggable
on-screen **N64 input viewer** overlay.
- **Developer tools** — live Stats, an optional top-right FPS/frame-time overlay, a command
Console, and the Fast3D graphics debugger under **Dev Tools**.
## Planned features
All of the vanilla content — cartridge and Expansion Kit — is playable from start to finish
today. These are the next things planned for G-Diffuser:
- **Mouse control in Course Edit** — point-and-click track editing instead of driving the cursor
with a pad.
- **Content export and import** — share a custom track or a Create Machine vehicle as a single
file another player can drop in and race, author ghosts included.
- **Better modding support** — per-tile font/atlas overrides and paletted (CI4/CI8) texture
encoding, the two big gaps in what packs can replace today.
- **Players 2–4 on gamepads** — full multi-controller support for VS and split-screen.
- **Full controller navigation** of the enhancement menu.
- **Japanese version support** — the original JP ROM and disk as a selectable profile.
## Quick Start
> **You must provide your own legally-obtained F-Zero X ROM. G-Diffuser does not, and will
> never, distribute copyrighted game files.**
1. **Get the game files you own.** G-Diffuser needs an F-Zero X **US rev0** ROM dump. It must be
**big-endian (`.z64`) byte order** — the loader does not byte-swap, so a `.n64` or `.v64` dump
must be converted to `.z64` first or it will be rejected. Setup auto-detects a ROM named
`baserom.us.rev0.z64` beside the executable; any other filename works too, as long as you point
the first-boot wizard at it with **Browse** — it is copied in under the canonical name.
2. **Download** a G-Diffuser release for your platform, or build it yourself (see
[Building](#building)).
3. **Launch** the executable. On first boot the setup screen detects files already beside the
executable and lets you review, replace, or choose the ROM, Expansion Kit disk image, and 64DD
IPL ROM. Extraction begins only after you select **Build game data and continue**. Everything
remains beside the executable so later launches boot directly into the game.
4. **Play.** Press **F1** at any time to open the enhancement menu.
**Updating.** Saves are stored in `saves/` beside the executable, and every release unpacks to a
folder named `G-Diffuser`. To update, extract the new release into the same place as your current
install, replacing its files: your `saves/`, ROM and game data stay where they are. On Windows,
**Extract All** proposes a new folder named after the zip, so change the destination to the folder
that contains your existing `G-Diffuser` folder.
### Expansion Kit files (required)
G-Diffuser is a port of the full Expansion Kit experience — Course Edit, the DD cups, and the
disk save system are core features, not add-ons — so these two files are required alongside the
ROM:
| File | What it is |
| --- | --- |
| `baserom.translated.ek.ndd` | The fan-translated Expansion Kit disk image (English translation by Zoinkity, adapted to the 64DD disk image by LuigiBlood). The loader also accepts `baserom.jp.ek.ndd` for the original Japanese disk. A retail 64DD image is ~64.9 MB. |
| `N64DDIPLROM.n64` | A 64DD IPL / drive ROM dump (~4 MB). Supplies the drive's built-in font. The US prototype dump is also accepted under its own name, `64DD_IPL_US_MJR.n64` — no renaming needed. |
Place them next to your ROM (or feed them to the first-boot wizard). Setup will not complete
without them.
## Controls
Open or close the enhancement menu with **F1**, **Escape**, or **Gamepad Back**. Toggle
fullscreen with **F11**. Menu navigation from a controller is opt-in via the menu's
controller-navigation toggle.
## Platforms
| Platform | Renderer |
| --- | --- |
| **Windows** | Direct3D 11 |
| **Linux** | OpenGL (SDL2) |
| **macOS** (Apple Silicon) | Metal |
All three targets are driven by libultraship's Fast3D renderer.
**Linux requirements:** glibc 2.35 or newer — Ubuntu 22.04+, Debian 12+, Fedora 36+, SteamOS 3,
or any rolling distribution. No CPU features beyond the x86-64 baseline are needed, so anything
64-bit will do. Libraries that distributions do not reliably ship travel in `lib/` beside the
executable, so nothing has to be installed first.
**macOS:** Apple Silicon only, tested on an M1; Intel Macs are untested. The nightly release
carries a `macos-arm64` tarball for macOS 11 or newer, with SDL2 in `lib/` beside the executable
so nothing has to be installed first. The build is not signed with an Apple Developer ID, so
macOS blocks the first launch. Allow it once under **System Settings > Privacy & Security**, or
clear the download flag from Terminal:
```sh
xattr -dr com.apple.quarantine G-Diffuser
```
You can also build from source (see [Building](#macos)).
## Custom Assets
The release includes `gdiffuser.o2r`, which contains only the MIT-licensed Fast3D shaders needed
to initialize the renderer. On first boot, `gdx-extract` uses your ROM and the CC0-licensed
`decomp-recipes/` metadata to generate your local `fzerox.o2r`. That generated archive contains
game-derived data and must not be redistributed with G-Diffuser.
To mod the game, place `.o2r` packs in a `mods/` folder next to the game, enable their kind on
**Workshop > Mods**, and click **Reload packs**. Packs can replace textures, music, sound effects,
instruments, and machine models, or add Lua scripts. The [modding guide](docs/MODDING_GUIDE.md)
has a step-by-step guide for each, plus a walkthrough for code mods.
## Building
G-Diffuser is a CMake project. It pulls in four components: `libultraship/`
(Kenix3/libultraship — runtime + Fast3D renderer), `torch/` (HarbourMasters/Torch — build-time
asset extraction), `decomp/` (inspectredc/fzerox — the F-Zero X C source), and
`fzerox-expansion-kit/` (the Expansion Kit decompilation reference). Clone with
submodules:
```sh
git clone --recursive https://github.com/Zorkats/G-Diffuser.git
```
### Windows
| Prerequisite | Notes |
| --- | --- |
| **Visual Studio 2022** | MSVC toolset, "Desktop development with C++" workload |
| **CMake 3.24+** | The top level asks for 3.20, but `libultraship/` requires 3.24 |
| **Python 3** | Required, not optional — CMake configure fails without an interpreter (build-time asset generators). The generators also need **PyYAML** and **Pillow** |
> Build from a clean shell **without** MSYS2/MinGW on your `PATH`, or MSVC may pick up MinGW
> headers. Use a Developer Command Prompt (`vcvars64`).
```sh
# Configure. Visual Studio is CMake's default generator on Windows; USE_AUTO_VCPKG lets
# libultraship bootstrap its own vcpkg into the build tree, so no manual vcpkg install is needed.
cmake -S . -B build/x64 -DUSE_AUTO_VCPKG=ON
# Build. --config Release is REQUIRED here: the Visual Studio generator is multi-config, so it
# ignores -DCMAKE_BUILD_TYPE and picks the configuration at build time.
cmake --build build/x64 --config Release --target G-Diffuser
```
The executable lands in `build/x64/port/Release/`. Other targets: `ALL_BUILD` builds everything
including the console test executables; `G-Diffuser-JP` exists only when you configure with
`-DGDX_BUILD_JP=ON`.