Exemplo n.º 1
0
        /*****************************************************
        *****************************************************/
        public bool WritePBlock()
        {
            byte[] B2 = new byte[0x60];

            byte[] p_block =
            {
                0xC9, 0x4B, 0x96, 0x28, 0xE5, 0x40, 0x90, 0x85, 0x36, 0x0F, 0x4A, 0x36, 0x32, 0x57, 0xCD, 0xAD,
                0x81, 0x1C, 0x51, 0x3A, 0xDD, 0x57, 0x73, 0x72, 0x39, 0x7D, 0x5D, 0xCE, 0xF4, 0x6E, 0xB3, 0x22,
                0x75, 0xF3, 0x7D, 0xD1, 0x49, 0xA3, 0x7B, 0xE7, 0xAD, 0x53, 0x60, 0x6F, 0x49, 0x1E, 0xA0, 0xAC,
                0x04, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFD, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
                0xA5, 0x59, 0x12, 0xBD, 0x21, 0xAF, 0x6F, 0x55, 0xD1, 0x49, 0x32, 0xFF, 0xC0, 0x48, 0xBF, 0x9C
            };

            byte[] UnlockB2 = { 0x00, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
                                0x2D, 0x06, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00 };

            CDB.DoStartStop();

            /* P Block */
            if (CDB.DoModeSelect(UnlockB2) != CDB.IoResult.OK)
            {
                return(false);
            }
            if (CDB.DoWriteBuffer(5, 2, p_block) != CDB.IoResult.OK)
            {
                return(false);
            }
            if (CDB.DoReadBuffer(2, B2) != CDB.IoResult.OK)
            {
                return(false);
            }
            return(true);
        }
Exemplo n.º 2
0
        public static ODD getODD(string dl)
        {
            driveLetter = dl;

            CDB = new CDB();
            if (!CDB.Open(driveLetter))
            {
                Trace.WriteLine(string.Format("Open drive {0} failed", driveLetter));
                return(null);
            }
            return(TestCDB(CDB));
        }
Exemplo n.º 3
0
        /*************************************************************
        *************************************************************/

        public static ODD getODD(UsbDevice device)
        {
            driveLetter = device.Device;

            CDB = new CDB();
            if (!CDB.Open(device))
            {
                Trace.WriteLine(string.Format("Open drive '{0}' failed", driveLetter));
                return(null);
            }
            return(TestCDB(CDB));
        }
Exemplo n.º 4
0
        private static ODD TestCDB(CDB cdb)
        {
            theInquiryResponse = new byte[0x3C];
            if (CDB.DoInquiry(theInquiryResponse) != CDB.IoResult.OK)
            {
                Trace.WriteLine(string.Format("INQ on drive {0} failed", driveLetter));
                CDB.Close();
                return(null);
            }
            string IStr = Encoding.ASCII.GetString(theInquiryResponse, 0x08, 0x1C);
            ODD    odd  = PS3_Drive.Parse(driveLetter, IStr);

            if (odd != null)
            {
                return(odd);
            }
            Interaction.Instance.ReportMessage(string.Format("Drive {0} is NOT a PS3 drive", driveLetter), ReportType.Warning);
            CDB.Close();
            return(null);
        }
Exemplo n.º 5
0
 /*****************************************************
 *****************************************************/
 public void Eject()
 {
     CDB.DoStartStop();
 }