# PT2 Copy State Machine

This is a focused reference for the COPY behavior seen on the RCP LCD and traced in the ROM.

## Known Entry Points

### Serial Start / Progress

Frame:

```text
05 00 6D 00 00 32
```

ROM path:

- Command 5 accepts selector `0x006D` at `BD80-BDBF`.
- The selector is queued through `BE70`.
- Selector `0x006D` dispatches to `H'3015`.

Observed effects from forced decode:

- Sets `F731.7`.
- Sets `F795.6/F795.7`.
- Loads `F798=H'C8`.
- Sets display selector `F732=H'1903`.
- Sets `FB02=H'64`.
- Calls the display/report bridge at `48FA`.
- Sets `F76E.6`.

LCD dispatch:

- `F732` high byte `0x19` selects `493E[0x19] -> H'930A`.
- The local table at `H'931C` maps substate `0x03` to `H'9F6A`.
- `H'9F6A` builds `COPY` / `IN PROGRESS`.

### Serial Complete / Exit

Frame:

```text
05 00 6C 00 00 33
```

ROM path:

- Command 5 accepts selector `0x006C` at `BD80-BDBF`.
- The selector is queued through `BE70`.
- Selector `0x006C` dispatches to `H'2FAF`.

Observed effects from forced decode:

- Manipulates `F76E`, `F795`, `F797`, and `F799`.
- Can set display selector `F732=H'1904`.
- Sets `FB02=H'14`.
- Calls the display/report bridge at `48FA`.

LCD dispatch:

- `F732` high byte `0x19` selects `493E[0x19] -> H'930A`.
- The local table at `H'931C` maps substate `0x04` to `H'9FDA`.
- `H'9FDA` builds `COPY` / `COMPLETED`.

### RCP-Side Menu Start

ROM path:

- OTHERS menu page: `493E[0x01] -> H'631C`.
- Local page table: `H'632E`.
- `COPY TO SLAVES` entry handler: `H'6FF0`.

Required gates:

- The entry descriptor before `H'6FF0` requires `E400[0x0015] != 0`.
- The local COPY action branch requires `F770.2` and `F791.7`.

Local branch effects:

- Sets `F76E.6`.
- Sets `F795.7`.
- Sets `F731.7`.
- Loads `F798=H'C8`.
- Sets `F711.7`.
- Loads `F726=H'64`.
- Calls `loc_5500`.
- Displays `COPY TO SLAVES`.

If `F770.2` is set while `F791.7` is clear, the ROM diverts through `H'704C` to a `SET RCP` / `MASTER` display path instead of starting copy.

## Working State Model

| State | Likely indicators | Entry | Exit |
| --- | --- | --- | --- |
| Idle / no copy | `F731.7` clear | Boot, timeout, or completion cleanup | `0x006D` or local COPY branch |
| Copy in progress | `F731.7`, `F795.6/F795.7`, `F798` live, `F732=H'1903` | `05 00 6D 00 00 32` or local COPY branch | `0x006C` in the live window, or timer expiry |
| Copy completed | `F732=H'1904` | `05 00 6C 00 00 33` while copy flags are live | Display/session timeout or next state update |
| Timeout / not active | `F731.7` cleared by timer path | `F797` or `F798` reaches zero | Normal CONNECT recovery traffic |

## Bench Results

Observed on the real panel:

```text
006C alone                      -> CONNECT OK -> blank
006D alone                      -> CONNECT OK -> COPY IN PROGRESS -> CONNECT NOT ACT
006D -> 006C after 250 ms       -> COPY IN PROGRESS -> COPY COMPLETED
006D -> 006C after 1.0-1.5 s    -> COPY IN PROGRESS -> COPY COMPLETED
006D -> 006C after 2.0-2.5 s    -> COPY IN PROGRESS -> CONNECT NOT ACT
006D repeated, then 006C        -> COPY IN PROGRESS held longer -> COPY COMPLETED
006D repeated without 006C      -> COPY IN PROGRESS -> CONNECT NOT ACT
```

Current interpretation:

- `0x006D` is a copy-start/progress-window refresh selector.
- `0x006C` is a completion/exit selector that only behaves cleanly while the copy window is live.
- The copy window is transient and timer-controlled.
- The panel does not treat `0x006C` as a stateless "show completed" command.

## Open Questions

- What sets `F791.7` during normal CCU/RCP operation?
- What exact official PT2 name belongs to selectors `0x006C`, `0x006D`, and `0x006E`?
- Whether `0x006E` is a copy cancel/error sibling or an unrelated special selector.
- Whether the CCU sends repeated progress refreshes during a real COPY TO SLAVES operation.
