Skip to content

Latest commit

 

History

4 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

wii-talesofgraces-doc

Documentation of the retail Nintendo Wii disc of Tales of Graces (テイルズ オブ グレイセス), Namco Bandai Games / Namco Tales Studio, 10 December 2009, Japan. Game id STGJAF, one disc, one revision.

Documentation only: no game data is redistributed and nothing here is a port, a patch or a modification. Every number below is the output of a tool in tools/ whose report is committed in reports/.

This is the sixteenth build in the tales-blockcodec-doc corpus and the second on the Wii.


Highlights

The Tales block codec is on this disc. Two decoder copies in main.dol, in the 1997 shape, with the nine-byte header and its methods used directly — the Metrowerks ring clear bounded by 4,078, both synthetic preload loops, the | 0xFF00 control refill, the & 0x0FFF ring mask, the low-nibble length with its +2, and the run escape with its +19. One 4078 and one 4079 out of 1,205,688 PowerPC instruction words; every one of the eleven 4080 sites on the disc was disassembled and none is the codec's.

That answers the question the thirteenth build left open. Tales of Symphonia: Ratatosk no Kishi shipped on the same machine, from the same studio line, eighteen months earlier, and carried no codec. Its zero was the corpus's only Nintendo negative from inside the line, and it was compatible with the boundary being the Wii, the line, or that one project. It was that one project.

The strong test had a real denominator, for the first time on this pair. Both builds are Metrowerks PowerPC .dol files. 872 bytes of the 2003 GameCube decoder score 138 bytes in this executable, against 10 in Ratatosk, 12 in The Last Story, 10 in Crystal Bearers and 7 in this disc's own apploader — and the measurement is symmetric, 138 back the other way against a floor of 8. The whole-executable search that was never told where to look ranks the decoder first through eighth out of 77 shared regions, and the ninth is 107 bytes and is not the decoder.

The project tag is TO10, in nineteen distinct spellings in main.dol alone: a devkit path sim:C:/usr/TO10/data/btl/, sixteen menu-task names, a version banner TO10_chat_v0.50, and the file name of a complete Nintendo DS ROM the disc ships — plus two more as class names in the modules' symbol tables (Pad_get_press__10TO10_INPUTFlUl, Check_data_func__9TO10_SAVEFv) and a twentieth in that ROM's own banner, TO10DS. TO7 is Abyss, TO8 is Vesperia, TO9 is Hearts. The session's prediction, written before the image was opened, was 10; the half of it that predicted a second per-machine count was wrong.

It ships a Nintendo DS game inside a Wii disc. /ds/to10dsR.srl, 1,236,168 bytes, game title ToG_DS, banner TO10DS / かめにんマーチャント!, sent to a handheld by DS Download Play. Step zero applies in the middle of a Wii game: its ARM9 is BLZ-packed, and decompressed it carries zero 4078/4079/4070/4071 in either ARM encoding over 67,002 ARM immediates, 98,937 THUMB literals and 376,970 aligned words. One project, two machines, and the codec is on one of them.

It names its developer, which no build of this line in this corpus has ever done. /module/chr_moduleRR.rso carries a complete in-house tool — a Character Parts Editor [ROM Version] shipped on the retail disc — whose support block reads take_njd@namco-talesstudio.co.jp and gives two URLs on the studio's own intranet. The publisher is named twice more: in an X.509 certificate for tog-confirm.talesweb.com and in a sound-driver banner Siren14 Version 3.02 … 2009.4.9 … NAMCO BANDAI GAMES … Nu-Sound.

RTTI is on — 195 class-and-namespace strings where Ratatosk had 37, all of them the SDK's — and among them is TL, twenty-six classes of the studio's engine. The corpus knew that name from Tales of Berseria (2017) and from nowhere else. Here it is in 2009.

Since this repository was written, the corpus has opened Tales of Xillia (PlayStation 3, 2011), which carries 80 TL:: class names — one of them, TL::CCaptureTexture, identical to one of these twenty-six as an RTTI symbol — and twenty-five more that are the engine's classes with that build's project tag as a suffix. That build also shares seven of the nine TL class names Berseria publishes for 2017, and the same two container file names. So the chain 2009 → 2011 → 2017 is measured end to end, and the question this repository left Open is answered: one codebase. ps3-talesofxillia-doc.

The container is FPS4 and the packer's MSCF envelope is gone. FPS4 returns 8,064 hits and the extracted tree holds 4,832 archives; MSCF returns zero on 4.29 GB. And the codec's plaintext is FPS4: of the 1,318 blocks the census finds, 1,162 decode to an FPS4 archive — exactly as on Vesperia, where 3,086 of 3,095 top-level block streams began 0xAF F P S 4.

The bulk is CRI's. Three CPK containers hold 2.69 GB and two of them hold nothing but sixty-two more CPKs; their members are CRILAYLA-packed with the eight magic bytes overwritten with zeros, so the string CRILAYLA returns zero hits on the whole partition and a reader keyed on the magic silently reports thousands of members as an unknown format. The container states each member's plaintext length and 7,115 of 7,115 packed members reproduce it.

Six inherited tools were wrong or blind here, five of them silently and in the direction of a clean negative — including a structural probe that scored zero refills on a build whose decoder had already been disassembled. 09


Claims

