Add raw DVD reading with HL-DT-ST command (#823)

This commit is contained in:
Rebecca Wallander
2023-10-16 21:38:11 +02:00
committed by GitHub
parent a2c6b8961a
commit 1153a270a9
11 changed files with 377 additions and 26 deletions

View File

@@ -266,6 +266,13 @@ partial class Dump
pass));
}
if(scsiReader.HldtstReadRaw)
// The HL-DT-ST buffer is stored and read in 96-sector chunks. If we start to read at an LBA which is
// not modulo 96, the data will not be correctly fetched. Therefore, we begin every recovery read with
// filling the buffer at a known offset.
// TODO: This is very ugly and there probably exist a more elegant way to solve this issue.
scsiReader.ReadBlock(out _, badSector - (badSector % 96) + 1, out _, out _, out _);
sense = scsiReader.ReadBlock(out buffer, badSector, out double cmdDuration, out recoveredError,
out blankCheck);