G-Diffuser

G-Diffuser is a community source port of F-Zero X that runs on Windows, Linux, macOS and Android.

README

G-Diffuser

A native PC port of F-Zero X (N64), including 64DD Expansion Kit support.

Platform Renderer Built on Decomp Discord 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 matching decompilation and the 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, post-process shaders, mod packs, shareable tracks and machines, ROM hack support, and full support for the 64DD Expansion Kit, with a much expanded 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

Options live in the enhancement menu, which opens with F1. Editing tools are in Course Edit itself.

Graphics

  • 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.
  • Post-process shaders: RetroArch .slangp presets such as CRT Royale and crt-geom, with live parameter sliders and your own saved presets. Put presets in a shaders/ folder next to the game. See the shader guide.
  • Track depth test: on by default, so a track inside a tube no longer flickers.
  • Machine detail and lighting: adjustable detail for machines and boosters, forced machine shadows, and a preliminary Fancy lighting option. Thanks to NewGBAXL.
  • Modern rendering knobs: internal resolution scale, MSAA, texture filtering, VSync, z-fighting mitigation, draw distance, and frame pacing.

Racing

  • Continue Cup: leave a Grand Prix between races and pick it up later from the main menu.
  • Single Race rules in Practice: 1 to 99 laps or unlimited, a chosen number of CPU racers, and an optional random rival. These races never write records, ghosts or points. Lap digits by Heebeejeebees.
  • Race setup: a custom starting grid and an AI aggression slider.
  • X Cup seed codes: share a generated course as a code, queue several codes to play them in order, and copy the codes of the cup you just played.
  • X Cup real courses: an option that makes each X Cup course a random stock or Expansion Kit course, six different ones per cup. CPU racers use that course's tuning. Seed codes are off while it's on.
  • Save an X Cup track: after a race, save the generated course you just played as a Course Edit track.
  • Skippable ending and credits: hold START for about a second.
  • 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).
  • Achievements and playtime: local achievements and playtime tracking, stored in saves/.

Machines and colors

  • Machine stat editor: override body, boost, grip and weight per machine.
  • Machine palette editor: recolor machines and keep the result.
  • Random opponent colors: shuffle rival machine colors each race.
  • Effect colors: pick the colors of boost trails, side-attack glow and ghost boost trails.

Course Edit and the 64DD

  • 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.
  • 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.
  • Undo and redo: with an optional History panel of the last 32 changes. Click a row to jump back to it.
  • Up to 127 control points: the combined main and alternate paths share this limit. Geometry and gadget budgets are separate; an over-budget course refuses generation or test drive.
  • Forks: the Split, Insert and Link tools build a second path. Path B can span several segments. Point and track settings shows the active path and has A/B selectors. Inactive nodes stay visible without Split; Ctrl+click one in Course mode to select it. Junction rendering clips near-coincident Path B faces against Path A using a bounded retained mesh. Driving and visual acceptance remain unverified; see the limits in the guide below.
  • Fork minimaps: optionally include alternate roads in the race minimap and Content Library preview. The preference defaults off.
  • Part and track settings: edit pit/lava, dirt, and ice coverage, per-magnet strength and range, and track-wide lava/magnet settings. These settings and forks travel in .gdxp exports. See Course Edit settings and limits before sharing tracks with older builds. Both paths support segment parts; their outgoing fork-start parts and settings can differ. Shared gate, building, and sign placement stays shared.
  • Lava strips: left, right, middle or both sides. They drain energy and kill at zero, and CPU racers steer away from them. "Lava strips never kill" turns off the kill.
  • Magnet traps: thin pulsing rails on the left, right or middle of the road. Side magnets pull machines toward the track edge and middle magnets pull them onto the center line, with their own warning sound and adjustable pull strength and range. CPU racers steer away from them. They can't be placed on pipes, half-pipes or cylinders.
  • CPU hazard coverage: an optional CPU track-hazard avoidance setting uses saved strip widths and magnet ranges when choosing a lateral target. It defaults off and does not route CPUs onto alternate paths. A full-width hazard can leave no safe target.
  • Mouse editing: drag point position, height, width, bank and offset, with multi-select and box select. Create Machine has a mouse cursor too.
  • Blender-style camera: orbit and pan with a button you choose, and zoom with the wheel. Sensitivity and inversion are adjustable.
  • Shaping tools: bank snap at 45, 90 or 180 degrees, typed Width, Center, and Bank values, and lining up a run of three or more points. Enable Course Edit mouse input, select the tool and points, press Enter, type a value, then press Enter to apply or Escape to cancel. Bank rounds to the nearest 3 degrees.
  • Keys and help: number-key shortcuts, rebindable tool keys, a hint strip for the current tool, and a Controls Help page showing your live bindings.
  • Test drive: choose the machine and engine, and drive in widescreen.
  • Per-track options: names up to 20 characters, custom music from music/, and an ending scene option. An experimental toggle raises the height ceiling from 5,000 to 30,000, but those tracks won't load on real hardware or in other Expansion Kit tools.

