public DiscStream(ODD odd) { _cdb = ODD.CDB; _odd = odd; byte[] picData = new byte[0x73]; byte[] data1 = new byte[0x10]; byte[] data2 = new byte[0x10]; if (_cdb.DoReadPICZone(picData) != CDB.IoResult.OK) { throw new BadReadException("Can't read PIC data"); } PicData = picData; // Establish the session with the DVD drive if (odd.EstablishSessionKeys(0, ODD.Key1, ODD.Key2) == false) { throw new AuthenticationException("Can't authenticate with the drive for D1/D2 extraction."); } if (odd.GetData(data1, data2) == false) { throw new AuthenticationException("Can't extract D1/D2 values"); } if (odd.EstablishSessionKeys(1, _odd.FixedKey30, _odd.FixedKey31) == false) { throw new AuthenticationException("Can't authenticate with the drive for data extraction."); } Data1 = data1; Data2 = data2; uint NumSectors = odd.GetNumSectors(); _length = NumSectors * Utilities.SectorSize; _cdb.DoSetCDROMSpeed(0xFFFF); }