chore: retire the last dead paths and names from the consolidation
Nothing here changes what a tool computes; it changes where tools look. - tools/re-capture: 33 censuses globbed /work/sylph_extract, a path that has existed nowhere since /work became a clone, so they matched nothing and printed empty results. They now resolve the disc through a new disc.py from $SYLPHEED_DISC and exit loudly without it (the #44 fix, generalised). Nine scripts that imported siblings from the retired Reborn checkout or an old session scratchpad now import from their own directory. unitgroup.py only needs the variable when --pak is not given. - sylpheed-xex: the loader only ever uses the XEX2 retail key. The dead devkit key and a doc comment claiming a devkit fallback that does not exist are gone; Project Sylpheed is a retail XEX2, so no XEX1 key either. - sylpheed-viewer: real_font_rasterizes looked for /tmp/sylph_extract and so always skipped. It reads $SYLPHEED_DISC now, and passes against the disc. - Comments and docs that named xenia-rs, the Reborn repository or /work/*.pe as places to look now name sylpheed.db, Canary's ppc_context.h and the flat .pe; docs/re/README.md no longer says the native Canary build does not run. Historical records keep their original paths: findings that were measured against /work/xenia-rs/sylpheed.db still say so. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
//! or a mis-decode in our tables.
|
||||
//!
|
||||
//! ```text
|
||||
//! cargo run --release -p xenia-cpu --example decode_table_check -- <table.txt>
|
||||
//! cargo run --release -p sylpheed-ppc --example decode_table_check -- <table.txt>
|
||||
//! ```
|
||||
//! where each line is `0xWORD name`.
|
||||
use std::io::BufRead;
|
||||
|
||||
@@ -5542,12 +5542,16 @@ mod font_sample_tests {
|
||||
/// panicking (regression for the egui `set_fonts` crash).
|
||||
#[test]
|
||||
fn real_font_rasterizes() {
|
||||
let pak = Path::new("/tmp/sylph_extract/dat/movie/eng.pak");
|
||||
let Some(disc) = std::env::var_os("SYLPHEED_DISC") else {
|
||||
eprintln!("SKIP: SYLPHEED_DISC not set");
|
||||
return;
|
||||
};
|
||||
let pak = Path::new(&disc).join("dat/movie/eng.pak");
|
||||
if !pak.exists() {
|
||||
eprintln!("SKIP: extract not present");
|
||||
eprintln!("SKIP: {} not present", pak.display());
|
||||
return;
|
||||
}
|
||||
let arc = sylpheed_formats::PakArchive::open(pak).unwrap();
|
||||
let arc = sylpheed_formats::PakArchive::open(&pak).unwrap();
|
||||
let bytes = arc.read_by_hash(0x5cd0_fca6).unwrap().unwrap();
|
||||
assert!(sylpheed_formats::font::is_font(&bytes));
|
||||
let img = render_font_sample(&bytes, "The quick brown fox 0123", 34.0)
|
||||
|
||||
@@ -32,7 +32,7 @@ pub struct Xex2SecurityInfo {
|
||||
pub load_address: u32,
|
||||
pub export_table_address: u32,
|
||||
pub image_flags: u32,
|
||||
/// Encrypted session key (decrypted with retail/devkit key to get actual session key).
|
||||
/// Encrypted session key (decrypted with the retail key to get the actual session key).
|
||||
pub aes_key: [u8; 16],
|
||||
pub page_descriptors: Vec<Xex2PageDescriptor>,
|
||||
}
|
||||
|
||||
@@ -493,14 +493,13 @@ fn load_basic_compressed(source: &[u8], info: &FileFormatInfo) -> io::Result<Vec
|
||||
}
|
||||
|
||||
/// Xbox 360 retail AES key for XEX2 session key decryption.
|
||||
///
|
||||
/// The only key this loader needs: Project Sylpheed ships as a retail XEX2. The
|
||||
/// devkit (all-zero) and XEX1 keys that other loaders try are deliberately absent.
|
||||
const XEX2_RETAIL_KEY: [u8; 16] = [
|
||||
0x20, 0xB1, 0x85, 0xA5, 0x9D, 0x28, 0xFD, 0xC3, 0x40, 0x58, 0x3F, 0xBB, 0x08, 0x96, 0xBF, 0x91,
|
||||
];
|
||||
|
||||
/// Xbox 360 devkit AES key (all zeros).
|
||||
#[allow(dead_code)]
|
||||
const XEX2_DEVKIT_KEY: [u8; 16] = [0u8; 16];
|
||||
|
||||
/// AES-128-CBC decryption with zero IV (matching Xbox 360 XEX decryption).
|
||||
#[tracing::instrument(skip_all, fields(bytes = input.len()))]
|
||||
fn aes_decrypt_cbc(key: &[u8; 16], input: &[u8]) -> Vec<u8> {
|
||||
@@ -528,7 +527,6 @@ fn aes_decrypt_cbc(key: &[u8; 16], input: &[u8]) -> Vec<u8> {
|
||||
}
|
||||
|
||||
/// Derive the session key by decrypting the XEX's aes_key field with the retail key.
|
||||
/// Falls back to devkit key if retail produces invalid results.
|
||||
fn derive_session_key(header: &Xex2Header) -> [u8; 16] {
|
||||
let sec = match &header.security_info {
|
||||
Some(s) => s,
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
//! Analysis-side goldens: every row in the xenia-cpu fixtures must
|
||||
//! Analysis-side goldens: every row in the sylpheed-ppc fixtures must
|
||||
//! round-trip cleanly through the [`sylpheed_xexdb::ppc`] shim. This
|
||||
//! pins the shim's behaviour to the canonical `sylpheed_ppc::disasm::format`
|
||||
//! output so that any future refactor of the shim layer surfaces here.
|
||||
//!
|
||||
//! Loads the same JSON fixtures committed under
|
||||
//! `crates/xenia-cpu/tests/golden/`. No separate analysis-side fixture
|
||||
//! `crates/sylpheed-ppc/tests/golden/`. No separate analysis-side fixture
|
||||
//! files — the cpu canon is the source of truth.
|
||||
|
||||
use std::path::PathBuf;
|
||||
|
||||
Reference in New Issue
Block a user