Protocol overview¶
A frame-locked, peer-to-peer exchange over a plain 8N1 UART.
Line layer¶
| Parameter | Value |
|---|---|
| Wiring | null-modem crossover (GND straight, TXD↔RXD, /CTS↔/RTS) |
| Baud | 19200 |
| Framing | 8N1, LSB first, idle-high, non-inverted |
| Levels | 3.3 V CMOS |
| Flow control | hardware /CTS, software /RTS (I/O 0xB2) |
| Driver | TMP95C061 SIO channel 0 |
Games never touch SIO registers — all I/O goes through the BIOS COM services.
Byte classes¶
| Range | Meaning |
|---|---|
0xF0–0xFF |
control tokens — handshake FC/FD, transport F0–F7, gameplay F8, bulk ack F9/FA, teardown FE, sentinel FF |
| other | payload — controller bitmaps, ring bytes, identity params |
Roles¶
Endpoints are identical; roles are negotiated. Whoever gets FC onto the wire first
becomes P1 (FC requester); the peer answers FD and becomes P2 (FD responder).
In gameplay P2 sends the offer F8 00 <P2>, P1 the reply F8 <P1> <P2>.
State machine¶
Tick 0x206c8f dispatches on state byte 0x564e (a ×4 table offset).
stateDiagram-v2
[*] --> DISABLED: FF
DISABLED --> INIT: external write 00
INIT --> ADVERTISE: 04
ADVERTISE --> RESPOND_FD: 08 (got FC)
ADVERTISE --> FINALIZE: 0C (got FD)
RESPOND_FD --> FINALIZE: 0C
FINALIZE --> ACTIVE: 14
ACTIVE --> SHUTDOWN_FLUSH: external write 10
SHUTDOWN_FLUSH --> DISABLED: FF
| State | Value | Does |
|---|---|---|
| DISABLED | FF |
no dispatch; external code writes 00 to start |
| INITIALIZE | 00 |
COMINIT + COMRECIVESTART + COMONRTS → 04 |
| ADVERTISE | 04 |
send FC; got FC→08, got FD→0C |
| RESPOND_FD | 08 |
send FD → 0C |
| FINALIZE | 0C |
finish handshake → 14 |
| ACTIVE | 14 |
transport / gameplay until reset |
| SHUTDOWN | 1C |
flush + /RTS cycle → FF |
ACTIVE has two sub-modes (status bits):
bit 7 set → normal F0–F7 transport; bit 7 clear + bit 3 set → F8 gameplay.
Timing¶
Lockstep at the frame cadence: 33.39 ms (~30 Hz) between exchanges — capture-measured.