Objlab
← News
Linguaggi e compilatori

Reverse engineering completo del sistema operativo della TI-84 Plus

Sintesi redazionale: URL dell'articolo: https://siraben.github.io/ti84p-re/ URL dei commenti: https://news.ycombinator.com/item?id=48448493 Punti: 108 # Commenti: 17. Fonte originale: https://siraben.github.io/ti84p-re/

<p># System overview</p><p>This wiki documents how TI-84 Plus OS 2.55MP uses the Z80, banked memory, calculator hardware, and its internal software subsystems. It keeps direct ROM evidence, emulator observations, public hardware behavior, and unresolved inferences distinct.</p><p>The target is a validated 1 MiB Flash image whose OS identifies itself as 2.55MP. Conventions and methodology defines the address notation and confidence flags used throughout the book.</p><p>## Machine and OS</p><p>The TI-84 Plus is a Z80 machine that can only see 64 KiB at once. The target has<br>1 MiB of Flash and eight RAM selector values. Community hardware reports assign<br>eight independent 16 KiB RAM blocks to early units. They assign 48 KiB to later<br>units, with selectors `82`</p><p>–`87`</p><p>sharing one block. No physical result is recorded<br>for the calculator used by this project. A four-slot paging scheme and a<br>system-call (bcall) mechanism expose code and data beyond the current address<br>space. The OS is a single-tasking monitor. Its boot/kernel core occupies Flash<br>page `0`</p><p>, other OS routines span banked Flash pages, and fixed RAM windows hold<br>system state. See RAM pages for the revision evidence.</p><p>Four mechanisms connect most user-facing OS behavior:</p><p>| Mechanism | Role |<br>|---|---|<br>| Paging and bcalls | Reach code and data outside the current 64 KiB address space. |<br>| Floating-point engine | Store real and complex values in the `OP1` –`OP6` registers and perform arithmetic. |<br>| Variable Allocation Table (VAT) | Catalog named reals, lists, matrices, strings, programs, and AppVars. |<br>| Tokenizer and parser | Store TI-BASIC as one- and two-byte tokens and execute the resulting token stream. |</p><p>Around those sit the I/O subsystems: the Flash command path and boot write APIs; the IM1 interrupt dispatcher (interrupts.md); the standard timers, RTC, and low-power state machine (clock-timers-power.md); the MD5 round accelerator; the LCD driver; the keypad scanner; and the link port.</p><p>## Subsystem index</p><p>Each row maps a documentation page to the subsystem it covers.</p><p>| Page | Subsystem |<br>|---|---|<br>| Memory map | Address space, ports, and RAM layout |<br>| Flash memory | Flash geometry, protection, command sequences, boot write APIs, archive traces, and emulator differences |<br>| Paging | Paired and independent Flash/RAM mapping, extended selectors, boot transition, and forced overlays |<br>| Bus timing and wait states | CPU-speed-selected Flash, RAM, LCD, and timer wait-state registers |<br>| ASIC status, identity, protection, and GPIO | ASIC status and identity, battery comparison, protection mode, and GPIO |<br>| The bcall mechanism | `rst 28h` system calls and the jump table |<br>| Interrupts | IM1 entry, USB and legacy routing, masks, status, acknowledgement, priority, and wake |<br>| Clock, timers, and power | Clock domains, programmable timer API, RTC, APD cadence, and power-off |<br>| MD5 accelerator and boot API | MD5-assist ports, boot digest API, round descriptors, and Rabin hash transformation |<br>| Variables and the VAT | Variable Allocation Table and object types |<br>| Floating-point engine | BCD floating-point format and OP registers |<br>| Tokenizer and TI-BASIC tokens | Token tables, parser, and interpreter |<br>| Display and LCD | LCD ports and screen buffers |<br>| Keyboard and link port | Keyboard and link overview |<br>| Keypad and ON-key hardware | Matrix electrical behavior, scan timing, debounce, repeat, ON interrupts, and wake |<br>| Subsystem map | Bcall API surface and the system through-line |<br>| Boot, contexts, and errors | Boot, the context system, `_JError` , and `onSP` |<br>| Memory management | RAM heap, VAT, `userMem` , Flash archive, and garbage collection |<br>| Flash page map | Contents of each of the 64 Flash pages |<br>| RAM pages | RAM page selectors, page `83` , and restore rules |<br>| Open questions and roadmap | Prioritized future work |</p><p>The sidebar groups subsystem deep dives beneath their parent pages. The Glossary defines TI-specific terms, and the bcall index is the alphabetical system-call reference.</p>