[PROTOTYPE] and [PROTOTYPE 2] for Nintendo Switch
Native Nintendo Switch ports of the Xbox 360 versions of Prototype (2009) and Prototype 2 (2012), made by static recompilation with ReXGlue: the games' PowerPC code is translated to C++ and compiled to ARM64 for Horizon OS, and their Direct3D command stream is drawn with Vulkan (NVK/Mesa). No emulator, no Xbox 360 GPU emulation.
Free. Not for sale. News: t.me/fspores
This repository has no game files. You need your own copy of the Xbox 360 games.
Download
Ready builds (NROs, settings, HOME-menu NSP forwarders): see Releases.
What you get
| Prototype | Prototype 2 | |
|---|---|---|
| Port | this project (fungalspores) | penettrator 0.2.0, built from his sources with our fixes |
| Picture | 1280x720, adjustable | 960x544 + FSR 1 (the original release: 800x448) |
| FPS* | menus and cutscenes 30-60, gameplay 25-30 | city 25-30 |
| Sound | yes | yes |
| Saves | yes (fixed) | yes |
* Switch OLED (Mariko) with sys-clk / Horizon OC at CPU 1785 / GPU 768-1152 / RAM 2333 MHz. Lower at stock clocks.
Install
Needs Atmosphère 1.8.0+ with sigpatches, DBI (or another NSP installer), ~7 GB (Prototype) and ~8 GB (Prototype 2) on the SD card. FAT32 is fine.
-
Copy
switch/from the release to the root of the SD card:sdmc:/switch/prototype-nx/prototype.nro, prototype.toml sdmc:/switch/prototype2-nx/prototype2.nro, prototype2.toml -
Put your game files there:
- Prototype →
sdmc:/switch/prototype-nx/game/(withdefault.xexinside) - Prototype 2 →
sdmc:/switch/prototype2-nx/game_root/(withdefault.xexinside)
From an ISO:
extract-xiso -x "Prototype.iso" -d game.$SystemUpdateis not needed. - Prototype →
-
Install both NSPs from
nsp/with DBI and start the games from the HOME menu. They start throughrex-start.nro: it shows the game for five seconds, and + opens its settings (resolution, textures, language and so on) written straight into the game's TOML. Without an NSP: hold R while starting any installed game and pick the port in the Homebrew menu. Not from the Album: applet mode does not have enough memory.
Tested editions
- Prototype: Xbox 360, title ID 4156084E (Russian edition).
- Prototype 2:
default.xexSHA-256f6caf82c433b0bb20fe701912388b1e7ee8d6b529d8fc275af960ac2e9ddcab8.
The code is recompiled from one specific default.xex; other editions may not start.
Settings
prototype.toml / prototype2.toml next to the NRO. Restart the game after a change.
Prototype 2 picture (ours / the original release):
| Setting | Ours | Original | |
|---|---|---|---|
p2_render_width x p2_render_height |
960x544 | 640x352 | internal resolution, scaled with FSR |
p2_native_texture_lod_bias |
0.5 | 1.0 | lower = sharper textures |
p2_native_max_anisotropy |
2 | 1 | |
p2_geo_lod_bias_scale |
2.0 | 4.0 | lower = more detailed meshes |
p2_shadow_range_scale |
0.5 | 0.3 | |
p2_ped_max_scale, p2_vehicle_max_scale |
0.3, 0.15 | 0.3, 0.15 | crowds cost the most CPU |
user_language: 12 Russian, 1 English (depends on your copy).
Prototype 2 runs on all four CPU cores and heats the console more than the first game. With Horizon OC / sys-clk,
give it (0150524F54320000) its own clock profile. Do not use high overclocks on an Erista (original) console.
Settings screen (rex-start/)
A small homebrew between the HOME icon and the port, after winenx-start: libnx framebuffer, the console's own font through FreeType, no SDL. It offers only keys already present in the game's TOML and copies every other line through untouched (quotes and line endings included); the height follows the width it is paired with. Press nothing and the game starts as before.
What we fixed
Prototype (port from scratch, ReXGlue + the masseffect-nx Horizon SDK + the Prototype 2 NX native renderer):
- Hangs in cutscenes, transitions and after the pause menu: the main thread held the scene critical sections
while waiting for the render thread to drain the full command ring, and the render thread needed them.
The main thread now releases the critical sections it owns while it waits (
src/proto_deadlock_fix.cpp); the render thread drains in place when the ring fills during its own drain. - "Corrupted" saves: the game writes the save file's size into its first word and checks it on load; the SDK
returned the size cached when the file was opened (0). Fixed in
XFile::Write/SetLength. - Console signature stubs (
XeKeysConsolePrivateKeySign/...SignatureVerification) returned "invalid". - Profile-guided optimization with our own profile: an instrumented build writes
/pgo-protoon the SD card (src/proto_pgo.cpp,-DPROTO_PGO=GEN), a play session leaves the counters, and the release is built with-DPROTO_PGO=USE -DPROTO_PGO_DATA=<dir>. - Adjustable internal render size: the game hard-codes a 1280x720 back buffer in
sub_82A0E118;tools/prepare_proto_codegen.pyroutes it toproto_render_width/proto_render_height. - The renderer updated to the one from Prototype 2 0.2.0 (texture cache with eviction, batched occlusion queries, materials no longer disappear after leaving the map open).
- Per-address locks instead of one process-wide mutex for the game's lwarx/stwcx. regions; guest memory
accesses without
volatile(from Prototype 2 NX); audio, 30-60 FPS menus with the native renderer.
Prototype 2 (penettrator's port, built from his GPL-3.0 sources):
- The same SDK fixes (saves, signatures, critical sections).
- A better picture (see Settings).
- No temperature-sensor polling: an open
tssession for the whole game coincided with Horizon OC'shoc:clkcrashing under load (andpcv/ptm/Busafter it).
A splash with the credit is shown for 3 seconds before each game (skip with A/B/+).
Building
Everything was built on an Android phone (Alpine Linux in PRoot, aarch64) without Docker; a normal Linux box works the same way. Outline:
- devkitA64:
tools/proot/pull_dka64.pyunpacks the arm64devkitpro/devkita64image; on musl hosts runtools/proot/patch_dkp.shandwrap_dkp.sh(cc1/cc1plus/lto1 must stay unpatched, called through ld-linux). - SDK: masseffect-nx at
a85b0b4+patches/rexglue-sdk-masseffect-nx.patch; third-party sources with itstools/fetch_thirdparty.py(rexglue-sdk v0.10.0). Hostrexglue:cmake -S sdk -B out/host -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DREXGLUE_ENABLE_TRACY=OFF && ninja -C out/host rexglue(on musl add-lucontext_posix -lucontext; without/dev/shmrun it withLD_PRELOADoftools/proot/shmshim.c). - Mesa/NVK: mesa-switch at
d4a00ea0ab3+patches/mesa-switch.patch, thentools/proot/mesa_p2_build.sh(needs meson >= 1.7, Rust nightly + rust-src + rustfmt, a dynamically linked bindgen 0.73+, mesa_clc/vtn_bindgen2 from a native Mesa build). - Prototype:
prototype/build.sh(codegen ~1-2 min, NRO ~10-35 min). PGO: build once with-DPROTO_PGO=GEN, play 10-15 minutes, copysdmc:/pgo-protooff the console and build again with-DPROTO_PGO=USE -DPROTO_PGO_DATA=<that folder>from the same build directory. - Prototype 2: as in penettrator's
docs/BUILD.en.md: codegen ofproject/prototype2_manifest.toml, thentools/prepare_switch_codegen.py,prepare_no_volatile.py,prepare_switch_hot.pyandcmake -S switch -B build/switch ... -DP2_DIRECT_CALLS=ON -DP2_GUEST_LTO=ON -DP2_LEAF_LOCALS=ON -DP2_ARM_VMX=ON(~25 min with LTO). - Settings screen:
rex-start/build.sh(devkitA64 + FreeType from the portlibs). - NSP forwarders:
forwarder/build_forwarder.py --launcher sdmc:/switch/rex-start.nro --nro sdmc:/switch/prototype-nx/prototype.nro --icon art/icon_prototype.jpg --title Prototype --author fungalspores --version 1.0.0 --tid 0150524F54310000 --keys <your prod.keys> --out out/(needs Forwarder-Mod9853bd9cloned toforwarder/loader). Your ownprod.keysonly; never publish them.
Credits
- penettrator — the Prototype 2 port (prototype2-nx). Thank you!
- NebadasSwifty — masseffect-nx, the SDK with the Horizon layer.
- StevensND — the Horizon layer of ReXGlue and nfsmw-nx.
- R-drg — project8-sw, the base of the native renderer.
- Tom Clay and the ReXGlue SDK; the Xenia project.
- danfromtico — mesa-switch; the Mesa project.
- Skywalker25 — Forwarder-Mod; switchbrew (libnx); devkitPro.
- AMD FidelityFX Super Resolution 1.
License
GPL-3.0 (see LICENSE); third-party components under their own licenses (prototype2/THIRD_PARTY_NOTICES.md).
Prototype is a trademark of its owners. This project is not affiliated with Radical Entertainment, Activision,
Microsoft or Nintendo and contains none of their files.