# Claim Status
1 The disc is STGJAF, one disc, one revision; the DATA partition is 4,286,328,832 bytes and is handed back in plaintext by the RVZ container Verified
2 main.dol is Metrowerks CodeWarrior PowerPC, 4,832,672 bytes of text Verified
3 The Tales block codec is present: one 4078 and one 4079 in two routines out of 1,205,688 instruction words Verified
4 Both routines carry the ring clear, both synthetic preload loops, the | 0xFF00 refill, the & 0x0FFF mask, the nibble split and the +3; the second carries the +19 run escape Verified
5 All eleven 4080 sites on the disc, in six distinct routines, were disassembled and none is the codec's Verified
6 872 bytes of the 2003 GameCube decoder score 138 in this executable against a same-platform floor of 7–8 Verified
7 The measurement is symmetric and the whole-file search ranks the decoder first through eighth of 77 shared regions Verified
8 Ratatosk scores the same as two unrelated Wii titles, so it is not an intermediate step Verified
9 The build carries the string TO10 in nineteen distinct spellings in main.dol and no other TOn anywhere Verified
10 TO10 means "the tenth Tales" in the sequence TO7/TO8/TO9 Consistent
11 /ds/to10dsR.srl is a complete Nintendo DS ROM, BLZ-packed, with no codec constants in either ARM encoding Verified
12 FPS4 is the studio's container here, big-endian, 4,832 archives; MSCF returns zero Verified
13 1,318 blocks decode to their declared length, all in the psx dialect, 1,162 of them to an FPS4 archive and 10 to an iPck sound pack; 69 are method 0 and stored Verified
14 The CPK members are CRILAYLA with the magic zeroed; 7,115 of 7,115 packed members reproduce the length the container declares Verified
15 The disc names Namco Tales Studio, by its corporate domain, in chr_moduleRR.rso Verified
16 RTTI is on: 195 class-and-namespace strings, 26 of them in a TL namespace Verified
17 The 2009 TL and the 2017 TL of Berseria are one codebase Verified — via the 2011 middle: Xillia shares TL::CCaptureTexture with this build and 7 of 9 class names with Berseria, and the container FILEHEADER.TOFHDB/TLFILE.TLDAT crosses 2011→2017 by name, ps3-talesofxillia-doc
18 Which of the 2003 build's four decoder copies this one descends from Open
19 ASKA is not here: every payload magic located and read, all inside high-entropy data, and no Aska namespace among 195 RTTI names Verified
20 The .txm indexes the .txv beside it Open — the record layout was not recovered; the 2011 build verifies the same convention on 51,694 adjacent member pairs
21 TSS, SE3 and MBIN are this build's own formats Open — counted and named, not decoded

The disc

container RVZ, zstd level 19, 128 KiB chunks
image 4,699,979,776 bytes
game id STGJAF — Wii, Japan, maker AF
internal name Tales of Graces; the DATA partition header says Master
partitions UPDATE RELSAB 205,891,584 · DATA STGJAF 4,286,328,832
apploader 2009/06/22
file system 40 files, 6 directories, 4,040,032,865 bytes
main.dol 6,381,824 bytes, 10 sections, entry 0x80004050
SDK RVL_SDK, 29 component stamps, Feb 27 2009 → Jun 22 2009

Forty files, and three of them hold 2.69 GB. A census that stops at the FST reports a build with no assets. 02


Documents

01 Overview what this build is and what it changes
02 The disc container, partitions, file system, formats
03 The executable compiler, SDK, RTTI, symbols, who made it
04 Containers and assets CPK, CRILAYLA, FPS4, Sofdec, the DS ROM
05 The codec the constant scan, the disassembly, the probe, the census
06 Lineage the strong test, the project tag, towards Ratatosk
07 Budget every byte of the partition, and what the padding is
08 Leftovers the shipped editor, the debug archive, the gaps
09 Corrections six inherited tools that were wrong or blind
99 Open questions what is unresolved, with the measurement beside it

Tools

Python 3, standard library only, one job each.

wiirvz.py wiifs.py gcm.py rvz.py the container, the partition, the FST
disppc.py dismips.py ring_sites.py the disassembler and the constant scan
struct_probe_ppc.py struct_probe_arm.py nearmiss.py the structural probes, with --selftest
prefix_scan.py common_run.py the strong test and its control
cpk.py CRI's container and CRILAYLAnew here
fps4.py the studio's archive, byte order detected from the archive
tales_block.py the reference decoder, copied unchanged, md5 e2dcd6b8dc717b84f67bf8a46568298c
census.py the blind decode census, five levels of descent
formats.py media_census.py budget.py what is on the disc, and what could not be parsed
deflate_control.py crosstitle.py magic_sweep.py the comparative measures
leftovers.py internal_names.py datestamps.py manifest.py the leftovers
aska.py rtti.py callsites.py the outward probes
ndsrom.py ndsmodules.py ndscomp.py securearea.py the DS ROM inside the disc
cab.py nintendo_comp.py MSCF and the Nintendo formats, kept although absent

Licences

Code MIT (LICENSE); documentation CC BY 4.0 (LICENSE-DOCS).

About

Structural documentation of the Japanese Wii disc of Tales of Graces (2009): the Tales block codec is on it, 138 bytes shared with the 2003 GameCube decoder, project tag TO10, a Nintendo DS ROM inside the disc, and the first build of this line that names its developer.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages