Repository navigation
Building
Use Installation for the prebuilt releases. Build from source if you are developing Moader or reproducing the Seedsow Lullaby backend. The v4.0.0 backend ZIP supplies the matched binaries and standalone bootstrap. The supported SDK hosts are Apple Silicon macOS and Linux x86_64, including WSL2.
The setup guide has the commands for each method. Preparation downloads and checks the required upstream inputs on your computer, then creates a unique installer snapshot. The printed install command is the step that contacts the Switch.
To validate already prepared inputs without downloading, compiling or creating an installer snapshot:
python3 tools/setup-backend.py --check --node /absolute/path/to/node24On a kit that still needs its upstream inputs, run python3 tools/setup-backend.py --node /absolute/path/to/node24 first. The fetched official archive is kept locally at research/artifacts/kaiHEN-20261114c.zip for installer qualification; only the pinned engine is retained from the ns2jb source archive. No existing research checkout or copied private state is needed. Setup refuses to replace changed existing inputs. Use a fresh kit directory to change versions.
Existing optional files in vendor/kaihen-mo/programs, including Moader diagnostics if supplied there, are preserved and appear as bundledPrograms in check output. The installer includes them. The v4.0.0 backend kit includes the complete regular kaiHEN bundle, so its Seedsow setup also extracts and checks OunceShell.
The bundled SDK setup targets Apple Silicon macOS and Linux x86_64, including WSL2 x86_64. It provisions checksum-pinned, host-specific devkitA64 GCC 16.1.0, switch-tools 1.13.1 and ounce-devkit 20261114 into the checkout. Linux needs zstd to extract the packages. Intel macOS and Linux arm64 cross-builds are not configured by these scripts. Install Python 3.10+, Node 22+ and make; use native POSIX Node 24 for the later live installation.
If devkitPro's official endpoint returns HTTP 403 for the architecture-independent dkp-toolchain-vars 1.0.5 package, setup-devkit.py tries one alternate host. This exception applies only to that exact URL and SHA-256 e6e26af3147061090572b61c576114ee9a45d5ed8c77c7d93cc5f5559198c288; the downloaded bytes must match before extraction.
The Seedsow prebuilt workflow selects --host-profile seedsow-malev0 and requires Node 24 for its GUI and live attempt. Its matched RO/HEN/bootstrap, app and resident reproduced in a temporary clean source copy after pinned SDK setup. The source build and the device installation have separate validation scopes.
For a v4.0.0 Seedsow source rebuild, use a clean checkout of the exact sourceCommit in the release manifest. The commands below select the PC-driven Seedsow profile. For historical v0.1.2 reproduction, use its tagged source and that release's component proof instead.
python3 tools/setup-devkit.py
python3 tools/setup-backend.py --build --host-profile seedsow-malev0 --node node
python3 tools/setup-backend.py --check --host-profile seedsow-malev0 --node nodeThe SDK bootstrap downloads the shared and macOS packages pinned in tools/toolchain-packages.json, the Linux x86_64 overrides in tools/toolchain-packages-linux-x86_64.json when applicable, and the checksum-pinned ounce SDK. Backend setup downloads the pinned official kaiHEN archive and Seedsow source closure. It copies a source allowlist to a temporary directory, rebuilds RO, HEN, bootstrap, plugin library, app and resident there, verifies the native set against its source-qualified component digests, then fills missing local inputs. Existing files must already match; there is no force-overwrite option. Use a separate clean checkout for a rebuild when release binaries already occupy dist/ or vendor/kaihen-mo.
setup-backend.py --check is read-only. In contrast, install-moader.cjs --check writes a local immutable snapshot under build/install/prepared-* and updates its convenience pointer. Both avoid console connections. Use the unique manifest printed by the installer for any later --prepared command; build/install/manifest.json is a mutable convenience pointer.
HEN and bootstrap rebuilds must reproduce the pair recorded in software-builds/kaihen-mo.json. Its source-tree/patch digests bind those binaries to the reviewed source, and its console-validation flag is separate. The app and resident are compiled with debug information, so their hashes may vary with the build directory. A successful source build does not establish device behavior; see the release's validation scope.
| Input | Pin |
|---|---|
| ns2jb source | 28f03b5895e5569d8fbc35cbed84906b8f0a65b2 |
| Extracted engine tree SHA-256 | 7003335a2a426a82156c19653be5e61506a05dd02b5d0490c8bcb4516c5c354a |
| Experimental Civ7 source | 51a804cbce09216e1a42e65929644fd436b4c8bf |
| Selected Civ7 source tree SHA-256 | d83cadc568b65a724f32b848f1681540487a798b354ac3286f71e41e94a9ac75 |
| Official kaiHEN release | 20261114c |
| Official kaiHEN ZIP SHA-256 | 63b91e5e7c6f411aad758758e5a1a3cbe1f855b4304d87916afe5319b9dfd967 |
| Patched HEN SHA-256 | 621b8e4a373b8cef7c84cb07af8889d961f5bceb7b4566e3305c2dd38c021a24 |
| Matched bootstrap SHA-256 | df8482f82e1e462206bb9e8128ec0ff2bb53636d8723aa3fdfaa978efd67b801 |
| ounce-devkit archive SHA-256 | f24d5773b1ee1c2b19317f57e8ae54a60fcdcefe493a0e495297c241c4912f59 |
The Seedsow workflow's matched RO/HEN/bootstrap hashes are recorded in software-builds/kaihen-mo.json. Its prebuilt kit and GUI instructions are in the Seedsow guide. Do not mix this pair with the v0.1.2 release kit.
Source URLs are the pinned ns2jb archive, official kaiHEN release and ounce-devkit release. The engine tree digest hashes sorted relative POSIX paths, each followed by NUL, its lowercase file SHA-256, and newline. The engine currently contains 116 files totaling 542,813 bytes. The helper accepts only that content; it never falls back to another revision.
The experimental Civ7 profile fetches the pinned s8n archive instead of the kurumuz engine. Its 120 selected files total 720,866 bytes and include engine/, targets/civ7/ and bridge/civ_bridge.js. config/civ7-provider.json records each source file and its materialized run counterpart. Its tree digest uses the same format. Source identity and host checks do not establish a Civ7 console installation.
For offline preparation from a source checkout, transfer the exact upstream inputs and pass --offline --engine-archive PATH --kaihen-archive PATH. A matching release checkout also needs a source build or the exact pinned HEN, bootstrap and app/resident inputs. The programs ZIP must contain switch/Moader.nro and kaihen/plugins/moader.nso. The backend ZIP now includes the pinned official kaiHEN base and the complete patched release; its first offline preparation still needs the pinned upstream host-source archive.
For control-protocol tests or CI that need only the pinned external engine, use:
python3 tools/setup-backend.py --sources-onlyThis fetches and validates only research/sources/ns2jb/engine. It needs no Node, SDK, HEN, release proof, app binaries or prepared snapshots, and does not create those inputs. An existing engine must match the pinned tree; repeat runs validate it without downloads or writes. The source stays in the ignored local research path and is not added to the public release.
For the same source-only operation offline:
python3 tools/setup-backend.py --sources-only --offline --engine-archive /absolute/path/to/pinned-ns2jb.tar.gzThis mode accepts only --root, --host-profile, --offline and --engine-archive alongside --sources-only. It rejects --check, --build, --node, release manifests and HEN/app archive options before work. It performs no console or installer operations. Add --host-profile civ7-s8n to select the Civ7 source closure; an offline archive must match that selected profile.
Run setup/wrapper tests without an SDK, network or device:
python3 tools/test-setup-backend.py
node tools/test-installers.cjsThe main Makefile includes the SDK CPU fragment at parse time; make check therefore requires an installed SDK. Run the individual host scripts when the SDK is unavailable. tools/test-core.py, tools/test-library-refresh.py, tools/test-native-ui.py and tools/test-web.py require clang++, zlib headers/libraries and AddressSanitizer/UBSan; the web-worker test also needs the SDK headers. Do not label the entire native suite SDK-free.
The portable runtime templates and zbic.wasm are shipped in runtime/modloader/native/prebuilt. Their manifest verifies both source hashes and generated files. End users need Node, not Zig. Maintainers rebuilding these assets use Zig 0.15.2 and node runtime/modloader/tools/build.cjs; see MAINTAINING.md before changing them.
Moader · Downloads · Issues · Discussions
Docs for v4.0.0; app version 4.0.0.
Moader
- Home
- v4.0.0 release notes
- v3.5.0 release notes (historical)
- v3.0.0 release notes (historical)
- v0.2.5 release notes (historical)
- v0.2.0 release notes (historical)
- v0.1.3 release notes
- v0.1.2 release notes (historical)
- v0.1.1 release notes (historical)
- Changelog
- Install / Linux / WSL / macOS
- Seedsow Lullaby
- CivSwitch entrypoint
- App and browser usage
- SD card layout
- Settings and Advanced
- Game-card checks
- Debugging and screenshots
- Troubleshooting
- How it works
- FAQ
- Validation
Project