# FriiDump 0.5.3.10 state-aware GDR-8050L handshake cleanup

## Decision

The unconditional pre-metadata `unlock -> tray cycle -> unlock` sequence is no
longer justified. Live dumping proves that the GDR-8050L handshake can expose
the game view from the locked/video state without a preceding media change.

## Implemented flow

1. Ensure the drive is ready.
2. Read entry READ CAPACITY(10).
3. If the visible sector count already represents the game view, reuse it.
4. Otherwise issue one direct full handshake and verify READ CAPACITY(10).
5. Only if verification fails, perform one tray-cycle recovery and retry once.
6. Read title/XDVDFS/media metadata.
7. Perform the existing intentional tray cycle to restore the locked/video view.
8. Dump VIDEO-L0 and capture VIDEO-L1.
9. Issue one full handshake and dump the game/XDVDFS range.
10. Return evidence to FriiDump, verify against the Xbox DAT, and issue one final
    STOP UNIT.

## Expected normal sequence

Cold locked/video entry:

```text
handshake -> metadata -> tray cycle -> video -> handshake -> game
```

Already-unlocked entry:

```text
metadata -> tray cycle -> video -> handshake -> game
```

Recovery sequence (only after direct handshake verification fails):

```text
direct handshake failed -> tray cycle -> handshake retry
```

## Metadata correction

The XDVD sidecar now records that authentication/unlock acceptance does not
require a media transition. A media transition is still required to restore the
locked/video view before capturing the visible video ranges.

## Live baseline used

FriiDump 0.5.3.9 completed Red Faction II as a 3,820,880-sector reconstructed
XGD1 image, finalized CRC32/MD5/SHA-1/SHA-256 evidence, wrote media/XDVD/PFI/DMI
artifacts and an atomic schema-2 Redump report, and issued one final STOP UNIT.
The trace showed three complete handshakes and two tray cycles; this update
removes the redundant pre-metadata handshake/tray pair while retaining recovery.

## Safety boundary

No firmware write, flash, erase, vendor-memory write, 3B06, 3B07, or FLASHUP
operation was added or changed.
