Skip to content
aarvsnPublic

About

Resident Evil 4 port for Nintendo Switch (experimental).

Topics

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

re4-nx

A clean-room, open-source reimplementation and Nintendo Switch homebrew port of Resident Evil 4 (2007 PC version).

re4-nx is a reverse-engineered reimplementation that lets you play the original Resident Evil 4 on a Nintendo Switch running custom firmware. It ships no Capcom-owned source code or assets — you must supply your own legally obtained copy of the game.

Legal status. This project is a clean-room reimplementation. It contains only original code written by the re4-nx contributors, based on publicly available information (public reverse-engineering notes, public symbol information, the nipkownix/re4_tweaks patch set, and analysis of a legally obtained RE4 PC install). It does not include or generate any copyrighted Capcom source, assets, executables, textures, models, audio, movies, scripts, or shaders. "Resident Evil 4", "BIOHAZARD 4", "BIO4", and all related marks are trademarks of Capcom Co., Ltd. This project is not affiliated with or endorsed by Capcom.


Status

This is an early scaffold. The architecture is in place; subsystems are individually testable but the gameplay layer is not yet wired up.

Subsystem Status Notes
Platform (Switch) scaffolded applet lifecycle, docked/handheld detect
Platform (desktop) scaffolded SDL2 optional, null fallback for tests
Renderer (deko3d) scaffolded device + swapchain; draw calls TODO
Renderer (OpenGL) scaffolded clear-only
Audio (Switch) scaffolded audren + audout init
Audio (desktop) stub miniaudio to be wired in
Input implemented Joy-Con/Pro/touch + keyboard/mouse
Filesystem implemented virtual mount stack, directory mount
Resource loader implemented async, single worker thread
Scene / Entity scaffolded transform chain; components TODO
Camera implemented follow + fixed
Animation implemented nearest-keyframe sampler
Physics / Collision partial ray/triangle, ray/AABB; swept capsule TODO
AI / Scripting scaffolded hook registry + trivial test AI
UI scaffolded retained-mode tree; rasterisation TODO
Save system implemented CRC32-checked slots, list/load/save/delete
Tests passing math/fs/resources/renderer/input/save/coll

Repository layout

re4-nx/
├── src/             # main entry point (desktop main.cpp, Switch switch_main.cpp)
├── include/         # public headers (re4/...)
├── platform/        # per-platform backends (switch/windows/linux/common)
├── engine/          # application, config, log
├── renderer/        # deko3d + GL + null backends
├── audio/           # audren + null backends
├── input/           # cross-platform helpers (backends live in platform/)
├── filesystem/      # virtual filesystem + mount stack
├── resources/       # async resource loader
├── scene/           # scene container
├── entity/          # entity + component base
├── camera/          # follow / fixed cameras
├── animation/       # skeletal animation
├── physics/         # raycast world
├── collision/       # primitive shape intersection tests
├── ai/              # AI controller base + trivial test AI
├── script/          # hook registry
├── ui/              # retained-mode UI tree
├── save/            # save slot serialization
├── shaders/         # GLSL (desktop) + dksh (Switch)
├── third_party/     # external deps (FetchContent or vendored)
├── docs/            # design + per-subsystem docs
├── cmake/           # CMake helpers (re4nx_targets.cmake, Switch.cmake stub)
├── tests/           # Catch2 unit tests
├── tools/           # host-side dev tools (pak_probe, etc.)
├── .github/workflows/  # CI
├── CMakeLists.txt
├── CMakePresets.json
├── BUILDING.md
├── PORTING.md
├── CONTRIBUTING.md
├── DESIGN.md
└── LICENSE

Quick start (desktop)

You'll need CMake ≥ 3.22, Ninja, and a C++20 compiler.

git clone https://github.com/aarvsn/re4-nx.git
cd re4-nx
cmake --preset linux-debug
cmake --build build/linux-debug
ctest --test-dir build/linux-debug --output-on-failure
./build/linux-debug/bin/re4-nx

To point the runtime at your RE4 install (for development):

export RE4NX_DATA_ROOT=/path/to/your/RE4/install
./build/linux-debug/bin/re4-nx

Quick start (Switch)

Requires devkitPro with switch-dev, libnx, and deko3d installed. See BUILDING.md for full instructions.

source /etc/profile.d/devkitpro.sh
cmake --preset switch-release
cmake --build build/switch-release
# copy build/switch-release/re4.nro to sdmc:/switch/re4-nx/re4.nro

Providing game files

re4-nx loads its data from a directory the user supplies. On Switch that defaults to:

sdmc:/switch/re4-nx/data/
├── BIO4/         # stage + entity binaries
├── Movie/        # cutscene video
├── Sound/        # audio
└── ...           # other RE4 PC data files

On desktop, set RE4NX_DATA_ROOT or create a ./data/ symlink.

Only use files from a legally obtained RE4 PC install. re4-nx does not ship, generate, or distribute any copyrighted RE4 data.


Documentation


License

MIT — see LICENSE.

About

Resident Evil 4 port for Nintendo Switch (experimental).

Topics

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages