How can I modify a DVD image (ISO) and then burn a new DVD? I have a (legit) copy of Star Wars Battlefront 1 for the Play Station 2 (PS2). There are game mods available (different character skins etc) that I'd like to try. Apparently this can be done but I'm tearing my hair out now...

I can make an image of the original DVD using Disk Utility. It creates a CDR file. When I burn that to a DVD-R (again, using Disk Utility), I can get the PS2 to load the game (using Swap Magic to load the DVD-R, this PS2 is not modded -- Swap Magic "soft mods" it to load burned DVDs).

$ file SWBF1.iso
SWBF1.iso:                      UDF filesystem data (version 1.5) '1_01                           '
$


So having this much work all looks good but what I want to do now is modify some of the files before burning the DVD-R.

OSX won't let me edit the ISO (CDR) image. Apparently this is because ISO9660 is not really designed to allow modifications, so even using command line utilities (hdiutil) with -readwrite option won't allow me to modify the image.

So I suspect I need to extract the files onto the file system, add/modify the game data files for the game mod, then create a new ISO image and burn that? But this is not working -- I'm just creating coasters now. (The Mac can read the burned DVD but the PS2 doesn't recognise the disk as being valid). This for example, fails to give the desired result:

$ cd /path-to-extracted-files
$ hdiutil makehybrid -udf -udf-volume-name 1_01 -o SWBF1_mod.iso .
$ hdiutil burn SWBF1_mod.iso 
$ file ../*.iso
../SWBF1.iso:                      UDF filesystem data (version 1.5) '1_01                           '
../SWBF1_mod.iso:                  data


How can I modify files on a DVD ISO image to make this work?

Thanks

[Edit: I originally mentioned PS2 in the title but that's a red herring really. This problem seems to exist for anyone wanting to modify an ISO image on OS X. See for example this old discussion of the same problem.]
I know of two techniques to modify readonly disk images - using either a sparse image or a shadow file.  Here is what to do using a shadow file:

Create an image of your cdr (which you have already done)- I will call this xxx.cdr.

Use hdiutil attach xxx.cdr -shadow which mounts the read-only xxx.cdr image along with a shadow file where all changes will kept.  So it behaves like a mounted read/write image.

Make your changes.

Unmount the disk - you will now have xxx.cdr and xxx.cdr.shadow

Now run:

hdiutil convert -format UDTO -o newxxx.cdr xxx.cdr -shadow


Then burn the newxxx.cdr to `DVD-R.

This is the method I have used to create a Snow Leopard image for use by Parallels or VMware. My posting in a MacRumors Thread is just part of a long discussion.  

You may need to vary the above to suit your particular needs - I have no direct experience of working with PS2 images.