# The ARM60's instruction set and modes (ARMv3), as differences from ARMv4T Sources: the ARM60 data sheet (Zarlink DS3553 issue 4.2, "DS" below; sections cited), the ARM610 data sheet (ARM DDI 0004D, section 16.0), the ARM Architecture Reference Manual DDI 0100E (chapter A8 for 26-bit; the rest for the shared instruction pseudo-code). All DOC unless marked. The reader is assumed to know arm7tdmi-python's docs; this page lists only what the ARM60 does differently and what the 3DO uses. ## Instruction classes (DS 4.1, figure 5) Data processing; PSR transfer (MRS, MSR); MUL, MLA; LDR/STR (word, byte); LDM/STM; SWP (word, byte); SWI; CDP, LDC/STC, MRC/MCR; the undefined-instruction space; B, BL. Nothing else. Absent compared with ARMv4T: Thumb and BX, LDRH/STRH/LDRSB/LDRSH, UMULL/UMLAL/SMULL/ SMLAL, System mode. **U1. What absent encodings do.** DS 4.1: "some instruction codes are not defined but do not cause the Undefined instruction trap to be taken, for instance a Multiply instruction with bit 6 changed to a 1". So an ARMv4 halfword load (`cond 000P UIWL Rn Rd xxxx 1SH1 xxxx`, SH != 00) on an ARM60 does something unstated rather than trapping. No document, test or die study says what. Default (provisional, Aubrey's 2026-11-12 rule): take the undefined trap, marked HYPOTHESIS, with a list of every such encoding in the decode table; no 3DO program is expected to contain one (the MAME traces below show none). ## PSR transfer (DS 4.5) MRS Rd, CPSR/SPSR; MSR CPSR/SPSR, Rm (all bits); MSR CPSR_flg/SPSR_flg, Rm or #imm (flags only). In User mode only the flags can change. Reserved bits "shall be preserved" and read as unpredictable values (U3: what the ARM60 actually returns in bits 27:8). The 3DO's firmware uses `MSR CPSR_c` and `MSR SPSR_fc` forms (MAME's disassembly names for the control-field mask; OBSERVED in the FZ-10 trace, 4,190 MRS/MSR in 10 frames). ## Configuration inputs (DS 2.0, 3.1) | Input | Effect | On the 3DO | | --- | --- | --- | | BIGEND | byte lanes: big-endian puts byte 0 on D[31:24] | big-endian (devnotes, tier 3; MAME's "ARM7 (big)", OBSERVED) | | LATEABT | high: an aborted LDR/STR writes its modified base back; low (early abort): it does not | U4: strapping unknown | | PROG32 | high: instruction fetches use A[31:0]; low: 26-bit program space, locked into 26-bit modes | U5: strapping unknown; the firmware uses 32-bit modes (below), so PROG32 is high | | DATA32 | high: data in 32-bit space; low: data limited to 64 MB with address exceptions | U5; MADAM's abort-reason bit R26E "Out of 26bit address range" (3dodev wiki, tier 3) hints that the board, not the CPU, polices 64 MB | Each input may change while running, with the data sheet's restrictions (PROG32 only while in a 26-bit mode; DATA32 not just before an access above 0x3FFFFFF). A board passes them as constructor arguments with setters. ## Modes (DS 3.2-3.3; ARM610 DS 16.0; DDI 0100E A8) 32-bit modes: User 10000, FIQ 10001, IRQ 10010, Supervisor 10011, Abort 10111, Undefined 11011 (no System 11111: that is ARMv4). 26-bit modes: User26 00000, FIQ26 00001, IRQ26 00010, SVC26 00011. Banking as ARMv4T without System. ### The three configurations (ARM610 DS 16.0; DDI 0100E A8.5.1) 1. PROG32 low, DATA32 low: 26-bit program and data space; only 26-bit modes; exceptions enter 26-bit modes; address exceptions on data addresses with any of bits 31:26 set. 2. PROG32 low, DATA32 high: as 1 without address exceptions. 3. PROG32 high, DATA32 high: 32-bit configuration; exceptions (reset included) enter 32-bit modes; a 26-bit mode can be entered by MSR or an exception return. The fourth combination "should not be selected" (unpredictable). ### 26-bit modes (DDI 0100E A8.2-A8.4) - R15 = N Z C V I F | PC[25:2] | M1 M0. As Rn (and as a load/store base) only the PC bits are read, others zero; as Rm (and in BL/exception link values) all 32 bits are read. - Data processing writing R15 without S, LDR and LDM without `^` write PC bits only; with S or `LDM ^` they write PC and PSR (in User mode NZCV only). - TEQP, TSTP, CMPP, CMNP (bits 15:12 = 1111) write the PSR bits of R15 from the ALU result. - Address exception: a data address with bits 31:26 non-zero (configuration 1 only) enters SVC26 at vector 0x14 with R14_svc = instruction + 8 (and the PSR bits). - In configuration 3, an exception taken from a 26-bit mode copies only R15[25:2] to the link register (other bits zero) and the PSR bits to the SPSR. - Vector exceptions (configuration 3, 26-bit mode): a data write to 0x0-0x1F aborts; whether a read does is implementation defined (U6 for the ARM60). The ARM60 data sheet's PROG32 note ("not about to write to an address in the range 0 to 0x1F") is the same mechanism. - MSR between a 32-bit and a 26-bit mode is unpredictable near the end of the 26-bit space or before a branch whose target differs between the two spaces. ## Loads and stores (DS 4.7) - Word load from a non-aligned address: the bus word is rotated so the addressed byte is in bits 7:0 (little-endian) or, big-endian, in bits 31:24 for offsets 0 and 2 and bits 15:8 for offsets 1 and 3. Both readings reduce to "rotate the bus word right by 8 x (address mod 4)" once the big-endian lane order is applied (FITTED: our reading of the two paragraphs; the core does the rotation, the board returns the aligned bus word). Non-aligned STR stores the register unrotated. - STR of R15 stores the instruction's address + 12; R15 as base reads + 8, no write-back; R15 shall not be Rm. - Abort: early (LATEABT low) leaves the base unmodified; late writes it back. LDM/STM always complete with write-back, the base never overwritten by loaded data after an abort, R15 never loaded (DS 3.4.3). - SWP asserts LOCK across its read and write (DS 2.0). ## Exceptions (DS 3.4) Vectors 0x00 reset (SVC), 0x04 undefined, 0x08 SWI, 0x0C prefetch abort, 0x10 data abort, 0x14 address exception (26-bit program space only), 0x18 IRQ, 0x1C FIQ. Priorities: reset, data abort, FIQ, IRQ, prefetch abort, undefined/SWI. FIQ and IRQ pass a synchroniser (Tsyncmax 3 cycles, minimum latency 4 cycles; DS 3.4.8) and are checked at the end of each instruction. Reset copies the (undefined) PC and CPSR into R14_svc and SPSR_svc (DS 3.5) and, in the 32-bit configuration, enters SVC32 with I and F set at address 0. While nRESET is low the core makes dummy fetches from incrementing addresses (DS 2.0, nRESET). ## What the 3DO's firmware uses (OBSERVED, MAME 0.285 trace of the FZ-10 BIOS) `tests/detectors/mame-trace-fz10-*.txt` (counts only): from reset, 214,148 instructions in 2 frames, all in svc32; frames 300-310, 871,549 instructions in usr32 (79%), svc32 (13%), fiq32 (8%). Zero halfword or signed loads, long multiplies, BX, SWP or coprocessor instructions; MRS/MSR 4,190; SWI 10; MUL/MLA 0 in these windows. So the 3DO runs the 32-bit configuration, and the first rungs can ignore 26-bit modes. MAME's ARM7 core cannot show whether an ARMv3-only behaviour would differ (validation.md).