Emulation on Mac

Emulating classic video game consoles on Mac OS X

Monthly Archives: July 2015

PS1 Emulation: Mednafen vs. PCSX-Reloaded 1.9.93

Over the weekend, I compared the latest Mednafen PlayStation emulation with the latest PCSXR, and Mednafen emulation is currently ahead. It may not yet have all the upscaling functionality of the Windows PCSXR, but for Mac OS X it seems to be the best available PS1 experience. Where PCSXR occasionally had missing audio, skipping during loading screens, and long loading pauses at a black screen for unexplained reasons, Mednafen delivered the genuine experience. Luckily, it can be easily found in the experimental build of OpenEmu.

Before realizing the OpenEmu “experimental build” incorporates a working copy of Mednafen, I worked through all the steps to build and run Mednafen source code at the command line. If you still want to experiment with the latest versions of Mednafen yourself and not wait for the OpenEmu team, keep reading.

Building Mednafen from source:

Using Mac OS X 10.10.4 and MacPorts, I was able to build Mednafen pretty easily using the following steps:

sudo port install libsndfile

[after having extracted the Mednafen source archive and changed into the extracted directory]

Providing PS1 BIOS images to Mednafen:

Copy the appropriate PS1 BIOS file(s) to ~/.mednafen/firmware/ . For more on my difficulty with finding the correct files for this, see my previous post.

PS1 ROMs, Cuesheet, and Copy Protection Files required by Mednafen:

Unlike other PS1 emulators, Mednafen requires the cuesheet format for its ROMs. See my previous post on the cuesheet format and how to re-rip a game in that format or add a CUE file to an existing raw disc image.

Apparently, Mednafen also wants an .SBI file, even for games that should not need one. If a game does need an SBI file (because it was published as a LibCrypted disc), the SBI file can be downloaded from PSXDB Redump (link “SBI subchannels” on protected disc page). http://redump.org/disc/28260/ With the game I was testing, an SBI file should not have been required, so I tried renaming an SBI file for some other game just to shut it up, and this seems to have worked.

Running PS1 ROMs with Mednafen:

./mednafen/src/mednafen image.cue


Revisiting multi-console emulation with OpenEmu, getting PS1 emulation to work

In my last post about OpenEmu I mentioned the “experimental” build that adds support for many more systems than the official release of the program. Over the weekend I tried out the experimental version’s Playstation 1 emulation. Wow, it’s actually better than PCSX-Reloaded!

The official release version of OpenEmu supports:

  • Game Boy Advance
  • Game Boy Color
  • NeoGeo Pocket Color
  • Nintendo (NES)/Famicom
  • Nintendo DS
  • Sega 32X
  • Sega Game Gear
  • Sega Genesis/Mega Drive
  • Sega Master System
  • Super Nintendo (SNES)
  • TurboGrafx-16/PC Engine
  • Virtual Boy

The experimental build version adds support for:

  • Atari 2600
  • Atari 5200
  • Atari 7800
  • Atari Lynx
  • ColecoVision
  • Commodore 64
  • Famicom Disk System
  • MAME
  • Nintendo 64
  • PC-FX
  • PlayStation
  • PSP
  • Sega CD
  • Sega Saturn
  • SG-1000
  • TurboGrafx-CD/PC Engine CD
  • Vectrex
  • WonderSwan

I tested out PlayStation support, and ran into a few obstacles before getting things to work.

  1. The UI does nothing to explain how to provide the PlayStation BIOS file. Searching around, I learned that you add the BIOS file(s) by dragging and dropping the *.bin files (BIOS ROM images) like you would a game ROM. But, after I found a set of BIOS ROM images online, adding them this way still didn’t work. It turns out the filenames were also important, and that I had to rename the files I had to be the expected filenames:
    scph5500.bin (JP) (sha1 sum: b05def971d8ec59f346f2d9ac21fb742e3eb6917) …matched what I had in the download pack I found.
    scph5501.bin (NA) (sha1 sum: 0555c6fae8906f3f09baf5988f00e55f88e9f30b) … for me, this file was SCPH7003.BIN, and had to be renamed.
    scph5502.bin (EU) (sha1 sum: f6bc2d1f5eb6593de7d089c425ac681d6fffd3f0) … for me, this file was SCPH5552.bin, and had to be renamed.
    After renaming these BIOS images, it was possible to drag them into OpenEmu and have them be recognized as PS1 BIOS ROM image files. The UI doesn’t make it clear that it has done anything with the files, but the lack of warning is your indicator that they have been accepted.
  2. OpenEmu’s “emulator core” for PS1 emulation is Mednafen, and this emulator requires all games be provided in cuesheet format. I had only ISO images, so I had to re-rip a game in cuesheet format in order to successfully add it to my OpenEmu game library.

Preserving CD and DVD-based Console Games (Pt. 3): the .bin/.cue format

This post is part of a series:
Preserving CD and DVD-based Console Games
Preserving CD and DVD-based Console Games (Pt. 2)

In a previous post, I mentioned that two command-line utilities for making optical disc images on Mac OS X were dd and cdrdao, but I recommended dd because it was simpler to use. Well there’s actually a case where cdrdao is needed, and that is when your emulator wants game images in the “cuesheet” format (a pair of files with the file extensions .bin and .cue, rather than a single .iso or image file).

Why do we need the cuesheet format?

I mentioned in my first post in this series that many old games use “mixed-mode discs” (audio and data as separate tracks). You can rip all of their data, but without metadata to indicate the track boundaries, it seems that multi-track disc images can’t be properly handled (?). Most 16-bit era CD games were this kind of disc, and sometimes it was used in the early games of the PS1/Saturn generation.

I realized the need for cuesheet format when I tried to use the Mednafen emulator to play a Playstation 1 game I backed up in ISO format. It would fail with weird errors unless I provided the game in cuesheet format.

Almost any cuesheet file can be found at Redump.org. In fact, you can just download every cuesheet for a given system all at once, which is nice. Maybe it will preclude you from having to create your own, if you ripped your games as ISO. Note that your binary image file has to be named consistently with what is in each CUE file.

Installing cdrdao

First, you need to install the “cdrdao” package from either MacPorts (recommended), Fink, or from source. If you have MacPorts, the command is as follows:

$ sudo port install cdrdao

Backing up a PS1 disc in cuesheet format, using cdrdao

Find and unmount the disc filesystem. Observe which drive is the disc drive with the first command, and use that path in the second command:

$ diskutil list
$ diskutil unmountDisk /dev/disk3

Then rip the disc and convert its TOC to a CUE with these two commands:

$ cdrdao read-cd --datafile image.bin --driver generic-mmc:0x20000 --read-raw image.toc
$ toc2cue image.toc image.cue