diff --git a/CHANGELOG.md b/CHANGELOG.md index 8e6feef..f530220 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +## Unreleased + +### Maintenance + +- `pioneer-optical` 0.10 (the 0.7 line is yanked). The vendor CDB bytes are unchanged, and a test pins them. + ## [1.8.0] — 2026-10-05 ### Changed diff --git a/Cargo.lock b/Cargo.lock index 1641084..0fb2acd 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -104,7 +104,7 @@ dependencies = [ [[package]] name = "freemkv-unlock" -version = "1.7.7" +version = "1.8.0" dependencies = [ "aes", "base64", @@ -210,9 +210,9 @@ checksum = "a89322df9ebe1c1578d689c92318e070967d1042b512afbe49518723f4e6d5cd" [[package]] name = "pioneer-optical" -version = "0.7.2" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48a5bdb9e9a07422ceb5133d227fbe4ecce77060007e5a9bac0dda3d82d72911" +checksum = "bf5074a27cc39fb664d0b994814ffe8530e3e8590aff0d104723332dbcb1abc4" [[package]] name = "proc-macro2" @@ -411,18 +411,6 @@ version = "1.0.23" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "29666d0abbfad1e3dc4dcf6144730dd3a3ab225bbbdac83319345b1b44ccfc1b" -[[patch.unused]] -name = "freemkv-engine" -version = "1.7.7" - -[[patch.unused]] -name = "freemkv-i18n" -version = "1.7.7" - -[[patch.unused]] -name = "freemkv-keysources" -version = "1.7.7" - [[patch.unused]] name = "libfreemkv" version = "1.7.7" diff --git a/Cargo.toml b/Cargo.toml index abf3f92..2066610 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -31,7 +31,7 @@ rand = "0.10" # the redacting Debug impls). `derive` gives ZeroizeOnDrop for the key structs. zeroize = { version = "1", features = ["derive"] } # Pioneer/Renesas vendor CDB constructors (identity read, gated memory read, knock). -pioneer-optical = "0.7" +pioneer-optical = "0.10" [lints.clippy] uninlined_format_args = "allow" diff --git a/src/renesas/mod.rs b/src/renesas/mod.rs index 3dc9955..00acbe3 100644 --- a/src/renesas/mod.rs +++ b/src/renesas/mod.rs @@ -10,7 +10,7 @@ use crate::scsi::{DataDirection, ScsiTransport, is_dead_bus}; use crate::{UnlockCtx, UnlockError, Unlocked, Unlocker}; /// The Renesas vendor identity block length (READ_BUFFER 0x02/0xF1). -const RB_F1_LEN: usize = pioneer_optical::IDENTITY_LEN as usize; +const RB_F1_LEN: usize = pioneer_optical::IDENTITY_LEN; /// The ASCII interface marker a Renesas controller returns at `[16..19]`. const RENESAS_MARKER: &[u8] = b"SAT"; const RENESAS_MARKER_OFFSET: usize = 16; @@ -26,7 +26,7 @@ const RENESAS_MARKER_OFFSET: usize = 16; /// `Err(Transport)` on a dead bus. pub fn is_renesas(scsi: &mut dyn ScsiTransport) -> std::result::Result { let mut buf = [0u8; RB_F1_LEN]; - let cdb = pioneer_optical::vendor_identity(); + let cdb = pioneer_optical::cdb::vendor_identity(); match scsi.execute(&cdb, DataDirection::FromDevice, &mut buf, 5_000) { Ok(r) => { let end = RENESAS_MARKER_OFFSET + RENESAS_MARKER.len(); @@ -73,13 +73,16 @@ impl Renesas { // knock + second read (B). fn vendor_open(scsi: &mut dyn ScsiTransport) -> std::result::Result { // A: primary open read. - if read_is_good(scsi, &pioneer_optical::read_memory(0x04, OPEN_READ_LEN))? { + if read_is_good( + scsi, + &pioneer_optical::cdb::read_memory(0x04, OPEN_READ_LEN), + )? { return Ok(true); } // B: MakeMKV's fallback — knock, then the second-window read. The knock is // fire-and-forget (payload-less); its own status is not the signal. match scsi.execute( - &pioneer_optical::knock(), + &pioneer_optical::cdb::knock(), DataDirection::None, &mut [], 5_000, @@ -90,7 +93,7 @@ impl Renesas { } read_is_good( scsi, - &pioneer_optical::read_memory(0x50_0000, OPEN_READ_LEN), + &pioneer_optical::cdb::read_memory(0x50_0000, OPEN_READ_LEN), ) } } @@ -164,6 +167,23 @@ mod tests { use crate::DiscKind; use crate::scsi::{DataDirection, Result, ScsiError, ScsiResult, ScsiTransport}; + #[test] + fn vendor_cdbs_are_the_wire_bytes() { + assert_eq!( + pioneer_optical::cdb::vendor_identity(), + [0x3C, 0x02, 0xF1, 0, 0, 0, 0, 0, 0x30, 0] + ); + assert_eq!( + pioneer_optical::cdb::read_memory(0x50_0000, 0x10), + [0x3C, 0x02, 0xB0, 0x50, 0, 0, 0, 0, 0x10, 0] + ); + assert_eq!( + pioneer_optical::cdb::knock(), + [0x3B, 0x02, 0x41, 0xA5, 0xAA, 0xAA, 0, 0, 0, 0] + ); + assert_eq!(RB_F1_LEN, 48); + } + /// Serves a fixed READ_BUFFER payload (Renesas-like) with a Good status. struct RenesasTransport { payload: Vec,