Results 1 to 6 of 6

Thread: Useful Python scripts for handling PlayStation/PlayStation2 CD images.

  1. #1
    ASSEMbler Hardcore
    l_oliveira's Avatar

    Join Date
    Nov 2007
    Location
    Brazil
    Posts
    2,277

    Ps2tool Assemblergames Useful Python scripts for handling PlayStation/PlayStation2 CD images.

    This one strips ECC/ECD data from a CDRWIN image.
    preblock = 24
    block = 2048
    crc = 280
    out = open("out.iso","wb")
    input = open("in.bin","rb")
    while True:
    data = input.read(preblock)
    data = input.read(block)
    if not data: break
    out.write(data)
    input.read(crc)
    out.close()
    This one strips ECC/ECD data from a Alcohol 120% image (.MDF).
    preblock = 24
    block = 2048
    crc = 376
    out = open("out_mdf.iso","wb")
    input = open("in.mdf","rb")
    while True:
    data = input.read(preblock)
    data = input.read(block)
    if not data: break
    out.write(data)
    input.read(crc)
    out.close()
    The output is a plain 2048 bytes per sector (MODE1) image.

    Keep in mind that some PS1 software might end damaged with this kind of conversion. This helps mostly with PS2 CD-ROM images.

    As a gift for everyone, this one converts .000 images generated with SONY PS2 CDVDGEN to 2048 MODE1.

    preblock = 20
    block = 2048
    crc = 280
    out = open("out.iso","wb")
    input = open("in.bin","rb")
    while True:
    data = input.read(preblock)
    data = input.read(block)
    if not data: break
    out.write(data)
    input.read(crc)
    out.close()
    PlayStation Aficionado.
    MSX Maniac.

  2. #2
    I thought the PS1 needed a MODE2?

    I think data is for 2048 (2 Kilobytes),
    and 2353 is for audio (XA?).
    Last edited by H360; 04-30-2012 at 09:03 AM.

  3. #3
    ASSEMbler Hardcore
    l_oliveira's Avatar

    Join Date
    Nov 2007
    Location
    Brazil
    Posts
    2,277
    Quote Originally Posted by Haunted360 View Post
    I thought the PS1 needed a MODE2?

    I think data is for 2048 (2 Kilobytes),
    and 2353 is for audio (XA?).
    These scripts are for stripping extra data and keeping only the actual data for the ISO.

    For example, if you use PS1 or PS2 CDVDGEN from SONY to build a CD image, it will be 2356 bytes per sector, which is a non standard format. It's useless for anything but SONY own burning tool CDREC/CDVDREC. So if you strip the data with this script then rebuild with CDMAGE as BIN/CUE for recording, the resulting image should work with any CD recording software... :)
    Last edited by l_oliveira; 04-30-2012 at 10:29 AM.
    PlayStation Aficionado.
    MSX Maniac.

  4. #4
    Could you please explain how you use these scripts??

  5. #5
    ASSEMbler Hardcore
    l_oliveira's Avatar

    Join Date
    Nov 2007
    Location
    Brazil
    Posts
    2,277
    Quote Originally Posted by PS2Guy View Post
    Could you please explain how you use these scripts??
    Sure...

    Imagine you have a BIN/CUE image of a PS2 CD game such as Gradius 3 and 4 and want to install it to the PS2 HDD.

    HDL uses 2048/sector regardless of disc type because it's ultimately what the PS2 wants out of the disc. Needing the extra ECC/EDC data on the disc are requirements of the CD/DVD drive hardware.

    So you take the bin file and name as "in.bin" then double click the script file. If you have the python interpreter installed on your PC you should shortly have a file named out.iso on the same folder. Open it with a image browser (Winrar can open 2048bytes/sector ISO files just fine) and if it opens correctly, it is now converted.

    Same apply for the other two examples which are for Alcohol 120% and SONY CDVDGEN files.
    PlayStation Aficionado.
    MSX Maniac.

  6. #6
    Cool thanks. I'll give it try.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •