Open questions¶
Everything the other pages mark as Unconfirmed or "not known", gathered in one place and grouped by area. Each item says what is known so far, links to the section that explains it, and says what would settle it:
- Safe probe: an add-in on a real calculator that only reads registers or runs ordinary instructions. See Writing probe add-ins.
- Tracing: more reading of the OS 3.60 code (Ghidra or
re/sh4dis.py). - Not safe to probe: the direct test would need a
sleep, a CPG write or a flash write. Answer it by tracing instead.
Probes must never sleep, touch the CPG or write the flash
One probe that replayed the OS's idle sleep reset a real calculator. A probe add-in must
not execute sleep, must not write the clock registers at 0xA4150000–0xA41500FF
(reading one is the owner's call), and must not write the flash. See
Writing probe add-ins and
How facts are verified.
CPU¶
- What does an
F…opcode do on the calculator? There is no FPU; on the SH4AL-DSP these opcodes are DSP instructions. A 163-million-instruction run of the OS met none. CPU → No FPU. Settle: safe probe: run one DSP opcode and read back the registers. - Is SR bit 12 always 1, or does something set it? An add-in reads
SR = 0x40001101, but the OS start-up loads SR with bit 12 clear (0x500000F0). CPU → SR bit 12 is set. Settle: safe probe:ldca value with bit 12 clear into SR, thenstcit back. - Which line does the error screen show for each exception cause? The table and the messages are read from the OS image; nothing has been triggered. CPU → Exceptions and their vectors. Settle: safe probe: an unaligned read, and an undefined opcode.
- Is a PC-relative load in a delay slot computed from the slot's address? The emulator
does so; the calculator has not been tested.
CPU → Delay slots.
Settle: safe probe: a
mov.l @(disp,PC)in the slot of anrts. - Why does the deeper
sleeppath run uncached and rewrite the bus controller? A low-power state that keeps the CPU off the DRAM would fit. CPU →sleep. Settle: tracing. Not safe to probe. - What does
0xFF000024hold at reset? It is EXPEVT. The boot turns its low 16 bits into a model code, and the OS needs model code0xCA02, so the emulator returns0x0A02. Boot → From reset. Settle: an add-in runs long after reset, when exceptions may have overwritten EXPEVT, so an add-in probe cannot answer this. - What is
0xFF2F0004? Both the boot code's OS-startup step (at0xA00006E4) and the OS start-up (at0x80020384) write 0 to it, and no other code in the OS image loads its address. On the SH7724 this address is EXPMASK, next to CPUOPM (0xFF2F0000); whether the SH7305's bits mean the same is not known. No page covers it yet. Settle: safe probe: read it. -
In what order are equal-level interrupts taken? The emulator takes the highest INTEVT first. Interrupts → How the CPU accepts an interrupt. Settle: a probe with two timer interrupts at the same level (more than a read).
-
What does a patched code page need on the calculator? A debugger that patches a page in RAM must also deal with the ITLB and the instruction cache. The emulator has neither, so it cannot check that part. MMU → Software breakpoints. Settle: safe probe: patch a
trapainto a RAM copy of a page and see whether it fires.
Memory¶
- What do the three
CASIOMEMDATAblocks hold? The code that erases and writes them is around0x802AF800. They contain main memory's folder names (system,library,@LOCAL40), which supports the guess that power-off saves main memory there; the format is not traced. Memory map → Flash, Flash → The OS's own area. Settle: tracing. -
How big are the blocks at
0xFE200000, and what lies between them? The sizes on the page are what the OS clears. Two sets of three blocks, 256 KB apart, look like a DSP's program and X/Y data memories, as on the SH7724's SPU2. Memory map → The memory at0xFE200000. Settle: safe probe: a read-only dump in steps across the 2 MB. -
Which flash chip is it? The OS's chip check finds a manufacturer ID of 1 (AMD/Spansion), and 128 KB sectors with a 512-byte write buffer fit their S29GL-S family. The device ID has never been read. Flash → How big the write buffer is. Settle: tracing. Reading the ID needs flash commands, so it is not a plain read probe.
- Who sets SR.BL before the storage routines run, and what are the IL RAM routines used
from
0x801E38xxfor? Flash → Why the routines run from IL RAM. Settle: tracing. - How does the storage memory's translation layer work? What the sector header's N counts, the page headers, and how the newest copy of a page is found. Flash → The storage memory. Settle: tracing (the 32 MB dump has the data).
- Why does an add-in launch map virtual
0x0–0xFFFF(slot 63) onto flash address 0? MMU → What the add-in finds when it starts. Settle: tracing. - Is an add-in limited to 2 MB (or 1 MB) of code? The page table has room for 512 pages, but the mapper clears only 256. MMU → Code pages on demand. Settle: tracing.
Peripherals¶
Interrupts¶
- Which device raises INTEVT
0xF00? The OS has a handler for it. Interrupts → The OS's handlers. Settle: tracing. - Are
0x620/0x640(IRQ1/IRQ2 pins),0xA20(USB) and0xC00(serial port) right? The identifications rest on the SH7724's register layouts, and every bit the OS uses matches them. No probe has used these units. Interrupts → External pins IRQ1 and IRQ2, USB and the serial port. Settle: safe probe: read INTREQ00 (0xA4140024) with and without a cable. - What do bits 7 and 5 of
0xA4150020do? On the SH7724 this is STBCR, and bit 7 (STBY) makessleepenter software standby. Bit 5 is unknown; the deeper idle routine clears it. Interrupts → The OS 3.60 dispatcher. Settle: tracing. It is a CPG register: never write it from a probe. - When does the OS enable the ETMU interrupts? The OS's ETMU handlers touch IPRJ, IPRG, IPRE and IPRI; the mask bits come only from gint. Interrupts → Sources and their fields. Settle: tracing.
- How long does the boot code's interrupt dispatcher stay in use? In the real IL RAM dump
its table at
0xFD8004D0is gone. Interrupts → The boot code's dispatcher. Settle: tracing.
Keyboard¶
- Which keys sit at column 11, rows 1, 3, 5 and 6? The OS's position table has entries
there; row 3 gives the diagnostic key code
0x7D00. Only RIGHT has been read on the calculator. Keyboard → The key matrix. Settle: safe probe: read the key-data words while each key is held. - Are
+0x1A/+0x1Ccolumn and row enables? The reading rests on their widths (12 and 8 bits). The emulator models them that way. Keyboard → Registers. Settle: safe probe: set both to 1 with the key interrupt masked, press keys, read the key-data words. - What do bit 1 of
+0x12and the register at+0x1Emean? Both read0x0002. The OS only tests bit 0 of+0x12(scan in progress). Keyboard → Registers. Settle: tracing. - What do the other mode values and status flags 2, 4, 5 and 6 mean? Only mode
0x0200has been seen; flags 2, 4, 5 and 6 never. Keyboard → Mode, Status flags. Settle: tracing. - Do the key-data words hold the last scan or the live keys? A debugger add-in behaved as if they held the last scan. The emulator shows live keys. Keyboard → When the unit scans. Settle: safe probe: read the words while pressing and releasing a key, without starting a scan.
- What does the PFC byte
0xA40501C6configure? Every routine that switches the keyboard lines writes it. Keyboard → Setup. Settle: tracing. - Which apps use the second key-repeat mode or the slow-down switch? Keyboard → Key repeat. Settle: tracing.
- Who calls the scan on demand, and for which keys? Keyboard → A scan on demand. Settle: tracing.
- The single-key check: which key does each caller ask about, and which port column is
which key? Syscall
0x127Edrives 12 columns through0xA4050136/0xA4050138and reads rows from0xA405016C. The emulator cannot model it without the mapping. Keyboard → Checking one key without the unit. Settle: tracing for the callers; safe probe for the mapping: drive one column and read0xA405016Cwhile a key is held.
Display¶
- Is the double read of the data port after selecting R003 a dummy read? Display → Setting a window. Settle: tracing, or a probe that reads the port once and twice.
- Which module does bit 21 of
0xA4150030stop? The OS clears it before every frame push. Display → Pushing a frame. Settle: tracing. MSTPCR0 is a CPG register: never write it from a probe. - Are bit 5 of
0xA405012Ethe backlight, R100 bit 2 a standby bit, and what does R111 do? Inferred from when the OS writes them at power-off and power-on. Display → Switching the panel off and on. Settle: safe probe: read0xA405012E. - How many instructions per second does the calculator run? About 45 million on OS code, from menu scrolling counted by eye against the emulator. Display → How fast the screen updates, Timers → How fast the calculator runs. Settle: safe probe: time a known loop against the RTC.
Timers and clock¶
- Does any app run ETMU0–4? No periodic tick has been found, but the OS has handlers for them. Timers and time, ETMU channels. Settle: tracing.
- What are
0xA44D0024and0xA44D0028? Nothing in the OS refers to them; they sit where a channel at0xA44D0020would have its TCOR and TCNT. Timers → ETMU channels. Settle: safe probe: read them. - How long do the 32.768 kHz delay routines take on the calculator? Timers → The 32.768 kHz counter. Settle: safe probe: time them against the RTC.
- Is Pφ exactly 29.4912 MHz? A 1 ms gint timer counted 1001 ms per RTC second, so the figure is right to about 0.1%. Timers → TMU. Settle: a longer timing run of the same kind.
- What do the other RCR1/RCR2 bits do? They are listed as on the SH7724. Timers → RTC. Settle: safe probe: read RCR1/RCR2.
- Does R64CNT really count 128 steps per second? Timers → Ticks. Settle: safe probe: read R64CNT across several RTC seconds.
- Does setting PES again restart the 2 Hz period? The emulator keeps the RTC's own 1/2 s grid, as the SH7724 does. Timers → The 2 Hz wake-up. Settle: a probe that writes RCR2 (not just a read).
- Which level does the "USB" pin (
0xA4050162bit 1) show, with and without a cable? It picks the plain or the deepersleeppath. The emulator reads 0, so it always takes the deeper one. Timers → The 2 Hz wake-up, Interrupts → External pins IRQ1 and IRQ2. Settle: safe probe: read0xA4050162with and without a cable. - What clocks the one-shot delay unit at
0xA44A0000? Clearing MSTPCR0 bit 14 probably gives it its clock. Timers → The one-shot delay unit. Settle: tracing. Not safe to probe (it means writing MSTPCR0). - What is the unit at
0xA44C0000? Timers → The unit at0xA44C0000. Settle: tracing. - Is there anything at
0xA4130000? The OS never uses it. Timers → No counter at0xA4130000. Settle: a read probe, once it is known that reading an unused address there is harmless. - What does FLLFRQ (
0xA4150050) hold, and how fast is the CPU clock? The OS 3.60 never sets FLLFRQ; the 117.96 MHz figure rests on the boot's settings. Timers → How fast the calculator runs. Settle: reading FLLFRQ is a CPG read, the owner's call; otherwise time the CPU against the RTC.
Battery A/D converter¶
- What do bit 14 of
+0x88and the value0x01CFmean? Battery ADC → Registers. Settle: tracing. - Does a software start work the same on the calculator?
Battery ADC → Software start.
Settle: a probe that starts a conversion (no
sleep). - Does the idle conversion only end while the CPU sleeps? Inferred from measurements. Battery ADC → The idle conversion only ends while the CPU sleeps. Settle: not safe to probe: the direct test reset a calculator.
- What does each battery level mean to the user? Battery ADC → In the OS. Settle: tracing.
OS¶
- What exactly does power-off do? Not traced: what step 1 saves in the flash, what it
copies between
0xE5007000and0xE5200000, what the step-6 loop counts with 3600, and whether the real CPU stays in the samesleepwhile off. Boot → Power-off. Settle: tracing. Not safe to probe. - What triggers the three restarts? The multi-step routine, the confirmation screen that
calls
0x80365FC6, and what leads to syscall0x11EDare not traced. Boot → Restarts. Settle: tracing. -
What do
0x8035FCE8and0x801504DAcheck during first-boot setup?0x801504DAlooks for a 64-byte record whose second half-word is0x95FF. Boot → First-boot setup. Settle: tracing. -
What do r4 and r5 mean when an add-in starts, and what happens when its entry function returns? From the MAIN MENU they are 1 and 0. The launch also reads the add-in's code pages (about 3,000 reads) before mapping them, perhaps for a checksum. MMU → What the add-in finds when it starts. Settle: tracing.
- What calls syscall
0x0028, which rebuilds a running add-in's mapping? Perhaps after the storage memory moved the file. MMU → Rebuilding the mapping. Settle: tracing. - Does any syscall number mean a different function in 3.80 than in 3.60? At least 7,415
numbers start with the same code in both; the rest were not compared. What a number past
0x1F67does on the calculator is also untested (the call routine has no range check). Syscalls → OS versions. Settle: tracing. Never call an out-of-range number on a calculator. - How does the formatter pick the number of digits? Setup item
0x3Dis involved; the four cases of step 4 look like Norm, Fix, Sci and Eng; what the settings block at0x8C08B8A0is, and whether step 2 restores the setup items it rewrites, is not traced. Number format → From a stored value to the screen. Settle: tracing. - What are bytes 9–11 of a stored number, and a first nibble of 2, 3 or 4? The bytes are always 0 but the arithmetic reads them; the unpacker accepts the nibbles, but the OS was never seen storing them. Number format → A real number. Settle: tracing.
The emulator¶
Known differences from the calculator. These need a code change rather than an answer (details on each page's "In the emulator" section):
F…(DSP) opcodes are counted and skipped, so an add-in using them computes wrong results without an error.- SR bit 12 is never set.
- The single-key check never sees a key: the port pins are not wired to the keypad.
- The "USB" pin reads 0; nothing models the unit at
0xA44C0000; the IRQ pins, USB and the serial port raise no interrupts (right, since nothing is plugged in). - All 2 MB from
0xFE200000is plain RAM. - A stripe push that does not start at row 0 sets DAR past
0x14000000, and the emulator sends a DMA to the panel only when DAR is exactly0x14000000. This may be related toBdisp_PutDisp_DD_stripe(syscall0x0260) for rows 12–203 showing garbled on the emulator's panel while VRAM is right; that has not been traced. Display → Pushing a frame. - The OS's interrupt
0x560comes at level 8 (the OS programs 12) and the RTC's0xAA0at 9 (the OS programs 8). Interrupts → In the emulator. - The key-data words are live, not latched;
+0x1Eis not modelled. - Battery ADC:
+0x88/+0x8Aare merged,+0x90does not mirror,+0x8Eis not modelled. - CPG
PLLCR(0xA4150024) reads0x4000, without the FLL bit 12, so gint'sclock_freq()computes Pφ as about 65 kHz instead of 29.49 MHz, and gint delays given in µs come out wrong. - A leftover 64 KB region at
0xA4130000from the early bring-up. - The flash's ID and CFI reads are not modelled, so the OS's chip check falls back to 32-byte writes, where the calculator uses 512 (files come out the same); unlock-bypass programming is not modelled (no traced write uses it). Flash → In the emulator.
- There is no ITLB and no instruction cache (the ITLB arrays at
0xF2000000/0xF3000000read 0), and URC never counts up by itself (the OS always sets it). MMU → In the emulator.
Already answered¶
Questions the project's early notes left open that are now settled:
- FPU or not: no FPU. CPU → No FPU.
- Where fls0 starts: at physical
0xC80000. Memory map → Flash. - What KEYSC
+0x12reads: 2 on the calculator (the emulator matches since 2026-10-09). Keyboard → Registers. - What
0xA4140024bit 6 is: INTREQ00's IRQ1 flag (the USB pin), not "key-scan ready". Interrupts → External pins IRQ1 and IRQ2. - Whether power-off reboots: it doesn't; it is a
sleepinside PowerOff (syscall0x1839). Boot → Power-off. - Whether the OS uses a counter at
0xA4130000: no; its timers are the ETMU, the RTC and the unit at0xA44A0000. Timers → No counter at0xA4130000.