This file is a high-level orientation and code map. Deep dives live in
docs/architecture/(start withdocs/architecture/overview.md).
core/— console-agnostic runtime (WASM, rollback, netcode, inspection)nethercore-zx/— ZX console implementation (renderer, audio, ZX-specific FFI)library/— native player/launcher (UI + game discovery)zx-common/— ZX formats shared with build tools and the platform backendshared/— shared types used bynethercore-platform/backend- Audio/tracker:
nether-tracker/,nether-it/,nether-xm/,nether-qoa/ - Tooling:
tools/,xtask/ - ABI surface:
include/(canonical ZX FFI signatures ininclude/zx.rs) - Docs:
docs/book/(mdBook game-dev docs),docs/architecture/(internal architecture)
- Runtime/player architecture:
docs/architecture/overview.md - ZX FFI (ABI):
include/zx.rs - NCHS handshake protocol:
docs/architecture/nchs.md - ZX rendering architecture:
docs/architecture/zx/rendering.md
| Topic | Pointer |
|---|---|
| Rollback + determinism guardrails | core/rollback/, docs/architecture/overview.md |
| WASM runtime + FFI registration | core/wasm/, core/ffi/ |
| Netplay / handshake protocol | core/net/nchs/, docs/architecture/nchs.md |
| ZX FFI bindings | nethercore-zx/ffi/, include/zx.rs |
| ZX renderer implementation | nethercore-zx/graphics/, docs/architecture/zx/rendering.md |
| Replay record/playback | core/replay/ |
| CLI/tools | tools/, xtask/ |
| Shared types used by platform backend | shared/, zx-common/ |
nethercore/
├── core/ # Shared console framework (WASM, rollback, netcode)
├── nethercore-zx/ # ZX console implementation
├── library/ # Native player UI + launcher
├── zx-common/ # ZX formats/ROM loader shared with tools/platform
├── shared/ # Types shared with platform backend
├── include/ # FFI surface; canonical ZX ABI in include/zx.rs
├── docs/ # mdBook + internal architecture notes
├── nether-tracker/ # Unified tracker engine (IT/XM playback)
├── nether-it/ # Impulse Tracker format parser/writer
├── nether-xm/ # FastTracker XM format parser
├── nether-qoa/ # QOA audio codec
└── tools/ # CLI tools and asset exporters
Foundation for all Nethercore consoles. Console-agnostic infrastructure.
Key types:
Consoletrait — implemented by each fantasy consoleRuntime— fixed-timestep game loopGameInstance— WASM game loaded via wasmtimeRollbackSession— GGRS integration for netplayWasmEngine— shared wasmtime engine for compilation
Key modules:
app/— windowed application framework (winit, egui)rollback/— state management, input synchronization, GGRS wrappernet/nchs/— Nethercore Handshake protocol for P2P connectionswasm/— wasmtime runtime + FFI registrationffi/— common FFI functions (time, RNG, save data)debug/— debug panel, variable inspection, action systemreplay/— replay recording and playback
ZX fantasy console implementation. Provides ZX-specific graphics, audio, and FFI.
Key types:
ZXConsole— implementscore::ConsoleZXGraphics— wgpu-based rendererZXAudio/ThreadedAudioOutput— audio output with optional threadingTrackerEngine— IT/XM module playback
Key modules:
graphics/— pipeline, textures, buffers, unified shadingffi/— ZX FFI bindings (draw_2d, mesh, audio, environment)tracker/— tracker playback engine with rollback supportprocedural/— mesh generation (cube, sphere, capsule, etc.)preview/— asset viewers for development toolsstate/— per-frame FFI state management
ZX binary formats used by both runtime and build tools.
Key types:
ZXDataPack— packed asset container with lazy indexingZXRomLoader— ROM loading and validationPackedMesh,PackedTexture,PackedKeyframes, …
Used by: nethercore-zx, tools, and the platform backend.
Platform-specific launcher binary and game discovery.
Key types:
PlayerLauncher— builder for launching gamesConsoleRegistry— ROM loader factoryLocalGame— discovered local game metadata
Unified tracker module representation for playback.
Key types:
TrackerModule— format-agnostic moduleTrackerInstrument,TrackerSample,TrackerPatternfrom_it_module(),from_xm_module()— converters
Impulse Tracker format support.
Key types:
ItModule— parsed IT fileItWriter— IT file creationparse_it(),pack_ncit()— parsing and minimal packing
FastTracker XM format support.
Key types:
XmModule— parsed XM fileparse_xm(),pack_xm_minimal()— parsing and packing
┌─────────────┐
│ library │ ─────────────────────────────────┐
└──────┬──────┘ │
│ │
▼ ▼
┌─────────────┐ ┌─────────────┐ ┌─────────────┐
│nethercore-zx│ ───▶│ core │ │ shared │
└──────┬──────┘ └──────┬──────┘ └─────────────┘
│ │
▼ ▼
┌─────────────┐ ┌─────────────┐
│ zx-common │ │ ggrs │
└──────┬──────┘ └─────────────┘
│
▼
┌─────────────┐ ┌─────────────┐
│nether-tracker│───▶│ nether-it │
└──────┬──────┘ │ nether-xm │
│ └─────────────┘
▼
┌─────────────┐
│ nether-qoa │
└─────────────┘
| Entry point | Crate | Description |
|---|---|---|
library/src/main.rs |
library |
Native player binary |
run_standalone() |
core |
Windowed game execution |
Console::run_frame() |
core |
Per-frame console update |
GameInstance::call_update() |
core |
WASM game tick |
- Rollback-safe design: anything reachable from game
update()must be deterministic. Render-only work stays in render paths since rollback re-runs simulation. - FFI ABI stability:
include/zx.rsis the signature source of truth; keep console bindings and docs in sync with it. - Cross-repo shared types:
nethercore-platform/backenddepends onshared/andzx-common/via local path; coordinated changes must keep it building.