Skip to content

GTA VI, maps in 3D and videos - #144

Merged
Two-Play merged 35 commits into
developfrom
claude/gta6-rpf9
Nov 24, 2026
Merged

Two-Play merged 35 commits into
developfrom
claude/gta6-rpf9

Conversation

@Two-Play

@Two-Play Two-Play commented Nov 23, 2026 •

Copy link
Copy Markdown
Owner

GTA VI (read-only preview), maps and videos.

  • Archives: RPF9 with the table of contents, nested archives and names, read with the keys in the user's own executable; a recovery view without it. Full-text index, with progress and a stop button.
  • Formats: models with skeletons and materials, clip dictionaries on vehicles, props and parts of people, texture pools and dictionaries, collisions, navigation meshes, metadata and maps as XML, game text, audio.
  • Map in 3D: the whole world with the game's levels of detail around a flying camera; sky, sea, time of day.
  • Videos: Bink 1 and 2 decoders and a player window, for GTA IV, V, RDR2 and VI.
  • Viewer: normal and specular maps, decals, mipmaps, up to 1024 bones, orbit on a circle, the wheel sets the flying speed.
  • Website: a GTA VI page. Version 0.6.0.

🤖 Generated with Claude Code

Two-Play and others added 2 commits November 23, 2026 02:07
GTA VI's archives (RPF9) have an encrypted table of contents, and the keys
are only in the game's program. What is not encrypted is read without it:

- RPF9 as a recovery view: the data area is scanned once for zlib streams,
  Bink 2 videos and audio containers; files are named by their offset and
  sorted into folders by what they start with. The index is stored per
  archive and made in the background when the game is opened.
- A folder with GTA VI's archives counts as a game without a program and
  without keys. The setup says Open instead of Derive keys and can always
  be left.
- Audio: GTA VI's containers (two more tables, Opus instead of Vorbis),
  sounds and multi-channel streams, decoded with opus-rs.
- Metadata: PSIN with an LSCH schema and the RBF0 variant with 8-byte
  numbers, both as XML. Tables of zero-ended strings open as text.
- Textures: the texture pools (.ttpf) open as folders of 64 textures;
  2D textures, arrays and cube maps, with BCPack for BC1, BC3, BC4 and BC5.
  `openrage ttpf` counts and exports a pool.
- Models: drawables, fragments and drawable dictionaries open in the
  viewer, listed by their own names under models/, with the base colour
  texture of their materials from the texture pools.

Not read: BCPack for BC6H and BC7, volume textures, skeletons and
skinning, Bink 2 video (no free decoder), and everything that needs names
from the table of contents.

