
Rogue Squadron 64 Recompiled
A static recompilation of Star Wars: Rogue Squadron (USA v1.0) for the N64 built with N64Recomp and N64ModernRuntime, rendering through a forked RT64 that understands Factor 5’s custom display-list format.
Heavily AI-assisted.
Most of the debugging, architectural decisions, and code here were produced with Claude.
Minimum Requirements
| Requirement |
Details |
| ROM |
Star Wars: Rogue Squadron (USA v1.0) .z64, .v64 or .n64 (xxHash3-64 0x6B66A44153594DEA) |
*macOS builds but hasn’t been run on a Mac yet (see macOS)
**The 32-bit x86 Linux build has only been tested on a 64-bit PC with software Vulkan.
†A separate fork by n64hub/amazingalek
Per-platform minimum requirements.
Features
Graphics
- High resolutions: high resolution options, with optional MSAA, SSAA or FXAA anti-aliasing & HDR.
- Widescreen: extends the screen (and camera FOV) beyond the old 4:3 aspect ratio.
- Longer draw distance: see much farther away by up to 8x the original, set with the DRAW DISTANCE slider in Display Settings. Has some caveats.
- Frame Interpolation: smooths the game’s native ~30 fps to match your monitor’s refresh rate.
- Support for Texture packs: RT64 texture-replacement packs load at startup.
- Ray Tracing Support: reflections, shadows, dynamic lights from lasers and explosions, and light shafts through fog. Has some caveats.
- 60+ FPS: run the game beyond the original’s near 30 FPS limitations and use Vulkan to take it even higher.
- VR Support: completely immerse yourself in the game, viewing it like never before using OpenXR.
- Keyboard and mouse: fly with the mouse and fire with the mouse buttons.
- Menu navigation with the Mouse: ability to seamlessly select and control menu navigation exclusively with the mouse via cursor placement, LMB (Start) & RMB (Back)
- Gamepads: any SDL-supported controller works, with gamepad lightbar support.
- Gyro aiming: turn on GYRO STEERING in Game Settings to aim by moving the controller. Tested on a DualSense; Steam Deck and Switch Pro are untested.
- Flight sticks and H.O.T.A.S.: use the throttle lever to set your speed, and twist or rudder roll.
- Rumble: the game’s own Rumble Pak effects play on gamepads and force-feedback joysticks. Fully adjustable in
roguesq_input.json.
- Full rebinding: press F6 in-game to rebind actions, change sensitivity, adjust deadzones, and rumble settings OR use the Controls Menu Mod. See Controls.
- Touch controls on Android: tap menu and in-game buttons and fly with an on-screen stick. You can move and resize the buttons, and turn on ‘gyro steering’ to help fine-tune your aim.
Languages
- English (en), German (de) and French (fr): picked under OPTIONS > LANGUAGE. Affects menus, mission text and subtitles while voice acting remains in English.
Multiplayer (experimental)
- Online two-player co-op: host or join from a MULTIPLAYER page on the main menu. Your partner flies alongside you as a wingman, shares objectives, lives, and the mission result.
- Ways to connect: there is no official server. See docs/guides/co-op-setup.md for more details.
- Direct: works over LAN (with automatic discovery) and over the internet (with UPnP port forwarding).
- Wi-Fi Direct (Windows 10+, Linux, Android 10+): play with no router. When there’s no shared network, a nearby player who picks JOIN GAME joins the host’s own Wi-Fi network automatically. (Android will ask to allow it) Linux needs NetworkManager and only hosts when it isn’t already on a Wi-Fi network. Hosting on Linux or Android is untested. macOS doesn’t support Wi-Fi Direct (macOS uses ‘Network Sharing’).
- Steam, using the
steam-relay mod (Desktop ONLY): with Steam running, HOST GAME lists your game on Steam, and JOIN GAME shows the open games to pick from (locked ones ask for their password). Steam sees the game as Spacewar (app id 480).
- Self-hosted relay server: anyone can run
rs64_relay, a small console server for Windows and Linux, and players type its address into the MULTIPLAYER address box, just like a friend’s IP. The game remembers the server, HOST GAME lists games there and JOIN GAME shows them. Setup is in docs/guides/relay-server.md.
- Setup notes:
- Windows Firewall asks to allow the game the first time it runs. For co-op, tick Private networks (for home and LAN play) and press Allow access. If you press Cancel, co-op can’t take incoming connections until you allow
RogueSquadron64Recomp.exe under Windows Security > Firewall > Allow an app through firewall.
- Steam Relay OFF by default: press F6 in the game, turn on Steam Relay in the Mods window OR toggle the mod in the in-game mod menu.
- The Steam API library is not included: download the Steamworks SDK (version 1.65, from partner.steamgames.com, any Steam login) and copy
redistributable_bin/win64/steam_api64.dll (Windows), redistributable_bin/linux64/libsteam_api.so (Linux) or redistributable_bin/osx/libsteam_api.dylib (macOS) into mods/steam-relay/. Without it, or with Steam closed, MULTIPLAYER defaults to direct connections.
- Linux needs the native Steam package (Flatpak and Snap Steam are not supported); on Steam Deck, add the Linux build as a non-Steam game; on macOS, remove the download quarantine with
xattr -d com.apple.quarantine mods/steam-relay/libsteam_api.dylib.
Steam-Relay mod on Linux, Steam Deck and macOS is untested.
Mods
- Mod support: turn mods on and off in the Mods panel of the F6 window OR the game’s built-in Mod menu. (some might require resetting the game)
- Included mods:
- Display Settings: ‘Display Settings’ UI in the main menu under ‘Options’ -> ‘Game Settings’ and in the pause menu. Also contains the Ray Tracing and Fullscreen toggle.
- Controls Menu: new Controls UI allowing the adjustment of sensitivity, acceleration, deadzone, rumble and Input Bindings. All while using in-game UI.
- Multiplayer: online co-op (see above).
- Larger Object Pool: doubles the number of ships, lasers, and explosions the game can track at once, so busy missions stop resetting pooled objects.
- Long Tow Cable: the snowspeeder’s tow cable is long enough to wrap an AT-AT several times.
- Quit Prompt: a prompt in the main menu asking if you want to quit.
- Invincibility: your craft takes no damage. (Off by default)
- Any Craft, Any Mission: fly any ship on any level. (Off by default)
Running
Put rogue_squadron.z64 (or rogue_squadron.v64 / rogue_squadron.n64) in the working directory (the executable’s folder when you double-click it) and launch. The ROM hash is checked and the ROM is imported on first launch.
Controls
Keyboard, mouse, gamepad, and flight sticks / H.O.T.A.S. all work; no controller is required. The keyboard and joystick defaults for the most part follow the PC version (Rogue Squadron 3D).
Actions are for the game’s default Luke controller setting. The other controller presets in Options rearrange them.
| Action |
Keyboard |
Mouse |
N64 |
Gamepad |
Joystick / H.O.T.A.S. |
VR Controller |
| Steer |
↑,↓,←,→ (A/D turns) |
Mouse X/Y |
Analog stick |
Left stick |
Stick X/Y |
LS |
| Fire blasters |
Space |
LMB |
B |
A (South) |
Button 1 (trigger) |
A |
| Fire secondary |
Alt |
RMB |
C-Left |
B (East) |
Button 2 |
B |
| Fire mode |
X |
— |
C-Down |
Y (North) |
Button 6 |
R1 (Click down) |
| Thrust |
W |
— |
A |
Right trigger |
Button 3 |
R2 |
| Brake |
S |
— |
Z |
Left trigger |
Button 4 |
L2 |
| Speed (positional) |
— |
— |
— |
— |
Throttle lever |
— |
| Roll |
E |
— |
R |
Right shoulder |
Button 7 + twist joystick |
— |
| Special |
F |
— |
C-Right |
X (West) |
Button 5 |
X |
| Cockpit |
C |
— |
D-Pad Up |
D-Pad Up |
— |
— |
| Standard |
V |
— |
D-Pad Down |
D-Pad Down |
— |
— |
| Close view |
B |
— |
D-Pad Right |
D-Pad Right |
— |
— |
| Switch view |
N |
— |
L |
Back |
Button 8 |
L1 (Click down) |
| Look around |
Q |
— |
C-Up |
Left shoulder |
Hat |
— |
| Drop camera |
Z |
— |
D-Pad Left |
D-Pad Left |
— |
— |
| Confirm (Menu) |
Enter / Space |
— |
A |
A |
Button 3 |
A |
| Back |
Backspace |
— |
B |
B |
Button 1 |
B |
| Pause |
Esc |
— |
Start |
Start |
— |
Menu |
-
Mouse flight steering: mouse cursor is automatically captured when the game window is focused.
- Mouse motion steers the craft, left click fires blasters, right click fires the secondary weapon.
- The cursor displays when the window loses focus, the (F6) Controls window is open, or when RT64’s (F1) inspector is up.
-
Rumble: the game’s own Rumble Pak effects (hits, collisions, terrain scrapes, weapons, the death spiral, and crashing) play on gamepads and on joysticks supporting rumble or force feedback.
- Hits get stronger with the damage taken, and the rumble keeps going through the death spiral.
- Rumble and its individual effects can be tuned in the (F6) Controls window, or in the
rumble section of roguesq_input.json.
-
Flight sticks and H.O.T.A.S.: any devices named “joystick” will be bound as a joystick.
- A stick with exactly three axes, or a device named “throttle”, gets its lever bound to Throttle.
- The throttle sets your speed by position: full back is the craft’s slowest, full forward is fastest, and middle is normal speed.
- Other axes can be bound from the Controls window (F6)
-
DualShock 4 & DualSense Lightbar Support: lightbar color will change depending on the state of the game.
- Colors configurable from the
lightbar section in roguesq_input.json
-
DualSense Adaptive Trigger Support: Ship speed affects the resistance of the Thrust & Brake triggers. Brake trigger becomes resistive if the speed is beyond cruising speed. Thrust trigger becomes resistive if at cruise speed or less.
When binding the throttle, move the lever to the opposite position, click Rebind on ‘Throttle’, then push/pull it forward/back.
Twist grip or rudder pedals can do one of two things depending on how you bind them. Bind them to StickLeft/StickRight and they’ll add to stick X since inputs on the same stick direction add together.
Bind them to RollLeft/RollRight and they’ll give a dedicated roll axis. Hold the ‘Roll’ button then twist to roll.
Function Hotkeys
| Key |
Action |
Builds |
| F1 |
RT64’s ImGui overlay (configuration, texture dumping, per-call debugger, render-target view) |
All (Release needs --hle-dev-mode) |
| F2 |
Toggle ray tracing |
All |
| F3 |
ViewRDRAM mode |
All |
| F4 |
Texture replacement |
All |
| F5 |
In-game profiler HUD |
All |
| F6 |
Controls window (rebinding, joysticks, rumble, mouse) |
All |
| F7 |
FPS counter |
All |
| F8 |
VR camera controls via Numpad + Mouse |
All (with VR Mode ON) |
| F9 / Shift+F9 |
Step forward / back through the ray tracing debug views |
All |
| F10 |
Pause / resume the game on an exact frame |
Debug |
| F11 |
Step one frame while paused |
Debug |
| F12 |
Write a crash dump to dumps/crash-dumps/ (Windows only) |
All |
| Print Screen |
RenderDoc frame capture (set ROGUESQ_RENDERDOC=<path to renderdoc.dll>, Windows only) |
All |
- Can be be changed or turned off completely, under
hotkeys in roguesq_input.json (details), can also be turned off for the session using --no-hotkeys.
- The current ray tracing debug view is named in a notice at the bottom right.
- Set
ROGUESQ_FULL_DUMP=1 for a full-memory crash dump.
- With RenderDoc loaded, F12 also takes a capture alongside the crash dump. Launching from RenderDoc works too, without
ROGUESQ_RENDERDOC.
- F1 needs RT64 developer mode, on by default in Debug (
ROGUESQ_HLE_DEV_MODE=1 turns it on in Release).
- In Debug builds the RT64 inspector owns the ImGui overlay, so press F1 before F6.
Rebinding controls
Rebind in-game under Options > Controller Settings (the Controls Menu mod, on by default), which lists the actions for the keyboard, gamepad, joystick or VR controller you open it with:
- Every action takes two bindings. Press left or right to pick a column; the selected one is shown in braces.
- Combos: hold one input and press another while rebinding to bind the pair, shown as
A - B. While both are held, the combo replaces the second input’s own binding.
- Delete, Backspace or holding A for 2 seconds clears a binding.
Or press F6 for the Controls window:
- Click Rebind or Add on an action, then press a key or button or move an axis. Clear removes the selected binding.
- Joysticks / H.O.T.A.S. shows each joystick’s axes live, with invert and deadzone settings.
- Rumble holds the rumble settings, plus mouse sensitivity and axis invert.
Bindings are saved to roguesq_input.json next to the executable.
Status
The game is completely playable from beginning to end.
Recomp. specific Issues
Recomp. Issues are bugs involving rendering, input, hooks and added features like Frame Interpolation and Ray Tracing.
All issues should be reported/tracked via the issue tracker.
- Shadows that are cast onto the new terrain renderer might not look 100% correct when compared with the look of the original’s (Legacy) Terrain renderer. This is because of how shadow casting worked in the original along with how it did LOD. Terrain shadows are ‘averaged’ in the old one whereas the new one isn’t, so shadows are cast more realistically.
Ray Tracing Caveats
-
With Ray Tracing on, the following levels get light-shaft haze because I genuinely think they visually work better with it:
- Search for the Nonnah
- Imperial Construction Yard
- Escape from Fest
- Battle above Taloraan
-
Stray/odd shadows in places mostly due to terrain or its edge geometry
-
Shadows popping in and out because of geometry being culled when outside the camera’s frustum. (Culling viewports have been increased/offset to alleviate this.)
-
Reflections might not look completely accurate because of the nature of Screen Space Reflections
- Battle for Calamari’s intro cutscene doesn’t reflect the explosion even though it is physically correct, since the explosion is near the camera’s height and its mirror image falls below the screen. A potential solution would be an automated cubemap projection for each level done on the fly and have that be used as a fallback for when screen space reflections fall short.
Draw distance Caveats
-
‘Search for the Nonnah’ and ‘Escape from Fest’ keep their fog at a high draw distance. Every other level’s fog moves out with the draw distance.
- ‘Search for the Nonnah’ is intended to have heavy fog since the player is meant to search the level for the objective.
- ‘Escape from Fest’ needs it because the AT-PTs for the mission spawn based on Player proximity.
-
Nearby hills can show a sharp outline against the fog wall.
-
Buildings, turrets and units the game hasn’t woken yet show in their starting pose, frozen until you get within the game’s own range (about 1.5x).
-
There will be situations where Ties or Bombers appear to be stationary or might even move a little before being ‘activated’ once you get close enough to them. Since spawning of NPCs occurs based on player proximity, extending that distance could negatively affect gameplay so ‘imposters’/‘stand-ins’ are used to display structures and NPCs at a distance in order to perserve gameplay.
-
With LEGACY TERRAIN on (Display Settings > ADVANCED), the draw distance is capped at 1.3x for performance reasons.
-
Draw distance will change on the fly relative to the intro/outro cutscene being played. Fog works in the same way. This is to maintain the original look/vision for the cutscenes. Mid-game cutscenes however will use the user’s set draw distance.
Game specific Issues
Game Issues are issues that have been in the game since release.
Game Issues are less of a priority since fixing them might take away the charm that those rough edges bring.
Game Issues should be fixed with Mods instead of fixing it through the recomp. which can affect all users who play expecting the base experience.
-
During cutscenes NPCs or ships might pop in and out or stop moving in general, which is very noticeable when in Widescreen since you can see beyond the game’s original aspect ratio. This is normal cutscene behavior.
-
Turrets and structures aren’t always uniformly connected to the ground, showing a gap between the structure and the ground.
-
Some CPU performance hitching and slowdown (~20fps) in spots (although not as bad as the real N64 game). This is expected since the game is very CPU heavy with a lot of systems running off of counters based on a variable timestep. CPU heavy in the sense that the game has its own internal scheduler meaning the majority of the time it’s actually waiting on a counter or something to ‘finish’. Raising the FPS limit and turning off frame interpolation alleviates this issue.
-
Frame rate seems to drop temporarily when the game initially loads into the Profile Select menu (menu transition animations look choppy for a few ms) due to glyphs, graphics and sounds loading in on the fly when menus load.
-
Cutscenes have screen sizes of varying widths with some cutscenes having black bars on the sides or additional padding.
-
Some enemies pop in at a distance because the game spawns them in view whereas the original fog + draw distance would hide most of this.
-
Shooting at the lava or colliding against the ground in Raid on Sullust produces fireballs that look dim/muted compared to the other bigger lava explosion effects in the level.
-
Textures that are tiled or used in a gridlike form look smoother and lighter than the ones around them, almost like a faint shadow and/or they don’t align perfectly. This is because of the textures themselves, not the recomp.
-
The select craft text and description font changes when it fades in/out making the text look a little more aliased than the text that displays normally.
-
Button doesn’t respond to input during the first few frames when it is highlighted.
-
The background images used during the credits sequence AND showroom menu really is that blurry with visible artifacts everywhere.
-
Lasers + missiles popping out of existence due to the number of them being generated at once. This is the game’s normal pooled object behavior. There’s a larger-object-pool mod that extends this limit.
-
During the end sequence a few firework effects (After 4 go off in sequence and are visible on screen) don’t display.
-
Camera jitter after the player dies, spirals out and hits the ground while the camera is over a sharp incline.
-
A craft’s ground shadow can show as a thin dark line stretching down the screen, when part of the shadow picks up the wrong ground height (e.g. the Beggar’s Canyon ending near the landing pad).
-
Objects (static blue units) on radar will pop in and out when out of view of the player.
-
The first AT-AT seen during Imperial Ship Yard will only continue walking for as long as the player is in range and will reset it’s position when the player gets far enough. (One of many cases where NPC behavior depends on player proximity)
Roadmap
Building
Build Requirements
*Uses mips64-elf-gcc.exe and mips64-elf-ld.exe to compile the patches ELF (patches/).
1. Clone with submodules
git clone --recurse-submodules https://github.com/MikeSemicolonD/RogueSquadron64Recomp.git
cd RogueSquadron64Recomp
lib/ holds forks of N64ModernRuntime and rt64, forked because the upstream libraries don’t support Factor 5’s custom microcode. N64ModernRuntime also contains a forked/modified version of N64Recomp.
enet6 and miniupnp are used exclusively for the multiplayer co-op mod.
A setup script can do steps 2 - 4 for you.
It’ll ask for the ROM, check for missing tools, then create a Release build.
Re-run it after a git pull:
powershell -ExecutionPolicy Bypass -File tools\setup\setup.ps1 # Windows
bash tools/setup/setup.sh # Linux
2. Produce the decomp ELF
The recompiler needs an ELF of the game: the ROM’s code with every function named and its bounds. You make it from your ROM with the companion rogue_squadron64 decomp, cloned next to this repo. From this repo (using Python 3.11+):
git clone https://github.com/MikeSemicolonD/rogue_squadron64.git ../rogue_squadron64
cp path/to/rogue_squadron.z64 ../rogue_squadron64/ # the ROM goes in the decomp's root
python tools/re/make_elf_from_syms.py # writes ../rogue_squadron64/build/roguesquadron.elf
rogue_squadron.toml reads the ROM and the ELF from exactly those two paths.
The script uses the decomp’s tools/make_elf.py to write the ELF, but takes the function names from this repo’s syms/rogue_squadron.syms.toml, so they match rogue_squadron.toml and the mods. Only data symbols and unnamed func_ names come from the decomp.
The decomp’s own build (splat split roguesquadron.yaml && python tools/make_elf.py) is only for renaming symbols in the decomp. If its names are behind this repo’s, N64Recomp fails with this error:
Function ... is stubbed out in the config file but does not exist!
3. Generate the recompiled C
The recomp’s CMake needs RecompiledFuncs/, and the recompiled boot and audio microcode, so build N64Recomp and RSPRecomp first. Why is this needed? Because the game contains custom boot/audio microcode, requiring its own recompilation process.
cmake -S lib/N64ModernRuntime/N64Recomp -B build-tools -DCMAKE_BUILD_TYPE=Release # Configure the tools
cmake --build build-tools --config Release --target N64RecompCLI RSPRecomp # Build N64Recomp and RSPRecomp
# From the repo root. Windows (Visual Studio puts the tools in build-tools/Release/)
build-tools/Release/N64Recomp.exe rogue_squadron.toml # RecompiledFuncs/
build-tools/Release/RSPRecomp.exe rsp/factor5_boot_rsp.toml # build/factor5_ucode/factor5_boot_recompiled.c
build-tools/Release/RSPRecomp.exe rsp/musyx_rsp.toml # build/factor5_ucode/musyx_audio_recompiled.c
# Linux / macOS (Ninja or Make put them in build-tools/)
build-tools/N64Recomp rogue_squadron.toml
build-tools/RSPRecomp rsp/factor5_boot_rsp.toml
build-tools/RSPRecomp rsp/musyx_rsp.toml
The recomp’s build process then fixes up both microcode files in place (tools/fixup_factor5_ucode.cpp). Re-run RSPRecomp only when a config under rsp/ changes.
4. Build
Can specify ‘Debug’ in config when debugging. ‘Release’ provides MUCH better performance. ‘Debug’ builds also hitch and jitter with frame interpolation, depending on settings and the debug features in use, so check interpolation issues in ‘Release’.
# Windows (Visual Studio + ClangCL)
cmake -B build -T ClangCL -DN64RECOMP_EXE=build-tools/Release/N64Recomp.exe
cmake --build build --config Release
# Windows 32-bit
cmake -B build-x86 -A Win32 -T ClangCL -DN64RECOMP_EXE=build-tools/Release/N64Recomp.exe
cmake --build build-x86 --config Release
# Linux / macOS
cmake -B build -DCMAKE_BUILD_TYPE=Release -DN64RECOMP_EXE=build-tools/N64Recomp
cmake --build build
After that, the regen_funcs target (cmake --build build --config Debug --target regen_funcs) regenerates RecompiledFuncs/. Re-run it when rogue_squadron.toml, the symbols, or the decomp ELF changes.
| CMake option |
Default |
Purpose |
N64RECOMP_EXE=path |
N64Recomp in the build dir (Debug/ for Visual Studio) |
Recompiler used by regen_funcs and the patches build |
ROGUESQ_NO_ITER_DEBUG=ON |
OFF |
Disable MSVC debug iterators across the whole build for faster Debug runs (Windows) |
Debug builds compile in the D3D12 debug layer; turn it on at runtime with ROGUESQ_D3D12_DEBUG=1 (ROGUESQ_D3D12_GPUVAL=1 adds GPU-based validation).
Linux
Builds and can run on Ubuntu 24.04, Linux Mint 22.3 Cinnamon and under WSL2 (GCC 13 / Ninja); native Linux should behave the same with a real Vulkan driver.
Install the dependencies, do steps 1-3 above, then configure and build the game target:
sudo apt install build-essential cmake ninja-build python3 zip libsdl2-dev libvulkan-dev libgtk-3-dev gcc-mips-linux-gnu binutils-mips-linux-gnu
cmake -B build -G "Ninja Multi-Config" -DN64RECOMP_EXE=build-tools/N64Recomp
cmake --build build --config Debug --target RogueSquadron64Recomp
Ninja Multi-Config puts the game in build/Debug/ and build/Release/ as on Windows, so the VS Code build, run and test tasks work on Linux too (Configure (Linux) runs the configure line). Copy the ROM next to the executable.
The MIPS GCC builds the patches ELF and .nrm code mods; CMake finds mips-linux-gnu-gcc on its own.
- Wayland: if the window stays black and the log shows
fault caught ... lib=.../libdecor-gtk.so, SDL’s GTK decoration plugin crashed. Run through XWayland with SDL_VIDEODRIVER=x11.
About WSL2
This section on WSL2 can be ignored unless you’re looking to try to debug/run a Linux build on Windows.
Do not use this method to profile and judge performance since a virtualized Linux machine will not run anywhere near as well as running on bare metal.
- Keep the build directory on the Linux filesystem (e.g.
~/rs64-build), not under /mnt/… — CMake’s compiler checks can fail with Operation not permitted on the Windows drive mount. Source can stay on /mnt.
- WSLg supplies the display, PulseAudio (sound), and keyboard/mouse, so the game runs directly. A physical gamepad needs
usbipd-win to route the USB device to WSL; the keyboard works out of the box.
- WSL’s default Vulkan is llvmpipe (software) — it runs but hitches. For GPU acceleration, build Mesa’s Dozen (
dzn) driver (Vulkan → D3D12 → the real GPU via /dev/dxg). If the game doesn’t detect dzn it’ll default to software (CPU) rendering.
- The
tools/release/run-wsl-gpu.sh helper and the Configure / Build / Run (Linux/WSL, GPU via dzn) VS Code tasks wrap this. (dzn has no ray-tracing extensions — irrelevant to the current raster path.)
Android
Builds as an arm64 APK and runs on a Snapdragon 8 Gen 3 (Adreno 750, Android 16) phone; other arm64 phones with Vulkan 1.1 should work, but driver quality varies. The Gradle project in android/ builds the same CMakeLists.txt with the NDK.
Needs Android Studio (for its SDK, bundled JDK and adb) with NDK 29.0.14206865; Gradle fetches SDL 2.32.10 and installs its CMake itself. Run the Windows Debug build first: the Android build reuses the generated RecompiledFuncs/, src/game/state_table.inl and build/factor5_ucode/*.c.
$env:JAVA_HOME = "C:\Program Files\Android\Android Studio\jbr"
cd android
.\gradlew.bat assembleRelease # app\build\outputs\apk\release\RogueSquadron64Recomp-release.apk
adb install -r app\build\outputs\apk\release\RogueSquadron64Recomp-release.apk
- Use the Release APK. The Debug APK compiles the recompiled game code at
-O0 and it stutters a lot. Release is signed with the debug key, so it installs over a Debug build and keeps your data. The VS Code tasks Build (Android): APK (Release) and Install + Run (Android, Release) wrap the commands above.
- ROM: on first launch the system file picker asks for
rogue_squadron.z64 (.v64 and .n64 also work); the ROM is checked and imported once. (Pushing it to /sdcard/Android/data/com.rs64recomp.app/files/ with adb push also works.)
- Touch Controls: on by default, tap menu buttons directly, swipe carousels, and fly with a virtual stick and N64-style buttons. A paired gamepad will hide the touch overlay.
- Move and resize the touch buttons by using the gear button in the bottom left corner of the screen when navigating menus or by selecting TOUCH LAYOUT (Requires touch-layout mod) in the pause menu.
- GYRO STEERING (Requires gyro-toggle mod) in Game Settings turns on tilt steering to allow for fine mouse-like aiming.
- Touch settings live in
roguesq_touch.json.
- Mods: the APK will build and include the mods listed under
android in mods/platforms.json installing them into the app’s mods/ folder.
- Debugging: logs go to logcat under the tag
RS64 (the Logcat (Android) task filters it). Environment variables go one NAME=VALUE per line in roguesq_env.txt in the app’s files folder.
macOS
Untested on a Mac.
The release has a universal RogueSquadron64Recomp.app (Apple Silicon and Intel, macOS 11+) cross-built from Windows with compiled Metal shaders.
It isn’t notarized: run xattr -dr com.apple.quarantine RogueSquadron64Recomp.app once before opening it.
On a Mac, the Linux / macOS commands above should apply (Xcode Command Line Tools + brew install cmake ninja sdl2)
Without a Mac, the game cross-compiles from WSL2 / Linux with osxcross:
-
Download Command Line Tools for Xcode 16.4 (.dmg) from developer.apple.com/download/all
-
Build the toolchain and its Darwin runtime (libssl-dev cpio libxml2-dev needed):
git clone https://github.com/tpoechtrager/osxcross ~/osxcross && cd ~/osxcross
./tools/gen_sdk_package_tools_dmg.sh /path/to/Command_Line_Tools_for_Xcode_16.4.dmg
mv MacOSX15.5.sdk.tar.xz tarballs/
UNATTENDED=1 SDK_VERSION=15.5 OSX_VERSION_MIN=11.0 ./build.sh
./build_compiler_rt.sh # no need to run the install commands it prints
-
Install Apple’s Metal Developer Tools for Windows (search “Metal Developer Tools” at developer.apple.com/download/all). The script compiles the Metal shaders with it; without it the build links but can’t render. A different install folder than C:\Program Files\Metal Developer Tools goes in METAL_TOOLS_DIR (the WSL path of its bin folder).
- On native Linux the tools run under Wine (
sudo apt install wine64): copy the Metal Developer Tools folder from a Windows install and point METAL_TOOLS_DIR at its bin folder. Wine makes byte-identical metallibs, a few seconds per shader slower.
-
Run a native Windows or Linux build first: the cross-build can’t run its own build tools, so it reuses that build’s generated state_table.inl and fixed-up audio ucode.
-
Build the game with tools/release/macos/cross-build.sh [arm64|x86_64] [Debug|Release], or the Build (macOS cross, WSL/osxcross) VS Code task. The script builds the host tools and SDL2 on first run. Output: ~/rs64-build-macos-<arch>/RogueSquadron64Recomp for Debug, ~/rs64-build-macos-<arch>-<config>/ (lowercase, e.g. -release) otherwise.
-
Package with tools/release/macos/package.sh <out.zip> <arm64-build-dir> [x86_64-build-dir], or the Package (macOS .app, WSL/osxcross) VS Code task: two build dirs make a universal .app.
- Duplicate symbols: Apple’s
ld64 has no --allow-multiple-definition, so the runtime functions this game overrides are declared weak on Apple (ULTRAMODERN_OVERRIDABLE in the N64ModernRuntime fork).
VR
Tested on a Quest 2 over Meta Horizon Link.
- Build: configure with
-DRS64_OPENXR=ON. VR needs the Vulkan renderer.
- Start: launch with
--preset vr to use the vr video preset, which starts in the headset with settings that hold the headset’s frame rate. Without a headset or runtime the game starts flat.
- Headsets: choosing the OpenXR runtime, SteamVR and Vive setup, and the Index and Vive controller layouts are in VR headsets.
- Your size: push the right thumbstick up to grow or down to shrink until the cockpit feels right. Missions, the menus’ 3D scenes (the hangar) and cutscenes each keep their own size, saved as
vrScale, vrScaleMenus and vrScaleCutscenes.
- Missions, cutscenes and SELECT LEVEL are in stereoscopic 3D while the menus and results screens show on a virtual screen in front of you.
The Meta VR CLI (metavr) is instrumental in fixing and debugging VR issues. Its metavr xrsim commands drive the Meta XR Simulator, a headset stand-in that runs the real OpenXR path on the desktop. An agent can start the simulator, pick a device and refresh rate, and launch the game against it, then capture frames and read logs without anyone wearing a headset.
metavr xrsim app ensure-running
metavr xrsim device set --name "Meta Quest 2"
$env:XR_RUNTIME_JSON = "$env:APPDATA\metavr\tools\xrsim\meta_openxr_simulator.json"
.\RogueSquadron64Recomp.exe --vr
ROGUESQ_LOG_VR=1 logs how each headset frame was filled every 2 seconds.
tools/web/rs64-explorer: Using the original ROM, users and developers alike can view the game at a level never seen before.
A MASSIVE extension to the foundational work originally done by Dávid Pethes and jrra.
- View fully textured Models and sprites along with their animations.
- Fully view the makeup of whole Levels down to the individual triggers, paths and scripted events that make this game come to life.
- View all Visual Effects from complex explosions to simple animated sprites.
- Sound Effects and Voice lines including subtitles.
- MIDI Music Playback with timeline scrubbing allowing you to view the layers of instrument samples Chris Huelsbeck used to masterfully assemble and recreate the Star Wars score.
- WebMCP Support for agentic usage.
A save editor also exists in tools/web/save-editor as an HTML page, allowing a user to easily edit and export a save into any of the following formats: .bin, .eep, .srm, .sra and .raw
‘Proper’ AI Agent Usage
Please be involved in the loop when doing agentic coding.
An agent does not know what looks and what feels right for any game. When developing, verify bug fixes and play test to ensure consistency.
If it can be helped, it’d be wise to create a ‘unit test’ to check the issue to ensure the bug remains fixed.
Using an AI Agent properly comes down to handing it the right set of tools, the right resources/knowledge to perform the work and instructions. AGENTS.md provides the baseline instructions for your agent to make changes to this project. In addition to that, skill files (just like AGENTS.md) are used to provide instructions for things like tools, specific tasks and/or processes. MCP servers/tools can further augment existing applications by giving handles/methods for agents to better perform tasks.
This repo already provides AGENTS.md and skill files. MCP servers are configured and set up by the user themselves and are something we can’t force/mandate. Beyond MCP are things called harnesses which can be a tool to perform tasks or orchestrate agents to perform a set of tasks at once. This repo contains some harnesses in tools to perform tests, perform multiple runs to verify robustness or drive an agent to a particular menu to chase a bug.
Once your agent is set up, tasks that would’ve taken weeks/months/years to do can be done in a single day/week.
Here’s a list of MCPs that could be useful for this project:
- rs64-mcp: lets an agent launch the game, pause on an exact frame, and inspect draws, textures, framebuffers, RDRAM and take screenshots. Built into Debug by default. For Release, configure with
-DRS64_MCP=ON or run the VS Code task “Build: RogueSquadron64Recomp (Release, MCP)”
- renderdoc: Requires RenderDoc source code and Python 3.11 to compile the
renderdoc.pyd that this MCP needs; the .pyd loads only in the Python version it was built with, so the MCP server must run on that same 3.11
- windows-screenshot-mcp-server: Requires Go 1.25.2
Screenshot usage using windows-screenshot-mcp-server or rs64-mcp can be finicky.
While Claude (as of September 2026) can view pixels in the screenshots, it can miss things that are visually obvious to a human like visual glitches or rapidly flickering artifacts.
(Good enough to be useful, not good enough to trust blindly)
RenderDoc to debug graphics/rendering issues.
rizin to assist in validating/checking the game’s assembly.
pj64 to pull memory dumps for checks and comparisons. (Development builds are recommended since they provide more ways to debug/validate even though it performs slower)
Contributors / Testers
-
terminalcommand: Assisted in improving the Linux build process, fixed missing tool calls in the CMakeLists, fixed Wayland crashes on Linux and added borderless fullscreen argument.
-
gpeter12: Helped to test and verify that the recomp. works on Linux Mint 22.3 - Cinnamon 64-bit in addition to testing and verifying the ‘setup.sh’ to improve the build process for both developers & non-developers.
-
nandologia: Tested and verified that the recomp works in Batocera, tested the multiplayer co-op component with Batocera and Mint together and provided fixes for segfaults and black screens.
-
AdrienMariez: Field tested RS64 Explorer Web Tool, finding issues, suggesting QOL features and helping to improve the workflow overall.
Acknowledgements
- Dávid Pethes: the rerogue tools and the satd.sk write-up documenting the PC build’s HOB, HMT, HMP, and MORT formats, which the N64 build shares.
- jrra: a community fork of rerogue.
- Tmcg2: started the companion decomp project.
Notable Forks
License
The code in this repository (the host runtime, patches, hooks, mods, tools and docs) is licensed under GPL-3.0.
The license covers only that code. The game itself is not part of this project and is not covered by it: this repository contains no ROM data, no game code and no game assets. The recompiled code is generated from the ROM at build time and is never committed. Release builds include that compiled code but no ROM data or game assets. You need a legally obtained copy of the game.
Star Wars and Rogue Squadron are trademarks of Lucasfilm Ltd. This is an unofficial hobby project with no association with, sponsorship by or endorsement from Nintendo, Disney, Lucasfilm (including Lucasfilm Games, formerly LucasArts), “Factor 5, Inc.”/“Factor5 GmbH” or “Eggebrecht, Engel, Schmidt GbR”.
评论