# v131 persistent session baseline

v131 promotes the v130 D108 hardware data-phase model from diagnostic to the default persistent-session baseline.

## What this proves

The firmware is booted once, the command queue is fed without resetting CPU/RAM between commands, and the verifier checks each DATA IN / DATA OUT stream against the expected command payload.

For the captured GDR-8050L unlock log, the expected result is:

```text
commands_expected=10
commands_armed=10
timer_done_events=10
commands_completed=10
exact_complete_session=true
```

## Default unlock-log run

```powershell
.\run_gdr8050l_auth_packet_v131_persistent_session_baseline.cmd "D:\vscode-workspace\xbox-dvd-tools-v2\disc_dumps\Red Faction II[TQ00501A].xdvd.json" "D:\vscode-workspace\xbox-dvd-tools-v2\disc_dumps\Red Faction II[TQ00501A].iso" --log "D:\vscode-workspace\xbox-dvd-tools-v2\disc_dumps\Red Faction II[TQ00501A].log"
```

## Generic command queue mode

`--command-json` accepts either a list or an object with a `commands` list. Each command uses the same internal schema as the generated config:

```json
{
  "commands": [
    {
      "tag": "locked_read_capacity",
      "direction": "in",
      "cdb_hex": "25 00 00 00 00 00 00 00 00 00",
      "data_in_hex": "00 00 1B 4F 00 00 08 00"
    },
    {
      "tag": "mode_select_challenge",
      "direction": "out",
      "cdb_hex": "55 00 00 00 00 00 00 00 1C 00",
      "data_out_hex": "00 1A 00 00 00 00 00 00 3E 12 00 01 00 D1 01 6B A2 E7 C8 ED 00 00 00 00 00 00 00 00"
    }
  ]
}
```

Example:

```powershell
.\run_gdr8050l_auth_packet_v131_persistent_session_baseline.cmd "D:\path\disc.xdvd.json" "D:\path\disc.iso" --command-json "D:\path\commands.json" --stem custom_v131_session
```

## Logging policy

Default output is quiet: no live instruction log and only minimal watchpoints needed for verification. Use these only when needed:

```text
--debug-trace         add detailed hardware/session watchpoints and breakpoints
--debug-instructions  live per-instruction log; very slow
--verbose-commands    print each queued command
```

## Regression flag

`--no-d108-hw-data-phase` disables the D108 hardware data-phase completion model. It should reproduce the incomplete v129/v130-negative behavior and is useful as an A/B check only.
