I recently wanted to play original set of Metal Gear Solid games, but since I’m now lacking any PlayStation hardware, thought I’d try out emulation.

I’m quite a fan of RetroArch, and that has a suitably good core for PS1 gameplay, and provides some pretty good upscaling and other nice options and optimisations, rendering via Vulkan.

PS2 emulation still seems to really only be available via PSCX2, though it seems pretty solid and dispite being 32-bit and still running an OpenGL renderer.

PS3 emulation via RPCS3, at time of writing, still has a way to go for most games - in my case missing Metal Gear Solid IV support is a bit of a downer in particular.

Anyway, so to use any of these systems, you’re going to need to either stick physical discs into ye olde optical drives, or dump those discs to files for easy switching and managing.

Note: In both cases below, remember to umount the discs first. Multi-disc games will also need some manual script rejigging.

Both of the following scripts should be invoked using:

$ ./dump-psx.sh GameName

Here’s a simple Bash script for dumping/ripping your PlayStation 1 games (download). This requires installation of package cdrdao.

#!/bin/bash

GAMEFILE="$1/$1"
mkdir "$1"

cdrdao read-cd --read-raw --datafile "$GAMEFILE.bin" --device /dev/cdrom --driver generic-mmc-raw "$GAMEFILE.toc"
toc2cue "$GAMEFILE.toc" "$GAMEFILE.cue"

And here’s the process for dumping/ripping PlayStation 2 games (download). This requires installation of package genisoimage.

#!/bin/bash

GAMEFILE="$1/$1"
mkdir "$1"

BLK_SIZE=$(isoinfo -d -i /dev/cdrom | grep -i -E 'block size' | sed 's/[^0-9]*//')
VOL_SIZE=$(isoinfo -d -i /dev/cdrom | grep -i -E 'volume size' | sed 's/[^0-9]*//')

dd if=/dev/cdrom of="$GAMEFILE.iso" bs=$BLK_SIZE count=$VOL_SIZE