blog.minskio.co.uk

Content and theme behind minskio.co.uk
Log | Files | Refs

ps1-iso-formats-conversion.md (2954B)


      1 ---
      2 title: "Sony PS1 image conversion guide"
      3 date: 2020-05-03T16:52:00
      4 tags: ["Formats", "Guides", "Linux", "Snippets", "Software"]
      5 ---
      6 
      7 
      8 Every now and then, when acquiring  a PlayStation game from nefarious sources you'll be presented with a folder full of mysterious files instead of a single expected single iso image or friendly bin/cue pair or chd.
      9 
     10 There are plenty of guides out there for Windows but none really covering the Linux side of things. This guide assumes you're running Debian, or at least have access to the Debian repository of software.
     11 
     12 ### .7z
     13 ```
     14 apt-get install p7zip
     15 for i in *.7z; do p7zip -d "$i"; done
     16 ```
     17 
     18 ### .rar
     19 ```
     20 apt-get install unrar
     21 for i in *.rar; do unrar x "$i"; done
     22 ```
     23 
     24 ### .zip
     25 ```
     26 apt-get install unzip
     27 for i in *.zip; do unzip "$i"; done
     28 ```
     29 
     30 ### .ape
     31 ```
     32 apt-get install ffmpeg
     33 for i in *.ape; do ffmpeg -i "$i" -f s16le "${i%ape}bin" && rm "$i"; done
     34 ```
     35 
     36 ### .ecm
     37 ```
     38 apt-get install ecm
     39 for i in *.ecm; do ecm-uncompress "$i" && rm "$i"; done
     40 ```
     41 
     42 ### Missing .cue
     43 Sometimes (and annoyingly) these game packages won't include their associated cue sheet, the majority can be found in [this collection](https://github.com/opsxcq/psx-cue-sbi-collection/).
     44 Alternatively, you can [create one](https://github.com/opsxcq/psx-cue-sbi-collection/#generating-a-generic-cue-file) if there is only a single track in the disc image.
     45 
     46 ### Conversion to .chd
     47 One last step that I quite like to perform is to convert this bin/cue pair into a single .chd file.
     48 Support for this file format is quite good albeit lacking from mednafen (as is the less-supported and documented pbp format) however is present in the Retroarch port, [beetle-psx](https://github.com/libretro/beetle-psx-libretro).
     49 ```
     50 apt-get install mame-tools
     51 for i in *.cue; do chdman createcd -i "$i" -o "${i%cue}chd"; done
     52 ```
     53 
     54 ### Playlist .m3u files
     55 Playlist support is one thing lacking in the chd  format currently.
     56 If you have a multi-disc games, such as Metal Gear Solid and you'd like to take advantage of disc swapping facilities provided by your emulator you can create a playlist file containing your image files.
     57 For the Metal Gear Solid example, your m3u file will simply be called Metal Gear Solid.m3u  and it's contents will be:
     58 ```
     59 Metal Gear Solid.cd1.chd
     60 Metal Gear Solid.cd2.chd
     61 ```
     62 
     63 ### SquashFS alternative
     64 Alternatively, if you'd still like to run your games via vanilla `mednafen` or just want to compress your game images into a single archive, you can do the following:
     65 ```
     66 apt-get install squashfs-tools
     67 mksquashfs sony_playstation_games_directory sony_playstation.squashfs -b 1048576 -comp xz -Xdict-size 100%
     68 ```
     69 
     70 And then, to mount the archive:
     71 ```
     72 mkdir sony_playstation
     73 mount sony_playstation.squashfs sony_playstation -t squashfs -o loop
     74 ```
     75 
     76 * **Edit 2020-06-20:** I've recently found out about [binmerge](https://github.com/putnam/binmerge) which is a python script that will merge multiple bin files into a single one.