You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
No game data is included. You need your own copy of the Xbox disc,
extracted (default.xbe, NFS/, TDATA/, ...).
✨ Features
🏁 Native code: the whole game runs as recompiled C, built with
xboxrecomp
🎮 Two renderers: Vulkan (NVK on Switch) and OpenGL, with render scaling
up to 4x
🖼️ Cleaner picture (Vulkan): mipmaps with trilinear and 16x
anisotropic filtering, FXAA, square-pixel 1280x720 for the 16:9 view
⚙️ Graphics options in the game (Vulkan), under Options → Gameplay:
Car Reflections, Resolution Scale (1x, 1.5x, 2x, 2.5x), Anti-Aliasing,
Anisotropic (Off-16x) and Square Pixels, applied at once and kept in
nfscx_options.txt (same settings as the NFSU1, NFSU2 and Burnout 3 ports)
🔊 Audio through an emulated Xbox APU, with 5.1 downmixed to stereo
🕹️ Pads through an emulated Xbox USB host (OHCI), Joy-Con and Pro
Controller on Switch, SDL controllers on Linux
🛠️ Shares its runtime with the
NFSU2 port (Carbon uses the
same XDK 5849 libraries)
🕹️ Playing on Switch
Copy the NRO to sdmc:/switch/nfscx/ (nfscx.nro for OpenGL,
nfscx-vulkan.nro for Vulkan).
Copy the extracted disc (not the ISO) to sdmc:/switch/nfscx/game/.
Start it with title takeover: hold R while launching any game.
Applet mode leaves too little memory.
sdmc:/switch/nfscx/
├── nfscx.nro or nfscx-vulkan.nro
├── nfscx_env.txt optional settings, KEY=VALUE per line
└── game/
├── default.xbe
├── NFS/
└── ...
Buttons map by label (Switch A = Xbox A). Settings go in nfscx_env.txt
(see Configuration); the log (nfscx_log.txt) and
the shader cache are written to the same folder.
the toolkit (MIT), vendored with this port's changes: NV2A renderers (Vulkan, OpenGL), SDL audio, Switch platform layer, kernel and translator fixes
tools/regen.sh
XBE → lifted C (gen/, never committed)
switch/build.sh
Switch NRO build + SD-card staging
⚙️ Configuration
On Linux these are ordinary environment variables. On the Switch they go in
sdmc:/switch/nfscx/nfscx_env.txt, one KEY=VALUE per line (# starts a
comment); the log lists each one as [switch] env KEY=VALUE. Anything left
out runs at its default. Most of the list is for debugging, so the sections
below are folded.
switch/build.sh: parallel compile jobs (6 fits -O2 in RAM).
VULKAN=1
switch/build.sh: build the Vulkan renderer (nfscx-vulkan.nro).
LTO=1
switch/build.sh: link-time optimisation (nfscx[-vulkan]-lto.nro, next to the normal one).
NVK_SDK, GLSLANG_DIR
switch/build.sh with VULKAN=1: mesa-switch NVK install and Switch glslang.
Game and host
Variable
Meaning
NFSU2_GAME_DIR
Extracted disc (Linux; default ./game). The Switch always uses sdmc:/switch/nfscx/game/.
NFSU2_GL=0
Use the executor's CPU renderer instead of the GPU renderer.
NFSU2_FPS_CAP=30
Keep the game's 30 fps cap (default: uncapped, up to 60 fps).
NFSU2_APU=0
With RECOMP_AC97_READY=plain: no emulated APU (no sound).
NFSU2_SIM_STEPS
Longest game-time step per frame, in 1/60 s (default 6 = 100 ms; 3 = the original 50 ms cap, which slows races below 20 fps).
NFSU2_EXIT_TRACE=1
Print the guest state at exit.
RECOMP_WIDESCREEN=0
Tell the game the TV is 4:3 (default 16:9).
HOME, XDG_DATA_HOME
Linux: fallback save directory ($XDG_DATA_HOME/xboxrecomp, else ~/.local/share/xboxrecomp) when none is configured. The game's own saves go to <game>/UDATA.
Switch (Horizon)
Variable
Meaning
NFSU2_NO_LOG=1 / NFSU2_LOG=0
No log file, no [perf] reports, no profiler.
NFSU2_LOG_SYNC=1
Write every log line to the card at once (slow; for hangs).
NFSU2_LOADER=0
No loading screen (logo + bar) before the first frame.
RECOMP_NX_PROFILE
Sampling profiler into prof.bin: 1 = busy threads, 2 = every thread above 2%.
RECOMP_NX_PROFILE_AFTER=<s>
Start the profiler after s seconds.
NFSU2_CPU_MHZ, NFSU2_GPU_MHZ, NFSU2_MEM_MHZ
Overclock (opt-in; more heat and battery). The log shows [clock] ....
RECOMP_NX_SHM=1
Guest RAM from shared memory instead of code memory.
RECOMP_NX_AUDIO_PRIO=0
Leave the APU and SDL audio threads at priority 59 (default: above the game threads).
RECOMP_NX_GUEST_RT=1
Run the time-critical guest thread (EA mixer) at a real-time host priority.
RECOMP_NX_JOYCON=single
One sideways Joy-Con per player.
RECOMP_NX_JOYCON_ROTATE=0
Don't rotate the sideways Joy-Con stick.
RECOMP_GUEST_ONE_CORE
1 = pin guest threads to one core, 2 = guest threads only (interrupts float).
Scheduling and kernel
Variable
Meaning
RECOMP_GIL=0
No guest lock (guest threads run in parallel; races the title's streaming).
RECOMP_GIL_EAGER=1
Hand the guest lock over by guest priority (main thread and time-critical threads pre-empt).
RECOMP_KERNEL_FAST=0
Release the guest lock in every kernel call, even the cheap time queries and IRQL changes.
RECOMP_FRAME_LAG=1
Wait on the previous frame's fence instead of the current one (game and GPU work overlap).
RECOMP_VBLANK
Vblank interrupt for D3D (default 1).
RECOMP_WORKERS=inline
Run the title's worker routines inline instead of on threads.
RECOMP_ASYNC_IO=1
Asynchronous NtReadFile.
RECOMP_CS_MODE=single
Every guest critical section behind one recursive lock.
RECOMP_NATIVE=0
Use the lifted culling/math functions instead of the native C versions.
RECOMP_NATIVE_CHECK=1
Run both and report any difference.
RECOMP_QUIET
1 = no periodic kernel/GPU summaries (Switch default), 0 = show them.
RECOMP_NO_LOG=1
No xbox_kernel.log.
XBOX_LOG_LEVEL
Kernel log level (0 errors … trace).
RECOMP_KERNEL_LOG_BUDGET
Kernel calls logged before the log goes quiet.
Graphics (GL and Vulkan renderers)
Variable
Meaning
RECOMP_PB_EXEC
Execute the NV2A pushbuffer (default 1; the title draws through it).
RECOMP_GL_SCALE
Render resolution multiple, 0.5..4 (fractions allowed). Vulkan: only until Options → Gameplay → Resolution Scale is changed (default there 1.5x).
RECOMP_GL_SCALE_X
Vulkan: horizontal multiple, if different; overrides Square Pixels.
RECOMP_VK_SQUARE=0
Vulkan: no square pixels in 16:9, whatever Options → Gameplay says.
RECOMP_VK_MIPS=0
Vulkan: no mipmaps (distant textures shimmer, the old look).
Function-entry traces (functions chosen at regen) and a call profile.
RECOMP_FORCE_RETURN
Read but currently has no effect.
🚦 Status
Platform
State
🐧 Linux
Intro movie, title, profile, Career menu with the 3D car, races; 30-60 fps
🎮 Switch hardware
Bring-up: GL and Vulkan NROs build and boot
Still open: hardware testing of the tiled-framebuffer fix, collision with some
hittable objects, cube maps, bump/dot-product texture modes, fixed-function
lighting.
Need for Speed and Need for Speed: Carbon are trademarks of Electronic
Arts. This is an unofficial fan project, not affiliated with or endorsed by EA
or Microsoft.
About
Need For Speed Carbon Xbox Original port for Nintendo Switch