Controls

  • Input: keyboard and SDL controller support (including DualSense) with rumble, plus a draggable on-screen N64 input viewer overlay.
  • Players 2 to 4: assign controllers to ports, or let them assign themselves as they connect.
  • Controller profiles: keep separate setups and switch between them.
  • Input actions: remap what each button does separately in races, in Course Edit and in menus.
  • Steering curve: set how stick travel maps to steering for each controller port. 1.00 is stock, higher is gentler near center, lower is sharper, and full lock doesn't change.
  • Mouse steering: steer races with the mouse, with adjustable sensitivity.

Audio

  • Separate volume sliders: master, music and sound effects.
  • Streamed music replacement: play your own .ogg, .flac or .wav for any BGM from music/ beside the executable. See the custom music guide.

Sharing and mods

  • Content Library: a card-based view of your tracks and machines, with click-to-assign Edit Cup slots and a track preview that shows the start and direction. Thanks to airon-main.
  • Recoverable track deletion: remove an installed track and its cup references from the Content Library, with exact-name confirmation and a retained per-track Restore record. Interrupted confirmed operations finish on restart. See deletion and recovery.
  • Shareable files: a track or a whole Edit Cup exports as a .gdxp package that carries its custom music, and a machine as a .gdxc file. See the sharing guide.
  • Import from a disk image (experimental): read tracks and machines straight out of a 64DD disk dump from an emulator or a console.
  • G-Diffuser Companion (Windows and Linux): a separate desktop program that installs replacement music and builds texture, model and audio packs, with checks before every build. See the Companion guide.
  • ROM hacks (experimental): play a hack packaged as an .o2r archive from mods/~romhacks/, or build one from a patched US rev0 ROM. Each hack has its own save and its own Continue Cup, and brings its courses, music, skylines, buildings and text. Only assets and courses come across: anything a hack changed in code doesn't run.
  • Texture-pack modding: drop .o2r packs in a mods/ folder to override textures (gEnhancements.Workshop.TexturePacks), with hot reload from the menu.
  • More mod packs: machine models, music sequences, samples, soundfonts and Lua scripts, with a load order that decides which pack wins a conflict.
  • Course elements: mod packs can add named venues, skyboxes, music, part styles and track effects to Course Edit. See the course elements guide.
  • Asset dumping: decode named assets straight from the extracted archive, per class, from the Workshop tab. See the modding guide to turn a dump into a pack.

Platforms and tools

  • macOS and Android: macOS on Metal thanks to FeedMana, and Android on OpenGL ES thanks to izzy2lost and airon-main. See Platforms.
  • In-game updater: on Windows, Linux and macOS, with rolling nightly builds published with checksums.
  • In-game enhancement menu: a full ImGui menu opened with F1 (also Escape or Gamepad Back), with Settings, Enhancements, Workshop, Online and Dev Tools sections, navigable with keyboard or controller.
  • 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).
  • G-NET card: the main menu shows its modes in a 3x3 grid with a ninth card, G-NET, that opens Online > LAN Lobby. Card art by Heebeejeebees.
  • 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. The next thing planned for G-Diffuser is Japanese version support: the original JP ROM and disk as a selectable profile. Feature requests live in the forum on the Discord server.

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).
  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.

Startup creates supported drop folders on first and subsequent launches without replacing your files: mods/~romhacks/ in the resolved game-data directory, plus music/ and exports/machines/ beside the executable. Use music/ for both game replacements and selectable Course Edit songs. Old music locations remain readable fallbacks; startup does not create them. Folder-creation failures are logged; other folders are still attempted. Cached native machine export is in F1 > Workshop > Tools.

Updating. From 1.2 on, Windows, Linux and macOS builds can update themselves from the enhancement menu. Android installs new versions from the APK. Coming from 1.1.0 or older, update by hand: 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:

FileWhat it is
baserom.translated.ek.nddThe 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.n64A 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

PlatformRenderer
WindowsDirect3D 11
LinuxOpenGL (SDL2)
macOS (Apple Silicon)Metal
AndroidOpenGL ES 3.0

All targets are driven by libultraship's Fast3D renderer.

Android requirements: Android 7.0 or newer, arm64, and OpenGL ES 3.0 — which covers essentially every device sold since 2019. Your three dumps are imported through the system file picker on first run and the archives are built on the device; nothing is bundled with the APK. The on-screen pad appears as an ordinary SDL controller, so it can be remapped in-game like a physical one, and a Bluetooth or USB controller works with no setup. See docs/ANDROID.md for the full picture, including what had to differ under the hood.

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:

xattr -dr com.apple.quarantine G-Diffuser

You can also build from source (see Building).

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 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:

git clone --recursive https://github.com/Zorkats/G-Diffuser.git

Window