PS3 ROM Farmer PS3 Metadata Preservation

Table of Contents

Executive Summary

PS3 presents the most complex transformation challenge in ROM Farmer. Unlike Xbox where we simply convert ISO → XISO → SquashFS, PS3 games undergo:

  1. Decryption (encrypted ISO → decrypted ISO)
  2. Extraction (ISO → JB folder structure)
  3. Updates (patches downloaded from Sony PSN)
  4. DLC (additional content merged or copied)
After all these transformations, the final game folder is completely unrecognizable from the original Myrient source. Yet ROM Farmer still achieves metadata lookup by tracking the chain back to the original Redump ISO hash inside the Myrient ZIP.

The PS3 Challenge

flowchart TD subgraph Myrient["Myrient Source"] A["Game (USA).zip"] B["Contains: Game.iso
(Encrypted Redump)"] end subgraph Transform["Transformation Pipeline"] C["Decrypt with PS3Dec
(disc key required)"] D["Extract to JB folder"] E["Apply Updates
(from Sony PSN)"] F["Apply DLC
(from NoPayStation)"] end subgraph Final["Your Final Game"] G["GameID.ps3/
├─ PS3_GAME/
│ ├─ PARAM.SFO
│ ├─ USRDIR/
│ └─ (updated files)
└─ _PKG/
└─ (DLC packages)"] end A --> B --> C --> D --> E --> F --> G style Final fill:#1a4d2e

What Changes at Each Step

StepInputOutputWhat Changes
UnzipGame.zipGame.isoOuter container removed
DecryptGame.iso (encrypted)Game_dec.isoEncryption removed, hash changes
ExtractGame_dec.isoGAMEID.ps3/ folderFormat completely different
UpdatesBase game folderPatched folderExecutables replaced/added
DLCGame + PKGsGame + contentNew files merged
The Problem: After all these steps, what hash can we use for metadata lookup?

The Solution: PARAM.SFO as the Anchor

ROM Farmer uses a clever trick: the PARAM.SFO file remains constant through updates and serves as the folder identifier.

Myrient ZIP
Game.zip
MD5: aaa111
→
Encrypted ISO
Game.iso
MD5: bbb222
✓ Redump knows this!
→
Decrypted ISO
Game_dec.iso
MD5: ccc333
→
PARAM.SFO
PS3_GAME/PARAM.SFO
MD5: xyz789
↑ Never changes!
flowchart LR subgraph Before["Before Updates"] A["GAMEID.ps3/"] B["PS3_GAME/"] C["PARAM.SFO
MD5: xyz789"] D["USRDIR/
(base files)"] end subgraph After["After Updates + DLC"] E["GAMEID.ps3/"] F["PS3_GAME/"] G["PARAM.SFO
MD5: xyz789"] H["USRDIR/
(patched files)"] I["_PKG/
(DLC packages)"] end A --> B --> C B --> D E --> F --> G F --> H E --> I C -.->|"Same hash!"| G style C fill:#c8e6c9 style G fill:#c8e6c9

The Complete PS3 Pipeline

sequenceDiagram participant M as Myrient ZIP participant D as DAT Lookup participant P as PS3Dec participant E as Extractor participant U as Update Stage participant L as DLC Stage participant T as Transformation Table participant S as ScreenScraper Note over M: The Last of Us (USA).zip
Contains encrypted ISO M->>D: Lookup inner ISO hash in Redump DAT D-->>M: ✓ Found: MD5 bbb222
(Redump - Sony PlayStation 3) M->>P: Decrypt with disc key Note over P: bbb222 (encrypted)
→ ccc333 (decrypted) P->>T: Record: bbb222 → ccc333 P->>E: Extract to JB folder Note over E: ccc333 (ISO)
→ BCUS98174.ps3/ E->>T: Record: ccc333 → PARAM.SFO hash (xyz789) E->>U: Apply Updates Note over U: Query Sony PSN
Download patch PKGs
Merge into USRDIR/ Note over U: PARAM.SFO unchanged! U->>L: Apply DLC (optional) Note over L: Find matching DLC
Extract or copy PKGs Note over L: PARAM.SFO still xyz789! Note over T: Chain recorded:
bbb222 → ccc333 → xyz789 Note over S: Later, during metadata scrape... L->>T: Lookup xyz789 (PARAM.SFO) T-->>L: Source: ccc333 L->>T: Lookup ccc333 T-->>L: Source: bbb222 L->>S: Query with bbb222 S-->>L: ✓ Found! "The Last of Us" metadata

Updates: Sony PSN Integration

ROM Farmer queries Sony's official update servers to find and apply game patches:

flowchart TD subgraph GameFolder["Your Game Folder"] A["BCUS98174.ps3/"] B["PS3_GAME/"] C["PARAM.SFO
TITLE_ID: BCUS98174"] end subgraph Sony["Sony PSN Servers"] D["https://a0.ww.np.dl.playstation.net
/tpl/np/BCUS98174/BCUS98174-ver.xml"] E["Lists all available patches"] end subgraph Download["Patch Download"] F["Download PKG"] G["Decrypt PKG"] H["Merge files into USRDIR/"] end C -->|"Extract TITLE_ID"| D D --> E E --> F --> G --> H H -->|"Updates applied"| B style C fill:#c8e6c9

Why Updates Don't Break Metadata

FileBefore UpdateAfter Update
PARAM.SFOMD5: xyz789MD5: xyz789 ✓
EBOOT.BINOriginalPatched
USRDIR/*.sprxOriginalPatched
New files-Added
Key Insight: PARAM.SFO is read-only - it contains game metadata (title, ID, version) but isn't modified by updates. The hash stays constant!

DLC: Two Modes

Mode 1: COPY (for RPCS3/Emulators)

DLC PKG files are copied to a _PKG/ subfolder for the emulator to install:

BCUS98174.ps3/
├── PS3_GAME/
│ └── (game files)
└── _PKG/
├── BCUS98174-dlc1.pkg
├── BCUS98174-dlc1.rap (license key)
├── BCUS98174-dlc2.pkg
└── BCUS98174-dlc2.rap

Mode 2: EXTRACT (for Real PS3/ps3netsrv)

DLC is decrypted and merged directly into the game folder:

flowchart TD subgraph DLC["DLC PKG"] A["BCUS98174-story-dlc.pkg"] B["Contains: USRDIR/"] end subgraph Game["Game Folder"] C["BCUS98174.ps3/"] D["PS3_GAME/"] E["USRDIR/"] F["(existing files)"] G["(new DLC files)"] end A --> B B -->|"Decrypt & Merge"| E E --> F E --> G style E fill:#fff9c4

DLC Sources

SourceTypeRAP RequiredNotes
NoPayStationPKG DatabaseYes (in TSV)Largest PS3 DLC database
Local ArchiveDownloaded PKGsVariesUser's own collection

Metadata Lookup Flow

flowchart TD A["PARAM.SFO hash:
xyz789"] --> B{Lookup in
transformations} B -->|"Found"| C["Source: ccc333
(decrypted ISO)"] C --> D{Is ccc333 also
a transformation?} D -->|"Yes"| E["Source: bbb222
(encrypted ISO)"] D -->|"No"| F["Use ccc333 for scraping"] E --> G{Is bbb222 also
a transformation?} G -->|"No"| H["Use bbb222 for scraping"] H --> I["Query ScreenScraper
with Redump ISO hash"] I --> J["✓ Metadata found!"] style J fill:#c8e6c9

Complete Example: The Last of Us

Input

/path/to/source/myrient/ps3/The Last of Us (USA) (v1.00).zip
└── The Last of Us (USA) (v1.00).iso (encrypted, MD5: bbb222)

Processing Steps

StepActionResult
1UnzipExtract ISO from ZIP
2Find keyLocate The Last of Us (USA).dkey
3DecryptPS3Dec → ccc333
4Extract7zip to JB folder
5RecordPARAM.SFO → xyz789
6UpdateSony PSN patch v1.11
7DLCLeft Behind (optional)

Final Output

/path/to/output/ps3/The Last of Us (USA).ps3/
├── PS3_GAME/
│ ├── PARAM.SFO ← MD5: xyz789 (unchanged!)
│ ├── ICON0.PNG
│ ├── PIC1.PNG
│ └── USRDIR/
│ ├── EBOOT.BIN ← Patched to v1.11
│ ├── *.sprx ← Patched
│ └── (game data)
└── _PKG/ ← DLC (copy mode)
├── left-behind.pkg
└── left-behind.rap

Metadata Lookup Chain

  1. Your file: The Last of Us (USA).ps3/ (a folder!)
  2. Hash PARAM.SFO: xyz789
  3. Lookup xyz789 → Source: ccc333 (decrypted ISO)
  4. Lookup ccc333 → Source: bbb222 (original Redump ISO)
  5. Query ScreenScraper with bbb222
  6. ✓ Result: "The Last of Us" - full metadata returned!

Summary: The PS3 Magic

mindmap root((PS3 Metadata
Success)) Stable Anchor PARAM.SFO never changes Contains TITLE_ID Hash stays constant through updates Chain Recording Each transformation step recorded Bidirectional lookup Multiple hashes linked Redump Integration Original ISO hash known ScreenScraper has Redump hashes DAT files provide instant lookup Smart Update Handling Updates only patch executables PARAM.SFO is metadata-only DLC adds files, doesn't replace core

Challenge vs Solution

ChallengeSolution
Game is decryptedRecord encrypted → decrypted transformation
Game is extracted to folderUse PARAM.SFO hash as folder identifier
Updates change filesPARAM.SFO unchanged - use it as anchor
DLC adds contentStill same PARAM.SFO hash
Need metadataFollow chain back to original Redump hash
The Bottom Line: Your PS3 game with updates and DLC still gets metadata because PARAM.SFO links back through the transformation chain to the original Redump ISO that ScreenScraper knows.

Code References

ComponentFilePurpose
TransformPS3Stagesrc/romfarmer/stages/transform_ps3.pyFull PS3 transformation pipeline
ApplyPS3UpdatesStagesrc/romfarmer/stages/apply_ps3_updates.pyUpdate and DLC application
SonyPSNClientsrc/romfarmer/stages/apply_ps3_updates.pyQuery Sony servers for patches
NoPayStationDatabasesrc/romfarmer/stages/apply_ps3_updates.pyDLC database lookup
ROMTransformationsrc/romfarmer/metadata/transformation.pyTransformation chain storage

Generated for ROM Farmer v2.0