Memory
The CT Payphone uses 24 KB of ROM and 1 KB of RAM with 10-bit address masking to 3FF (hexadecimal). Additionally, 32 bytes of NVRAM are battery-backed for persistent storage across power cycles.
Memory Map
| 0000–5FFF | ROM (24 KB) - Firmware code and data tables |
| 6000–6FFF | Extension ROM (4 KB) - Existence checked at boot via LDI opcode at 6000 (hexadecimal) |
| 8000–FFFF | RAM (1 KB) - Working memory, masked to 3FF (hexadecimal) |
| 8C00–8C1F | NVRAM (32 bytes) - Battery-backed persistent storage |
RAM Organization - 1 KB at 8000 (hexadecimal)
| 8000–800F | Event circular buffer (16 bytes) |
| 8100–8106 | Shadow port registers (R4 area) |
| 810A | Sensor state byte |
| 810E | Coin validator state |
| 8140–81AF | Task state variables |
| 813F ↓ | Stack (R2, grows downward) |
| 83D0 | Working variables (R6 area) |
Configuration RAM
A separate 1 KB configuration file is loaded at 8000 (hexadecimal), overlapping working RAM via address masking. Key configuration offsets:
| 8200 | Minimum fee, default: 0A (hexadecimal) = 10p |
| 8201 | Unit fee (10p in V15 config) |
| 8200+ | Tariff tables (BCD-encoded pricing) |
| 8330–83A0 | Phone number sequences (autodial/test) |
Configuration is downloaded from a Tester 297 device via serial (1200 baud, 7O1). The emulator can also load it directly from a binary file. Config variants: A, C, E (must use “E” variant for cash calls).
ROM Key Addresses
| 0000 | Boot/initialization - DIS, SEQ, port init, jump to 00E4 (hexadecimal) |
| 002C | Extension ROM bank check, tests for LDI at 6000 (hexadecimal) |
| 0197 | First interrupt gate |
| 259C | Interrupt handler entry point |
| 3C9B | Keypad scan routine |
| 499D | Event queuing subroutine / SCRT CALL entry |
| 4CF9 | Serial RX routine |
| 4D40 | Serial TX routine |
| 4E41 | Coin value table |
| 4EEB–5FFF | Event/action mapping tables (130 events) |
Register Usage
| R0 | Main program PC (after handoff) |
| R1 = 259C | Interrupt handler entry |
| R2 = 813F | Stack pointer (grows down) |
| R4 = 81xx | Shadow port registers |
| RF = 499D | SCRT CALL entry (uses MARK+SEP, not standard R4/R5) |