News: 11 March 2016 - Forum Rules
Current Moderators - DarkSol, KingMike, MathOnNapkins, Azkadellia, Danke

Author Topic: Inserting modified files into PSX ISO but...OOPS! Size is larger nao!  (Read 1182 times)

NERV Agent

  • Restricted Access
  • Sr. Member
  • *
  • Posts: 497
  • Eva Unit 01
    • View Profile
    • Watch my anime shitposts on YouTube! Smell them, too!
I have some familiarity with ROM hacking on the PSX. I know that if you were to replace a file in a PSX ISO, it involves the use of CDmage, and the new file needs to be exactly the same size as the old one. If not, the image won't load (i.e., teh gaem is broken).

But what if the new file is larger? How would one go about replacing files in the ISO with larger files without breaking the game?

Klarth

  • Sr. Member
  • ****
  • Posts: 484
    • View Profile
Start out by reading Cless's PSX document. It's probably outdated, but the approach is generally that you need to extract the entire CD and rebuild it. You can't use a program like CDMage for this.

Gemini

  • Hero Member
  • *****
  • Posts: 2007
  • 時を越えよう、そして彼女の元に戻ろう
    • View Profile
    • Apple of Eden
Does your game make full use of the CD TOC? You can either make a full rebuild of the ISO or change lba and size to point somewhere further in the data.
Alternative case where the game uses a virtual file system: same approach, you would append the new data elsewhere if the lba range is large enough to allow it.

Both these methods work in most cases for tests, but in the end a better approach would be to fully rebuild the ISO. Pixel's cd-tool is especially useful for this thanks to it's lua scripts.
I am the lord, you all know my name, now. I got it all: cash, money, and fame.