diff --git a/crates/sylpheed-formats/examples/idxd_tokens.rs b/crates/sylpheed-formats/examples/idxd_tokens.rs index 96be88b..4cde36c 100644 --- a/crates/sylpheed-formats/examples/idxd_tokens.rs +++ b/crates/sylpheed-formats/examples/idxd_tokens.rs @@ -57,7 +57,13 @@ fn main() { let Ok(bytes) = pak.read(entry) else { continue }; let Ok(obj) = IdxdObject::parse(&bytes) else { continue }; let toks = obj.tokens(); - if !toks.iter().any(|t| t.starts_with("Weapon_")) { + // Only entries that actually declare one of the requested sub-record + // types (the pool-start heuristic can prefix one stray byte, so match a + // short suffix rather than equality -- same rule as the splitter below). + if !toks + .iter() + .any(|t| types.iter().any(|ty| t == ty || (t.ends_with(ty.as_str()) && t.len() <= ty.len() + 2))) + { continue; } diff --git a/tools/re-capture/gmem.py b/tools/re-capture/gmem.py index f62a7ee..c00b920 100644 --- a/tools/re-capture/gmem.py +++ b/tools/re-capture/gmem.py @@ -61,6 +61,12 @@ def primary_va(off): def mem_path(): + # A snapshot (`cp --sparse=always /dev/shm/xenia_memory_* snap.bin`, ~2 s) + # reads identically and does not contend with the running emulator, which + # pegs every core under lavapipe. Point $GMEM_FILE at one to work offline. + env = os.environ.get("GMEM_FILE") + if env: + return env if len(sys.argv) > 1 and sys.argv[1].startswith("/dev/shm/"): return sys.argv.pop(1) cands = [f"/dev/shm/{n}" for n in os.listdir("/dev/shm") if n.startswith("xenia_memory_")]