Skip to content
View in the app

A better way to browse. Learn more.

ResHax

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.
Help us keep the site running.
Zero Tolerance for Disrespect

[PS2] Urban Freestyle Soccer - FILE.CDD/FILE.CDF pairs

Featured Replies

  • Supporter

Hi, needed help to extract the files inside FILE.CDF with the FILE.CDD as the header/TOCs
UFS.zip
(I actually truncated the FILE.CDF so it can be attached here easily. The original size of it was around 570MB)

These formats is also used by other Silicon Dreams (Gusto's old studio before they were reformed) titles on PS2 like Lego Football Mania/Soccer Mania and UEFA Champions League Season 2001-02

Edited by BloodRaynare

  • Localization

FILE.CDD (the TOC)

The CDD is a tree of nodes. All offsets inside it are relative to the start of the CDD.

  • Header: 3 bytes (03 04 03 in UFS, meaning unknown), then the root folder's child list.

  • Every node starts with its name in ASCII. The last character is ORed with 0x80 (bit 7 set), which is how the end of the name is marked.

  • If the byte right after the name is FE, the node is a file. Anything else means it's a folder.

  • Folder: a list of 3-byte big endian offsets to its child nodes, ended by FF.

File entry, after the name:

FE        marker
3 bytes   sector, little endian (offset in CDF = sector * 0x800)
4 bytes   stored size in the CDF, little endian
4 bytes   unpacked size, little endian
            FFFFFFFF = stored as-is
            00000000 = stored as-is (only the sound files: BD/HD/SB/MIB/MSB/WAD)
            anything else = compressed

UFS has 1666 files: 1085 compressed, 489 stored with FFFFFFFF and 92 sound files stored with 0. Files are packed back to back in the CDF, each one starting on a new 0x800 sector.

Compression (custom LZ)

  • Every compressed file starts with a 4-byte value. Skip it. Its purpose is unknown.

  • Control bits come from 32-bit little endian flag words, read lowest bit first. When a word runs out, the next 4 bytes of the stream are read as a new one, so the flag words sit in between the data bytes.

Tokens:

0      literal: copy 1 byte
1 0    short match: read 1 byte B, distance = 0x100 - B (1..256)
       then read 2 more flag bits (first one is the high bit), length = 2..5
1 1    long match: read 16-bit little endian T
       T == 0      end of stream
       distance = 0x2000 - (T >> 3)
       length   = (T & 7) + 2
       if (T & 7) == 0, read 1 more byte E:
         E & 0x80  distance += 0x2000
         length = (E & 0x7F) + 2
         if (E & 0x7F) == 0, length = next 16-bit little endian value (no +2)

Distances are stored as negative values, so a short match byte of FC means 4 bytes back. The samples have a single 01 byte left over after the end marker.

Other notes

  • .FAB files (animations) start with v1.0 and have an URBN tag in the header. .TRE files are small stored files holding a 4-byte value and the path of the matching .FAB.

  • Full extractor attached: ufs_cdf_extract.py. Usage: python ufs_cdf_extract.py FILE.CDD FILE.CDF out_folder (add -l to only list the files).

ufs_cdf_extract.py

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.