Text is bounded at 16 MiB, using conservative static CFG discovery for larger images. This is not complete indirect-target coverage or a general 3DS runtime. Scalar VFPv2 now supports F32/F64 arithmetic/conversions and bounded atomic RAM transfers. Short-vector arithmetic, moves, absolute value, negate and square root run in the 3DS CPU backend, and short-vector compares and conversions are scalar. Enabled exceptions, a short-vector first source in the first bank and legacy extended-save forms remain unsupported. Stage 2b4 adds serialized ARM11 checked exclusives and a bounded kernel-bootstrap subset. Stage 2 still needs broader discovery/ISA validation and cache/resume. Initial stage 3a adds a SwIPC-derived CTR generator, checked transport and bounded service sessions. Initial 3b adds the minimal APT/thread/event/mutex/PTM/HID startup personality and ARM11 UADD8/SEL. The HLE DSP, the software PICA renderer and the F1 kernel work since then are described below. Full HLE/IPC and the other peripherals remain pending. No firmware, keys, title assets or Azahar CPU engine are included.
Implemented:
SNX_BUILD_3DS, independent driver, Old/New 3DS board profiles,
physical-range bounds checks, lifecycle/base ticks, GUI CIA drops/browser/
recents and strict routing to the 3DS driver without Switch-only flags.src/3ds/loader/: the container by the file's own header (a CIA, an NCSD
cartridge image, a bare NCCH); streaming CIA sections; signature-dependent
ticket/TMD offsets; title, boot-index, content bitmap, unique ID/index,
content-info and SHA-256 validation. Boot content is selected by its TMD index,
not table order. All present contents and container metadata are materialized on
disk. A cartridge image's game is its NCSD partition 0, its update taken by title
ID from the later partitions, both read where they lie (up to a card's 8 GiB);
a bare NCCH fills the file. A proto image (its content size in bytes, as an early
tool's is) is read as Azahar's is_proto reads it, with the usual priority given
to an application whose ExHeader names none..code expansion, and IVFC
level-3 RomFS extraction into a host tree. Traversal/invalid UTF-16, metadata
directory/file traversal cycles, overlaps, duplicate paths and excessive expansion are rejected.common filesystem paths, file IO, private staging,
cleanup, publication) are reused; the NX kernel/NSO loader/FS service are not
linked. Container/content hashes and version-1 image identities use OpenSSL
EVP SHA-256, with incremental hashing for streamed data; no custom SHA is used.src/3ds/memory/ctr_memory.h: independent page-based address spaces, shared
physical RAM/VRAM/DSP backings, aliases, R/W/X checks, checked cross-page RAM
transfers and explicit aligned MMIO callbacks. Failed map/protect/unmap and
RAM range-validation operations do not partially change guest memory/mappings.
No flat host pointer is exposed.SnxArmCPU ABI 3's rt lets the CTR adapter decide unsupported instructions
and CP15 itself (cpu/arm/README.md); NULL keeps the exits. No 3DS global
compiler define affects other boards.src/3ds/cpu/ctr_cpu.h: versioned checked CPU state, USR initialization and
callbacks connecting statically generated integer instructions to the page
controller, including aliases, R/W/X, whole-range multiword RAM validation and
ordinary MMIO. Every instruction checks execute permission and code identity.
Static native witnesses execute against this adapter without the JIT linked into their executables..code revalidation, RX/R/RW process mappings,
zeroed page-appended BSS, guarded stack and one private initial TLS page.
TPIDRURO points at this page. Initial 3b adds per-thread zeroed TLS slots
and serialized native context scheduling, not a host-thread/multicore scheduler.scarletnx-3ds:
private staging/publication, versioned module ABI and exact image
identity. The host's native back end makes the blocks (src/common/cpu/arm/aot.h); the recompile says how many it
made, and why it refused one. Images up to 4096 bytes retain exhaustive one-instruction ARM/Thumb
entries. Stage 2b3 adds conservative static CFG discovery for larger images:
direct branches/calls, conditional continuations, literal/ADR code pointers,
initialized RO/data pointer candidates, legacy Thumb BL pairs and a bounded
PC-relative ADD jump window. Initial 3b also recognizes adjacent unsigned
CMP / LDRLS PC-indexed tables with at most 256 entries; no unbounded sweep.
Blocks contain at most 32 guest instructions;
bounded chunks of them are objects, then statically linked.
The link is the recompiler's own (src/common/cpu/recompiler/object/link.c),
with the helpers the blocks call (armlib.c), as the Switch's 32-bit modules
are: an ELF shared object, a PE DLL or a Mach-O dylib, without a C compiler.
A block the static discovery misses compiles at run time through the ARM JIT; with --jit-only every block does..data byte counts including BSS are accepted only if subtracting
BSS fits initialized pages; BSS never becomes required input .code bytes.
All segment/expansion bounds and content hashes are still checked.Made from docs/platforms/3ds/README.md at 69237645142c. GPL-3.0-or-later.