RetroPie forum home
    • Recent
    • Tags
    • Popular
    • Home
    • Docs
    • Register
    • Login
    Please do not post a support request without first reading and following the advice in https://retropie.org.uk/forum/topic/3/read-this-first

    PlayStation and .zip files

    Scheduled Pinned Locked Moved Help and Support
    psxplaystationzip
    40 Posts 13 Posters 11.9k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • I
      IyonUK
      last edited by

      Is there a way to get PlayStation roms running from zip files? I’m looking to conserve space and we all know those PSX files take a lot of space. I was thinking of keeping them in .zip files but using some sort of script (runcommand on start?) to unzip them and run from a temp directory. However, I cannot find much info on runcommand on start such as is it possible to return a new rom path to the emulator once unzipped. Thoughts?

      mediamogulM 1 Reply Last reply Reply Quote 0
      • mediamogulM
        mediamogul Global Moderator @IyonUK
        last edited by mediamogul

        @iyonuk

        I've got a way in mind that might work, but outside of being an interesting excercise, you'd really be better off just using eboot .pbp files. From what I hear, they offer reasonably good compression. They also have the advantage of offering multi-disc capabilities from a single file.

        RetroPie v4.5 • RPi3 Model B • 5.1V 2.5A PSU • 16GB SanDisk microSD • 512GB External Drive

        KN4THXK EcksE I 3 Replies Last reply Reply Quote 2
        • KN4THXK
          KN4THX @mediamogul
          last edited by

          @mediamogul Is there a huge advantage over these? I went with the m3u method after combining bin files by creating new .bin files. I didn't figure space is an issue with storage capabilities but keep seeing it recommended.

          "If you're gonna play the Game Boy, You gotta learn to play it right" - https://www.youtube.com/watch?v=FYLGl92ETNQ

          BobHarrisB 1 Reply Last reply Reply Quote 0
          • EcksE
            Ecks @mediamogul
            last edited by

            @mediamogul said in PlayStation and .zip files:

            @iyonuk

            I've got a way in mind that might work, but outside of being an interesting excercise, you'd really be better off just using eboot .pbp files. From what I hear, they offer reasonably good compression. They also have the advantage of offering multi-disc capabilities from a single file.

            Depending on the games the compression rate is usually between 5% to 35% on average and also i prefer it with multi disc based games cause for most that is 3-4 CD's is usually 20% compressed and if i remember i got Tekken 3 compressed down by 80%.

            1 Reply Last reply Reply Quote 0
            • I
              IyonUK @mediamogul
              last edited by

              @mediamogul said in PlayStation and .zip files:

              @iyonuk

              I've got a way in mind that might work, but outside of being an interesting excercise, you'd really be better off just using eboot .pbp files. From what I hear, they offer reasonably good compression. They also have the advantage of offering multi-disc capabilities from a single file.

              Hi, I’m interested in your idea. I like exercises. I tried the PBP way but it became tedious and the purist in me likes keeping the bin/cue files, albeit zipped.

              1 Reply Last reply Reply Quote -1
              • BobHarrisB
                BobHarris @KN4THX
                last edited by

                @thedatacereal There is no other advantage than space saving.

                Pi 3B , 64 GB Sandisk ultra flashdrive, 19 systems, 872 hand picked classic gaming gems :-) Dual shock 4v2

                1 Reply Last reply Reply Quote 1
                • mediamogulM
                  mediamogul Global Moderator
                  last edited by mediamogul

                  @TheDataCereal

                  The main benefit is compression, but a lot of people seem to like the single file solution for multi-disc games that it offers as well. Myself, I just use bin/cue files and switch them out through the UI. This is mostly to maintain compatibility with all my different emulation setups, as bin/cue is best supported all around.

                  @IyonUK

                  Hi, I’m interested in your idea. I like exercises.

                  Keen beans then. First, you'd want to zip your .bin files, but not the .cue files. You should now have two files for every game, such as gamename.cue and gamename.zip for example. Now, create a script file named lr-pcsx-rearmed-unzip.sh at /opt/retropie/configs/psx/, make it executable and then add the following to it:

                  #!/bin/bash
                  
                  ##set path to .cue file
                  CUEPATH="$(sed '3q;d' /dev/shm/runcommand.info)"
                  
                  ##set path to .zip file based on .cue path
                  ZIP=$(echo "$CUEPATH" | cut -f 1 -d '.' | sed 's/$/.zip/')
                  
                  ##set path to .zip directory based on .zip path
                  ZDIR=$(dirname "$ZIP")
                  
                  ##unzip .bin file
                  unzip "$ZIP" "$ZDIR"
                  
                  ##wait for unzip to execute, then wait for it to finish
                  until [ -n "$UZPID" ]; do
                    UZPID="$(pgrep -f unzip)"
                    sleep 1
                  done
                  while [ -n "$UZPID" ]; do
                    UZPID="$(pgrep -f unzip)"
                    sleep 1
                  done
                  
                  ##launch emulator with .cue file, which should now be able to access the unzipped .bin
                  /opt/retropie/emulators/retroarch/bin/retroarch -L /opt/retropie/libretrocores/lr-pcsx-rearmed/libretro.so --config /opt/retropie/configs/psx/retroarch.cfg "$CUEPATH"
                  

                  Next, add the following to /opt/retropie/configs/all/runcommand-onend.sh:

                  ##if unzip was used, set path to .zip file based on .cue path and delete .bin file
                  if [ "$2" = "lr-pcsx-rearmed-unzip" ]; then
                    BIN=$(echo "$3" | cut -f 1 -d '.' | sed 's/$/.bin/')
                    rm >> /dev/shm/runcommand.log 2>&1 "$BIN"
                  fi
                  

                  Finally, add the following line to /opt/retropie/configs/psx/emulators.cfg

                  lr-pcsx-rearmed-unzip = "bash /opt/retropie/configs/psx/lr-pcsx-rearmed-unzip.sh %ROM%"
                  

                  While you're there, go ahead and set default="lr-pcsx-rearmed-unzip"

                  Now, in theory, everytime a .cue file is launched, the corresponding .bin file will be unzipped and Retroarch will be launched afterwards, where it will use the .cue to find and run the freshly unzipped .bin. Once exited, the .bin file will be deleted. Again, it should be said that this should work in theory, as I haven't actually tested it. If nothing else, it should give some insight as to how all these pieces can potentially fit together.

                  RetroPie v4.5 • RPi3 Model B • 5.1V 2.5A PSU • 16GB SanDisk microSD • 512GB External Drive

                  I 1 Reply Last reply Reply Quote 2
                  • I
                    IyonUK @mediamogul
                    last edited by

                    @mediamogul Brilliant, I can see how it would work. Launching an script instead of the emulator. I think with that solution you could go full hog and keep the bin and cue in a zip, allow zip as an extension for the emulator then the script could unzip both and launch the cue. I’ve thought of a slight snag which involves multi-disc games as the remaining discs would still be zipped. But I think some cunning regular expressions could unzip those too. I’ll get cracking later. 😊

                    mediamogulM mituM 2 Replies Last reply Reply Quote 1
                    • mediamogulM
                      mediamogul Global Moderator @IyonUK
                      last edited by

                      @iyonuk said in PlayStation and .zip files:

                      I’ll get cracking later.

                      Let us know how it turns out.

                      RetroPie v4.5 • RPi3 Model B • 5.1V 2.5A PSU • 16GB SanDisk microSD • 512GB External Drive

                      1 Reply Last reply Reply Quote 0
                      • mituM
                        mitu Global Moderator @IyonUK
                        last edited by

                        @iyonuk Just be aware that every time you'll launch the game, the game will be unzipped. You'll have to wait for the unzip command to finish its job before the game will actually be launched.
                        If you're doing this on a Raspberry PI, you can wait quite a few minutes and maybe more.

                        I mediamogulM 2 Replies Last reply Reply Quote 0
                        • I
                          IyonUK @mitu
                          last edited by

                          @mitu Hmm, I hadn’t really thought of the unzipping performance. I’ll have to try a few unzips out.

                          1 Reply Last reply Reply Quote 0
                          • mediamogulM
                            mediamogul Global Moderator @mitu
                            last edited by

                            @mitu said in PlayStation and .zip files:

                            If you're doing this on a Raspberry PI, you can wait quite a few minutes and maybe more.

                            No problem. Just script another game to launch while you're waiting. ;)

                            RetroPie v4.5 • RPi3 Model B • 5.1V 2.5A PSU • 16GB SanDisk microSD • 512GB External Drive

                            mituM 1 Reply Last reply Reply Quote 4
                            • mituM
                              mitu Global Moderator @mediamogul
                              last edited by

                              @mediamogul said in PlayStation and .zip files:

                              Just script another game to launch while you're waiting. ;)

                              Just quickly launch a game while you're waiting for the game to start :)

                              1 Reply Last reply Reply Quote 3
                              • I
                                IyonUK
                                last edited by IyonUK

                                Well... no need for any of this. Added zip to the supported list in es_systems.cfg and tried a game for the sake of it and it works. RetroArch unpacks it to /tmp/retroarch. It takes a while to start, blank screen whilst it unpacks but that solves my storage issue. 😃

                                1 Reply Last reply Reply Quote 0
                                • I
                                  IyonUK
                                  last edited by

                                  Probably spoke too soon. Need to try some with multiple bin files.

                                  1 Reply Last reply Reply Quote 0
                                  • I
                                    IyonUK
                                    last edited by

                                    Bit of a mixed bag at the moment. Passing a zip file in does indeed extract the zip to /tmp/retroarch but only the first bin file. I’ve adapted your script to work with a zip file and extract everything to /tmp/psx (cue and all bins). This works fine and the game loads, however RetroArch is now ignoring the display settings I had setup for PCSX ReArmed and is launching in 1080p with only the top-left quarter of the screen displaying the full image (I had display for PCSX ReArmed set to CEA1 with custom offsets/width/height to fill my screen). I noticed that an —appendconfig is used when launching PCSX ReArmed normally but this is only to set the refresh rate to 60hz. The other issue is minor in that running from /tmp/psx also saves the srm file there. So I might have to switch back your script to extract to the rom location. Any ideas why my display settings might be borked?

                                    mediamogulM 1 Reply Last reply Reply Quote 0
                                    • mediamogulM
                                      mediamogul Global Moderator @IyonUK
                                      last edited by mediamogul

                                      @iyonuk said in PlayStation and .zip files:

                                      Any ideas why my display settings might be borked?

                                      If these are RetroArch settings, then they should have carried over. If the display settings you're referencing were set in the Runcommand menu and if you've changed the launch command in /opt/retropie/configs/psx/emulators.cfg, then your previous settings are tied to the 'lr-pcsx-rearmed' named launch command from that file. You would need to either configure those same settings for 'lr-pcsx-rearmed-zip', or manually change 'lr-pcsx-rearmed' to 'lr-pcsx-rearmed-zip' in /opt/retropie/configs/all/videomodes.cfg.

                                      RetroPie v4.5 • RPi3 Model B • 5.1V 2.5A PSU • 16GB SanDisk microSD • 512GB External Drive

                                      1 Reply Last reply Reply Quote 0
                                      • I
                                        IyonUK
                                        last edited by

                                        I’ve set the runcommand resolution for the new unzip emulator/script to CEA-1 to match which works fine but RetroArch still doesn’t play ball. I had set the aspect ratio to “Custom” and manually entered figures for the X and Y offsets, width and height but those have gone. I have set them back but every time I launch those setting have reset. I checked the config at /opt/retropie/configs/psx/retroarch.cfg and my settings are there (same location as where RetroArch says its saved the settings and the same config passed on emulator launch) so I’m a little lost right now. Will do some more digging later. On a positive note the unzipping etc. works fine, will probably tart it up a bit.

                                        dankcushionsD 1 Reply Last reply Reply Quote 0
                                        • dankcushionsD
                                          dankcushions Global Moderator @IyonUK
                                          last edited by

                                          @iyonuk unzipping ~400MB files to an SD card every game launch sounds like an efficient way of destroying an SD card ;)

                                          i guess you could unzip to a ram drive, but multi-disk psx games would consume more system ram than an rpi has.

                                          i would definitely recommend the .pbp approach.

                                          I 1 Reply Last reply Reply Quote 0
                                          • DarksaviorD
                                            Darksavior
                                            last edited by

                                            Nothing pure about preferring one disc format over another. Pbp saves space, and your "purist" butt won't know the difference.

                                            I 2 Replies Last reply Reply Quote 0
                                            • First post
                                              Last post

                                            Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.

                                            Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.