A premium, high-fidelity web-based emulator of the legendary Texas Instruments TI-59 programmable calculator. This simulator faithfully reproduces the iconic look, weight, and feel of the original hardware—including its premium golden-register layout—while driving a precise mathematical processing engine beneath the hood.
Developed as an open, modular academic research project, this emulator serves both as an educational tool and a nostalgic tribute to early programmable computing.
This project is engineered entirely on the frontend for maximum portability, sub-millisecond rendering, and zero server overhead:
- Core Structure: Semantic HTML5
- Styling & Theme Engine: Modern CSS3 featuring dynamic Custom Properties (
:root) for pixel-perfect retro aesthetics and full responsiveness. - Computation & Logic Core: Pure Vanilla JavaScript (ES6+) utilizing high-precision linear registers and processing stacks.
1. Introduction & Architectural Limitations (Turing Completeness)
From a theoretical computer science perspective, this emulator is not a Turing-complete machine. The current coprocessor implementation supports exclusively linear program execution.
- What is excluded: Conditional branching (e.g., x=t), unconditional jumps (GTO), loops, and indirect addressing are intentionally left out of this academic release.
- Extensibility: The project is designed as an open, modular system. Developers are welcome to clone the repository and implement the missing instruction sets locally.
2. Implemented Core Functions Spec (Command List)
The following core calculation and utility modules are fully operational in this stable build:
| Functional Module | Description | Activation Keys |
|---|---|---|
| Calculation Chains | Seamlessly evaluates long arithmetic strings (e.g., 2 + 3 * 4), processing intermediate results without dropping the stack. |
ADD SUB MUL DIV |
| 2nd Prefix Register | Shifts the keyboard mapping to execute the premium "golden" commands printed above the physical keys. | 2nd |
| Direct Memory Addressing | Features a dedicated array of 100 general-purpose registers (R00–R99). Requires entering a two-digit cell address. |
STO RCL SUM + [0-9][0-9] |
| Angular Conversion | Handles precise angular conversions between radians and degrees based on the system's current trigonometric mode. | 2nd ➔ CE (deg) / CLR (rad) |
| Math Functions | Advanced computation including square roots, squaring, natural/base-10 logarithms, exponents, trigonometry, and inverse trig. | SQRT X2 sin cos 2nd + INVX (` |
| Linear Coprocessor | Records key opcodes into a 960-step program array for automated sequential playback. | LRN SST BST RST R_S |
3. Test Cases: Arithmetic Mode
Objective: Verify the prefix-register shifting logic and sign inversion.
- Input the number 1.
- Press +/− (or
SIGN) ➔ The display will show-1.. - Press the golden prefix key 2nd.
- Press the 1/x key (which invokes the |x| module).
- Expected Result:
1.(The negative sign is successfully stripped).
Objective: Verify system constant extraction ($\pi$) and angular transforms.
- Press CLR to perform a complete system register reset.
- Flip the physical toggle switch at the top of the screen to RAD mode.
- Press 2nd, then press 3 to recall the built-in constant pi ➔ The display will read
3.141592654. - Press 2nd, then press CE to trigger the deg command.
- Expected Result:
180.(Radians are correctly converted into degrees).
4. Test Cases: Program Mode (LRN) & Memory Constraints
⚠️ Internal Program Constraint: Numbers with Zeros
Due to how key opcodes are stored sequentially, manually typing numbers that contain zeros (e.g., hardcoding the constant 10) inside the LRN programming mode will cause execution glitches or register skipping.
-
The Solution: Any constants containing zeros must be pre-loaded into general-purpose memory registers (
R00–R99) in standard calculation mode BEFORE writing or running your program. Inside theLRNsequence, simply call that register using theRCLcommand.
Code Blueprint: Calculating $f(x) = x^2 + 10$
Step A: Pre-loading the constant into Memory
- Press CLR to wipe the interface.
- Type the target constant: 1 ➔ 0.
- Save it to register five by pressing STO, followed by the two-digit address 0 ➔ 5.
Step B: Recording the Linear Sequence
- Press RST to reset the program counter to zero.
- Press LRN to enter Teach/Learn mode ➔ The display switches to the step format
000 00. - Key in the following strict instruction sequence:
- X2 (Squares the variable currently on the screen)
- ADD (Initiates addition)
- RCL ➔ 0 ➔ 5 (Safely recalls the constant '10' from register 05)
- ADD (Closes and evaluates the current operation)
- R_S (Run/Stop command to halt execution and output the final result)
- Press LRN again to exit programming mode.
Step C: Automated Execution
- Press RST to snap the program pointer back to step zero.
- Enter your test argument, for example: 5.
- Press R_S to trigger the linear coprocessor.
-
Expected Result:
35.(The formula executes perfectly).
Distributed under the MIT License. See LICENSE for more information.