Search › A-Z › T › TI-89 Emulator
TI-89 Emulator
An in-browser emulator of the TI-89, the Motorola 68000 graphing calculator Texas Instruments released in 1998. The 68000 is a standalone JavaScript core (the SAE / WinUAE / UAE interpreter as vendored by EstyJS); the TI-89 machine around it — the memory map, the TI ASIC, the programmable timer and interrupts, the Sharp flash chip, the 160×100 LCD and the key matrix — is a from-source JavaScript port of TIEmu's libti68k. It boots the authentic TI-89 operating system (AMS) straight to the calculator home screen.
Because the whole machine is ordinary JavaScript, it plugs into the shared in-page debugger: single-step the 68000, read and write D0-D7 / A0-A7 / PC / SR, scrub memory, and set execution breakpoints and write watchpoints, all live. Type on the on-screen TI-89 keypad or your physical keyboard.
Runs on: Web browser
TI-89 Emulator Online Emulator
Play TI-89 Emulator using JavaScript directly in your browser.
Controls
Configurations
| Configuration | Emulator | Machine | OS | Legal | |
|---|---|---|---|---|---|
| TI-89 home screen (AMS) | TI-89 Emulator | TI-89 | grey | Open ⛶ |
Chips
Notes
Embedding
The TI-89 is a Motorola 68000 machine, so the CPU is a standalone JavaScript 68000 interpreter — the SAE / WinUAE / UAE core as vendored by EstyJS (processor.js). Everything else is authored in ti89.js: the memory map, the TI ASIC, the timer and interrupts, the Sharp flash chip and the LCD. Because it is all ordinary JavaScript, we own the run loop and expose the machine through a small handle.
Boot. Build the machine on the flash image, then run instructions and paint the 160×100 LCD each frame:
var m = TI89.create({ rom: flashBytes }); // 68000 + TI-89 hardware
(function frame(){
m.runInsns(budget, breakpoints, watchOn); // run a slice, honouring bp/wp
m.renderLCD(imageData); // 1bpp framebuffer -> canvas
requestAnimationFrame(frame);
})();
The machine handle is a handful of plain function calls, so the debugger reads registers and memory each refresh with no per-instruction cost:
| Handle | Kind | What it does |
|---|---|---|
m.cpu | object | The 68000 core. dbgRegs() is the live register file (d[8], a[8], pc, the CCR booleans x n z v c, s, intmask); stepOne() runs exactly one instruction. |
m.runInsns(n, bps, wp) | fn | Run up to n instructions; stop early on a breakpoint PC (a Set) or a write watchpoint. The real dispatch loop, so both are honoured. |
m.read8 / write8 | fn | The 24-bit bus, side-effect-free on reads (skips the $600000 I/O window) for a safe auto-polling hex view. |
m.ramRead / m.romRead | fn | The raw 256 KB RAM and 2 MB flash chips. |
m.renderLCD(img) | fn | Composite the 160×100 monochrome LCD (from the framebuffer at the address the OS programmed into ports 0/1) into an ImageData. |
m.setKey(r,c,down) / m.setOnKey(down) | fn | Press / release a key in the 10×8 hardware matrix, or the ON key. |
m.reset() | fn | Re-seed the OS reset vector and restart. |
The flash image is fetched from the emulator directory; the reset vector is found by scanning the flash for the AMS boot signature. The boot script publishes all of this on window.EMU_BOOT.
Debugger integration
The plug-in (ti89-debug.js) reads the running machine from window.EMU_BOOT and calls EmuKit.defineMachine with a transport, the Motorola 68000 register set and the memory chips. It reuses the shared m68000 disassembler (/debugger/src/cpus/m68000.js).
What was added to the vendored 68000 core. Only a thin, additive debug/hardware API on processor.js (the emulation hot path is unchanged): pc(), lastCycles(), setStopped()/isStopped() for the TI ASIC low-power state, and raiseInt()/highestPending()/serviceInterrupts() so the TI-89 machine drives the 68000's auto-vector interrupts itself. Registers are read and written straight off the live regs file (dbgSetD/dbgSetA/dbgSetPC/dbgSetSR).
Real breakpoints and watchpoints. Because ti89.js owns the dispatch loop, both are honoured by the actual run path, not merely surfaced. Single-step is cpu.stepOne() plus one hardware tick. Execution breakpoints are a host-side Set of PC values the loop checks before each instruction. Write watchpoints wrap the RAM store path (onWrite), so a watched address halts the machine the instant the OS writes it. The TI ASIC's timer interrupts, the Sharp flash write state machine and the port-$600005 STOP/wake are all faithful, which is why the official AMS boots to its home screen here.
Booting the OS. A blank flash has no valid certificate, so the boot code would stop at “Corrupt Certificate Memory”; like TIEmu we boot straight from the OS entry vector (found by the flash boot-signature scan from offset 2000). AMS then formats its own flash structures through the emulated Sharp write state machine and paints the home screen.
Architecture
The TI-89 (1998) is a Motorola 68000 graphing calculator: a ~10 MHz 68000, 256 KB of RAM, 2 MB of Sharp flash holding the boot code and AMS (Advanced Mathematics Software), and a 160×100 monochrome LCD, all glued together by a TI gate-array ASIC.
- 68000 core —
processor.js, a from-source JavaScript port of the SAE / WinUAE / UAE interpreter: a generated opcode-function table, a prefetch pair and theregsregister file. - Memory — RAM at $000000 (mirrored to FFFFF), the 2 MB flash at $200000, and the ASIC I/O at $600000. Reads outside these return the 4 bus-filler byte, exactly as the hardware floats.
- ASIC — the $600000 register block: the programmable timer and the six auto-vector interrupt sources (heartbeat, keyboard, ~1 Hz clock, link, timer, ON), the keypad row-mask / column-read ports, the LCD address and geometry registers, contrast, and the low-power STOP.
- Flash — a Sharp LH28F160S3T write state machine (program AND-clears bits, block-erase to $FF, DQ7 status polling), so AMS can format its flash file system.
- Display — the 1bpp framebuffer in RAM, its address programmed into ports 0/1; composited to the canvas each frame.
- Keypad — a 10×8 matrix read by writing a row mask to ports 8/9 and reading the columns at B; the ON key is a separate line.
The TI-89 hardware model (ti89.js) is a from-source port of TIEmu's libti68k (mem89.c, ports.c, hw.c, kbd.c, flash.c, m68k.c).