typedef struct dvd_drive_s dvd_drive;
+typedef enum {
+ DVD_VOLUME_LOCK_OK = 0,
+ DVD_VOLUME_LOCK_UNAVAILABLE = 1,
+ DVD_VOLUME_LOCK_FAILED = -1
+} dvd_volume_lock_result;
+
typedef struct {
int sense_key;
int asc;
int ascq;
} req_sense;
+/* Snapshot of the most recently executed MMC command. This is retained even
+ * when the caller requested quiet error handling so release builds can report
+ * actionable seed/cache transport diagnostics without enabling DEBUG/VERBOSE. */
+typedef struct {
+ bool valid;
+ int transport_result;
+ int os_error;
+ int scsi_status;
+ int sense_key;
+ int asc;
+ int ascq;
+ int cdb_length;
+ u_int8_t cdb[12];
+} dvd_command_diagnostic;
+
typedef enum {
DVD_DATA_NONE = 0,
int dvd_read_streaming (dvd_drive *dvd, u_int32_t sector, u_int32_t sectors, req_sense *sense, u_int8_t *extbuf, size_t extbufsize);
int dvd_flush_cache_READ12 (dvd_drive *dvd, u_int32_t sector, req_sense *sense);
int dvd_start_stop_unit (dvd_drive *dvd, bool start, bool load_eject, req_sense *sense);
+int dvd_set_door_lock (dvd_drive *dvd, bool locked);
int dvd_stop_unit (dvd_drive *dvd, bool start, req_sense *sense);
int dvd_media_cycle (dvd_drive *dvd, req_sense *sense);
int dvd_wait_ready (dvd_drive *dvd, unsigned int timeout_ms);
int dvd_xbox_vendor_lock (dvd_drive *dvd);
int dvd_xbox_vendor_unlock_wxripper (dvd_drive *dvd, u_int32_t *unlocked_sectors);
int dvd_xbox_vendor_set_error_skip (dvd_drive *dvd, bool enabled);
-int dvd_xbox_recovery_kick (dvd_drive *dvd, bool auth_recovery);
+int dvd_xbox_prepare_game_view (dvd_drive *dvd, u_int32_t *sectors, u_int32_t *sector_size);
int dvd_refresh_volume (dvd_drive *dvd);
int dvd_lock_volume (dvd_drive *dvd);
int dvd_xbox_refresh_volume (dvd_drive *dvd);
typedef int (*dvd_drive_memdump_func) (dvd_drive *dvd, u_int32_t block_off, u_int32_t block_len, u_int32_t block_size, u_int8_t *buf);
void dvd_init_command (mmc_command *mmc, u_int8_t *buf, int len, req_sense *sense);
int dvd_execute_cmd (dvd_drive *dvd, mmc_command *mmc, bool ignore_errors);
+bool dvd_get_last_command_diagnostic (dvd_drive *dvd, dvd_command_diagnostic *out);
#endif