How ctrdecomp/sead works
sead is a decompiled 3DS C++ runtime library for first-party Nintendo games, intended to recreate the original library and enable interoperability. Its broad runtime supports game/framework tasks, input, graphics, file and resource handling, and foundational utilities. A visible workflow is the framework’s task-oriented runtime, with controller management updating devices and controllers and CTR controllers translating HID state into game-facing input. The README documents additional capabilities not represented in sampled source; those are shown as subsystems without speculative call links. Controller wiring is grounded in sampled code; other internals are summarized from the tree and README.
Main entry points: seadControllerMgr.h Controller manager · seadCtrController.cpp CTR controller · seadResourceMgr.h Resource loading · seadGameFramework.h Framework and tasks
Components 22
Game Runtime
- Framework and tasks
include/framework/seadGameFramework.h - Task manager
include/framework/seadTaskMgr.h - Controller manager
include/controller/seadControllerMgr.h - Controller state
include/controller/seadControllerBase.h - CTR controller
modules/src/controller/ctr/seadCtrController.cpp - CTR HID device
include/controller/ctr/seadCtrHidDeviceCtr.h - Graphics and rendering
include/gfx/seadGraphics.h
I/O and Resources
- File devices
include/filedevice/seadFileDeviceMgr.h - Stream I/O
include/stream/seadStream.h - Resource loading
include/resource/seadResourceMgr.h - SZS decompression
include/resource/seadSZSDecompressor.h - Message Studio
include/message/seadMessageSet.h
Platform Services
- Host I/O
include/hostio/seadHostIOServer.h - Debug utilities
include/devenv/seadStackTrace.h - Thread utilities
include/thread/seadThread.h
Core Facilities
- Math and geometry
include/math/seadVector.h - Heap management
include/heap/seadHeapMgr.h - Containers
include/container/seadBuffer.h - Strings and primitives
include/prim/seadSafeString.h - Encoding and CRC
include/codec/seadBase64.h - Random and time
include/random/seadRandom.h
Other components
- Game client
Connections 12
- Game client → Framework and tasks: uses runtime
- Framework and tasks → Task manager: manages tasks
- Game client → Controller manager: uses input
- Controller manager → CTR HID device: calculates device
- Controller manager → CTR controller: calculates controller
- CTR controller → CTR HID device: reads HID state
- CTR controller → Controller state: updates input state
- Game client → Graphics and rendering: uses graphics
- Game client → Resource loading: loads resources
- Resource loading → SZS decompression: decompresses data
- Resource loading → File devices: uses file access
- Stream I/O → File devices: streams file data