# A new core, and how the 3DS's three ARM CPUs relate The 3DS carries three ARM designs from three architecture generations. Two of them already have family Phase 0s or cores. This page says which core models which CPU, why the ARM11 is a new repository and not an axis on arm946es-python, and what the three share. ## The three CPUs of a 3DS | CPU | Architecture | Role on the 3DS | Clock | Family core | | --- | --- | --- | --- | --- | | ARM11 MPCore, 2 MP11 CPUs (Old 3DS) or 4 (New 3DS), VFP11 each | ARMv6K + VFPv2 | applications, the Horizon kernel and its services, the GPU's command lists, sound through the DSP | 268 MHz; New 3DS 268, 536 or 804 MHz by CFG11_MPCORE_CLKCNT modes 1, 3, 5 (DOC: GBATEK "3DS Config - CONFIG11 Registers") | **arm11-python** (this repository) | | ARM9: an ARM946E-S is what the community documents (HYPOTHESIS until a CP15 main-ID read: GBATEK gives the 3DS ARM9's memory map, with 32 KB ITCM and 16 KB DTCM, but not its ID register) | ARMv5TE | security and storage: the boot ROM, the AES/SHA/RSA engines, the eMMC and SD controllers, the cartridge; in DS mode it is the DS's ARM9 | 134 MHz in 3DS mode is the community figure (HYPOTHESIS; GBATEK's ARM9 timers run at 67.027964 MHz, DOC: "3DS ARM9 Timers") | **arm946es-python** (`../arm946es-python`, Phase 0 2026-11-26), with a 3DS configuration row | | ARM7TDMI | ARMv4T | idle in 3DS mode; started only for GBA, DS and DSi modes through ARM7_CNT and CFG11_TWLMODE_BOOT, running ARM7_BOOTCODE over its BIOS vectors (DOC: GBATEK "3DS Config - ARM7 Registers") | 16.78 MHz (GBA) or 33.51 MHz (DS) in those modes | **arm7tdmi-python** (`../arm7tdmi-python`, built, rungs 0-4) | So the 3DS board composes three ARM cores of three generations, plus the Teak DSP (n3ds-python docs/dsp-teak.md). In 3DS mode only the ARM11s and the ARM9 run. In GBA mode the ARM7 runs GBA code and the ARM9 stays in 3DS mode; in DS/DSi mode the ARM9 changes memory map and the ARM7 joins it, while the ARM11 "is always kept running in 3DS mode" (DOC: GBATEK, ARM7_CNT), forwarding the legacy picture through LGYFB into the 3DS framebuffers. ## Why a new repository, not an axis arm946es-python's [core-choice.md](../../arm946es-python/docs/core-choice.md) already argued that the ARM9 is not an `arch` switch on arm7tdmi-python: semantics change in most handlers, the bus model goes from one stream to two, and a memory system sits in front. From ARMv5TE to the ARM11 MPCore the distance is larger again, in every column: | Area | ARM946E-S (arm946es-python) | ARM11 MPCore (this core) | Source | | --- | --- | --- | --- | | Pipeline | 5 stages | 8 stages (Fe1, Fe2, De, Iss, then Sh/ALU/Sat/WBex, MAC1-3, or ADD/DC1/DC2/WBls); a non-blocking data cache with hit-under-miss (up to three outstanding misses) | DDI 0360F 1.7, 7.2 (DOC) | | Branches | no prediction | 128-entry dynamic predictor (VA[9:3], 2-bit counters), static predictor, 3-entry return stack, branch folding | DDI 0360F 15.1.1 (DOC); GBATEK "ARM CPU Instruction Cycle Times": SUBS+BNE 4 clocks without prediction, 2.5 with (DOC, GBATEK's measurement on a 3DS) | | Instruction set | v5TE | v6K: SIMD media ops (UADD8, SEL, USAD8, PKHBT, SSAT16 ...), REV/REV16/REVSH, SXT/UXT, LDREX/STREX (byte, half, double), CLREX, CPS, SRS, RFE, SETEND, UMAAL, the YIELD/WFE/WFI/SEV hints, new Thumb ops | DDI 0100I; GBATEK "Special ARM11 Instructions", "New THUMB Opcodes in ARM11" (DOC) | | Memory alignment | ARMv5 rotation rules | unaligned word and halfword access supported when CP15 c1.U is set, plus mixed endian (CPSR.E) | DDI 0360F chapter 4 (DOC) | | Memory system | protection unit, TCMs, 8 KB I / 4 KB D caches | VMSAv6 MMU with two translation table bases, ASIDs, MicroTLBs (8 entries each side) and a 64-entry 2-way main TLB with 8 lockable entries; 4-way L1 caches of 16, 32 or 64 KB | DDI 0360F 5.2, 5.11, 1.6, 7 (DOC) | | Multiprocessing | none | 2 or 4 CPUs, SCU with MESI coherency and duplicated tags, exclusive monitors, the Distributed Interrupt Controller, per-CPU timers and watchdogs, software interrupts between CPUs | DDI 0360F chapters 7, 9, 10 (DOC) | | Floating point | none | VFP11 (VFPv2, single and double, short vectors, RunFast mode, bounced exceptions) | DDI 0360F chapters 16-20 (DOC) | | Exceptions | v5 model | v6 model: imprecise data aborts (CPSR.A), SRS/RFE, high vectors | DDI 0100I (DOC) | An axis on arm946es-python would make every handler of that ARMv5TE specification branch on the generation, and the charter's chip rule gives a CPU its own core in any case: the MP11 is a different chip. **Recommended: a new core, `arm11-python`, in the shape of arm7tdmi-python and arm946es-python, sharing no code with either.** ## What the three share, and how - **Shape and tooling**, not code: one handler per decode row, decode tables generated from the ARM ARM's encoding tables with a `--check` mode, `state.py` / `disasm.py` / `debug.py` / `trace.py`, the readability test, evidence tags. arm946es-python's option C (importing private helpers from a pinned sibling) was rejected there for the same reason it is rejected here: an ARMv4T fix would silently move an ARMv6 core. - **A differential detector between our own cores** (tier 5, our own specifications): the ARMv5TE subset run on arm946es-python and on arm11-python must agree except on the listed v5/v6 differences (unaligned access with U=1, the v6 exception model, MUL flags). Cheap, and it catches transcription slips in the shared subset. - **The board wires the three cores with different bus contracts**: the ARM7's per-cycle callbacks (the GBA's contract), the ARM9's BIU transactions behind its caches and TCMs, and the MPCore's AXI-like transactions behind the SCU (this core's [mmu-caches-mpcore.md](mmu-caches-mpcore.md)). ## What arm946es-python needs for the 3DS (a row, not a fork) - A **3DS configuration row**: the 3DS ARM9's cache sizes and TCM sizes and bases (GBATEK's map: ITCM 32 KB at 0, 01FF8000h and 07FF8000h; DTCM 16 KB at FFF00000h during the boot ROM), its clock ratio, and its CP15 ID values. Those values are unknowns until read (n3ds-python U-list); the NDS row's values are not to be assumed. - **No new instructions**: the 3DS ARM9 is ARMv5TE (HYPOTHESIS as above). If a CP15 read ever shows otherwise, that is a new decision. - The **DS-mode switch** belongs to the board (n3ds-python, ARM7_CNT), not the core: the core sees a memory map change while it runs from ITCM. ## What arm7tdmi-python needs Nothing for 3DS mode. For GBA/DS modes, the board starts it from ARM7_BOOTCODE overlaid on its BIOS vectors; that is a board concern. Legacy modes are late (n3ds-python decision).