Prefer verified RSC8 wave names for audio streams #217

Closed
github-bot wants to merge 1 commit from gh-pr/217/head into gh-pr/217/base
Owner

@⁠kaoru-maki on GitHub · 2026-11-24 22:32 UTC · original
kaoru-maki:rsc8-stream-names → master · +196 −20 · 4 files · 1 commits · closed without merging

Why

The stream-name search in #214 reproduces 17,335 proposals in 1,364 audio.rpf banks. It overlaps 9,999 of the 409,881 stream addresses with a validated embedded RSC8 spelling. Reading the tag therefore adds 399,882 named addresses in that archive alone. The comparison in #208 also found different spellings with the same full hash, so the embedded spelling matters even when the heuristic happens to recover the full hash.

The full #214 comparison across four archives found 11,405 exact embedded spellings and 2,577 spelling disagreements on compatible tags. In audio.rpf alone, 301 proposals matched only the low 29 bits and another 825 had the same full hash as a different embedded spelling. These counts come from rereading the original tag bytes.

This is an independent companion implementation for the maintainer's RSC8 follow-up. The code and synthetic regression tests are available for reuse. Discussion in #208

Change

  • Read inline and pointer-backed wave names from the 0x5C lip-sync chunk during the existing ADAT scan. Accept a name when its full JOAAT equals the RSC8 dictionary hash and its low 29 bits equal the enclosing AWC stream ID.
  • Cache the accepted name by stream position in its bank. The CLI and GUI prefer that name and use the existing heuristic for every stream without a compatible tag.
  • Existing indexes still load with their current fallback names. Rescan to populate the native names.

Validation

  • cargo test --locked --release -p sixng-core --no-default-features (210 passed, one existing ignored). The synthetic tests cover both hash checks, an out-of-range name pointer, index round-tripping, and fallback on a second stream with the same ID.
  • cargo build --locked --release -p sixng-cli --no-default-features and cargo check --locked -p sixng-gui.
  • The CLI rescan on the minigame archive recovered all 1,957 independently validated RSC8 addresses. It replaced 13 previous suggestions while preserving stream counts, codecs and duration. The same 13 fallbacks remained readable on the old index.
**@⁠kaoru-maki** on GitHub · 2026-11-24 22:32 UTC · [original](https://github.com/holdmysocks/SixNG/pull/217) `kaoru-maki:rsc8-stream-names` → `master` · +196 −20 · 4 files · 1 commits · closed without merging ## Why The stream-name search in #214 reproduces 17,335 proposals in 1,364 `audio.rpf` banks. It overlaps 9,999 of the 409,881 stream addresses with a validated embedded RSC8 spelling. Reading the tag therefore adds 399,882 named addresses in that archive alone. The comparison in #208 also found different spellings with the same full hash, so the embedded spelling matters even when the heuristic happens to recover the full hash. The full #214 comparison across four archives found 11,405 exact embedded spellings and 2,577 spelling disagreements on compatible tags. In `audio.rpf` alone, 301 proposals matched only the low 29 bits and another 825 had the same full hash as a different embedded spelling. These counts come from rereading the original tag bytes. This is an independent companion implementation for the maintainer's RSC8 follow-up. The code and synthetic regression tests are available for reuse. [Discussion in #208](https://git.gtahub.st/github/holdmysocks--SixNG/pulls/208) ## Change - Read inline and pointer-backed wave names from the `0x5C` lip-sync chunk during the existing ADAT scan. Accept a name when its full JOAAT equals the RSC8 dictionary hash and its low 29 bits equal the enclosing AWC stream ID. - Cache the accepted name by stream position in its bank. The CLI and GUI prefer that name and use the existing heuristic for every stream without a compatible tag. - Existing indexes still load with their current fallback names. Rescan to populate the native names. ## Validation - `cargo test --locked --release -p sixng-core --no-default-features` (210 passed, one existing ignored). The synthetic tests cover both hash checks, an out-of-range name pointer, index round-tripping, and fallback on a second stream with the same ID. - `cargo build --locked --release -p sixng-cli --no-default-features` and `cargo check --locked -p sixng-gui`. - The CLI rescan on the minigame archive recovered all 1,957 independently validated RSC8 addresses. It replaced 13 previous suggestions while preserving stream counts, codecs and duration. The same 13 fallbacks remained readable on the old index.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 20:18:59 +00:00
github-bot closed this pull request 2026-11-26 20:18:59 +00:00
Author
Owner

@⁠holdmysocks on GitHub · 2026-11-24 23:04 UTC · original

Thank you for this, and for the careful census behind it. We compared it with #219 on audio.rpf: both find the same 409,881 stored names in 874 banks, and #219 also carries the fix for the searched names and the index / name source / hash output you suggested, so we're going ahead with #219 and closing this one.

Your stricter reading of the resource root and keying names by stream index are noted as a likely follow-up if other archives such as story000.rpf need them.

**@⁠holdmysocks** on GitHub · 2026-11-24 23:04 UTC · [original](https://github.com/holdmysocks/SixNG/pull/217#issuecomment-7146989714) Thank you for this, and for the careful census behind it. We compared it with #219 on `audio.rpf`: both find the same 409,881 stored names in 874 banks, and #219 also carries the fix for the searched names and the index / name source / hash output you suggested, so we're going ahead with #219 and closing this one. Your stricter reading of the resource root and keying names by stream index are noted as a likely follow-up if other archives such as `story000.rpf` need them.

Pull request closed

This discussion has been locked. Commenting is limited to contributors.
No description provided.