Keyboard
The PTC-701 has 35 keys (rubber dome, matching the "CZOSKEY35X" identifier in the app ROM header). The AMI 9217MLB gate array scans the keyboard matrix autonomously and presents results in a 6-byte buffer at 0x3F20-0x3F25. The CPU reads this buffer to detect key presses.
Scanning
The scan routine (R1.7: SYS 1898 at 0x18AC-0x18EC) reads 6 column bytes from addresses 0x3F20-0x3F25. Each byte represents 8 key positions (bit 7 scanned first, bit 0 last). A bit value of 1 means the key is pressed. The routine rejects multi-key presses (if more than one bit is set after shifting, the scan returns busy).
When no key is detected, the firmware executes IDL to halt the CPU until the AMI gate array generates an interrupt (triggered by a key state change when keyboard interrupt is enabled via bit 0 of 0x3FA1).
Key Code Computation
When a key is found, the firmware computes a key code using an offset table at ROM 0x1943:
rev_col = 0x05 - column_number iterations = SHL count before DF=1 (0=bit7, 1=bit6, ..., 7=bit0) ptcmcd_offset = offset_table[iterations] + rev_col + 0x14 key_code = ptcmcd.bin[ptcmcd_offset] (with bank=0)
The offset table values are: 0x00, 0x06, 0x0C, 0x12, 0x18, 0x1E, 0x24, 0x2A (multiples of 6, one per bit position).
Character Translation
The key code is translated to a character via a runtime table at RAM (R1.7: 0x62DA, loaded from app ROM during boot). The lookup in R1.7 is: char = M(0x62DA + key_code - 1).
The key handler (in R1.7 at 0x23ED) then applies a range check:
- Characters 0x20-0x5F pass the range check - stored as printable input (digits 0-9, letters A-F)
- Characters above 0x5F (x, y, e, r, s) and below 0x20 (0x01) fail the range check - returned as special function key codes
Confirmed Key Mapping
The following keys have been empirically verified in the emulator:
| PTC-701 Key | Col | Bit | Char | PC Key |
| 0 | 2 | 0 | 0x30 | 0 |
| 1 | 3 | 1 | 0x31 | 1 |
| 2 | 2 | 1 | 0x32 | 2 |
| 3 | 1 | 1 | 0x33 | 3 |
| 4 | 3 | 2 | 0x34 | 4 |
| 5 | 2 | 2 | 0x35 | 5 |
| 6 | 1 | 2 | 0x36 | 6 |
| 7 | 3 | 3 | 0x37 | 7 |
| 8 | 2 | 3 | 0x38 | 8 |
| 9 | 1 | 3 | 0x39 | 9 |
| A (UPDATE) | 3 | 7 | 0x41 | A |
| B (SET UP) | 2 | 7 | 0x42 | B |
| C (INVENT) | 1 | 7 | 0x43 | C |
| D (REVIEW) | 4 | 6 | 0x44 | D |
| E (EDIT) | 3 | 6 | 0x45 | E |
| F (SEND) | 2 | 6 | 0x46 | F |
Confirmed Function Keys
| PTC-701 Key | Col | Bit | Char | Function | PC Key |
| CLEAR | 0 | 4 | x (0x78) | Exit/cancel current function, return to prompt | ESC |
| BACKSPACE | 0 | 3 | y (0x79) | Delete last entered digit | BACKSPACE |
| RIGHT arrow | 0 | 1 | r (0x72) | Confirm input, advance to next address/field | RIGHT |
| LEFT arrow | 3 | 0 | s (0x73) | Confirm input, step to previous address/field | LEFT |
| P/YES | 4 | 4 | 0x01 | Confirmation key (inactive in SYS-MODE contexts tested so far) | P |
| ENTER | 0 | 2 | e (0x65) | Unknown - causes lock in current SYS-MODE states | RETURN |
Boot keys: Holding RIGHT arrow + LEFT arrow during power-on forces a cold boot, skipping the “INV PWR LOSS” notification and going directly to SYS-MODE. Without boot keys, warm boot shows the power-loss message first, then enters SYS-MODE after any keypress.
Physical Layout
The physical keyboard layout from the case photo:
Col 1 Col 2 Col 3 Col 4 Col 5
Row 1: [ON/OFF] [A] [B] [C] [ ]
(power) UPDATE SET UP INVENT
Row 2: [D] [E] [F] [G] [H]
REVIEW EDIT SEND ADD ON EXIT
Row 3: [I] [J] [K] [L] [M]
SEARCH INSERT BCKSP DELETE MODIFY
Row 4: [SHIFT] [N] [O] [P] [CLEAR]
NO LOOK UP YES
Col 1 Col 2 Col 3 Col 4 Col 5 Col 6 Col 7
Row 5: [Q] [7] [8] [9] [S] [←]
Row 6: [T] [4] [5] [U] [6] [V] [→]
Row 7: [W] [1] [2] [X] [3] [Y] [ENTER]
Row 8: [SP] [−] [0] [Z] [.] [ENTER]
Note: ON/OFF is likely hardwired to EF4 (not in scan matrix). ENTER is a large red key spanning rows 7-8 in column 7. SHIFT may be on the EF3 line rather than the matrix.
Unverified Positions
Eleven matrix positions return 0x61 ('a') in the translation table, indicating function keys that do not produce printable characters in normal input mode. These likely correspond to the physical function keys (G/ADD ON, H/EXIT, I/SEARCH, J/INSERT, K/BCKSP, L/DELETE, M/MODIFY, N/NO, O/LOOK UP, SHIFT, SPACE) but their exact column/bit assignments have not been empirically confirmed.