Format knowledge and its sources are in NOTICE.md (Leonida, rpf9-explorer,
Microsoft's silicon-rans tables).

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
One conflict, in the CLI's early commands: `ttpf` from this branch and the
new `rebuild` check of `rpf8` from develop both stay.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Two-Play and others added 27 commits November 24, 2026 03:29
Adds the native RPF9 reader that decodes the encrypted table of contents,
using cipher material read from the user's own game_scarlett_master.exe
(nothing is bundled; an unknown build is rejected by its SHA-256):

- rpf9_cipher: the Scarlett build's table-driven 16-byte block transform
  (not standard AES, which is why it resisted key scanning), CBC for the
  header and AES-CTR (algorithm 17) for members. Key schedules and tables
  are read from the executable by selector.
- rpf9_index: parses the decoded header into validated native tables and
  entries (slot, offset, sizes, type, name hashes, storage).
- rpf9_names: the native 32-bit Jenkins and 64-bit Murmur name-hash leaves,
  path-candidate collection, and the static extension<->type mapping.
- rpf9_native: finds the executable beside the archive, builds the cipher
  once, decodes the header (selector 9: two chained metadata spans), and
  parses the catalog.

Verified against the local 1.0.2.1 Xbox archives: the header decrypts and
the catalogs parse with the exact declared entry counts (common 418,
data 699, audio 103), matching the clear-header fields.

Not yet wired into the browse/extract path (the modules are staged behind
allow(dead_code)); reading member payloads (chunked/CTR), the Rpf9/GUI
integration and wider name recovery follow. The clear header now also
exposes its declared slot count and transform selector, and the CLI/GUI
recognize the executable for GTA VI.

The cipher, index, name and documentation modules were reconstructed from
the executable by a contributor; this commit fixes the missing
extension-for-type mapping, resolves lints, and adds the decryption
verification.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Members are decoded from their chunk, encryption and resource records;
nested archives open like folders. Names come from strings in the
executable and the game's metadata, checked against the table's hashes.
Also regenerates the third-party licence files.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Models, clip dictionaries and some other types hold their own name, which
is checked against the hash in the archive's table. Opened tables are kept.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…nd play at once

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…rea; GTA VI texture sheets and icons

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Native RPF9 archives and those nested in them are indexed in parts, in
parallel and cancellable; metadata (#mt) as XML, language files (#ldbmt) as
label hash and text. Searches find names that are only known as hashes, text
hits have room beside names, words with punctuation match, paths are found,
and results of every game show their matching line.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Pure Rust decoder for .bk2 (KB2g to KB2n) with alpha and sound, ported from
Librempeg (GPL-3.0-or-later). openrage media exports frames as PNG and sound
as WAV; the GUI preview shows the first frame and plays, pauses and seeks.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Reads .#cd files: clips with their layers joined, all channel kinds the
game uses (with the new eight-lane packed floats), tracks by name hash.
Skeletons and byte-indexed skinning of GTA VI models; clips and
verify --animations on the command line, clip list in the GUI.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
# Conflicts:
#	crates/rage-formats/src/lib.rs
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ws, limits for damaged files

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… the index

Bink 1 (revisions f to k) is decoded, so the videos of GTA IV and V play like
those of RDR2 and GTA VI; RDR2's have no names and are told by their content.
A double click opens a video in a window of its own with volume, repeat and
full screen. Sounds are played without a copy in memory, and the picture of a
long video is there before its sound is read.

The status bar shows how far the search index is and can stop it and go on.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A model lists the hashes of its bones' names. Parts name those of a base
skeleton in metaped_fragments.rpf, so clips play on them; bones of garments
and hair hang from the body. Bone numbers of 32 bits are read too.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A map file is shown with what lies around it, and the whole world from afar;
models of dictionaries are found by the hash of their name. Models show their
normal and specular maps (GTA V Enhanced too) and can have up to 1024 bones.

Files without a name are named after those of other archives once the index
is built (155,000 of them), and more metadata opens as XML. Loading the keys
or the skeletons from a worker thread could wait for itself; no longer.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… circle

The whole map of GTA VI shows the level of detail that fits where the camera
is, after the tree in the map files. Maps and cutscenes get a flying camera;
the wheel sets its speed, in model views too. Orbiting no longer shifts the
camera with the angle, which felt like an ellipse. Depth is reversed, so that
scenes of kilometres do not flicker.

Files listed before their name was learned are still found.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Two-Play and others added 5 commits November 24, 2026 17:47
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Placements of a model are drawn together, a model has one buffer, and only
what changes is set between draws. Textures have smaller copies for the
distance, new models are uploaded by the loading thread, and what is smaller
than a pixel is left out. Pictures of scenes are at most Full HD.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Textures go to the graphics card compressed as the game has them and are
shared between models; near the camera they are read in full size. Decals
are blended, layered grounds mixed and shaded by what GTA VI stores per
vertex. There is a sea with waves, and beside the map settings for the time
of day, haze, sea, field of view and detail.

Models share buffers, vertices are half as large, the list of what to draw is
made in parallel, and a moving view does not wait for the graphics card.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Two-Play Two-Play changed the title GTA VI: archives, audio, metadata, textures and models GTA VI, maps in 3D and videos Nov 24, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Two-Play
Two-Play merged commit ae28791 into develop Nov 24, 2026
6 checks passed
@Two-Play Two-Play mentioned this pull request Nov 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant