Emulation on Mac

Emulating classic video game consoles on Mac OS X

Tag Archives: Saturn

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

Saturn Emulation on Mac OS X

The SEGA Saturn was long said to be impossible to emulate, because of its unusual (ridiculous) architecture that incorporated eight processors (two Hitachi SuperH SH-2 processors, one Hitachi SH-1 processor just for streaming and decompressing from the disc in realtime, two “video display processors” from SEGA, a Motorola 68EC000 for sound, another custom SEGA DSP chip for sound built by Yamaha, and finally something called the System Control Unit). Before the days of multi-core processors, parallelism meant having multiple chips. It was expensive, hard to program for, and its graphical abilities were best suited to 2D.

There were a string of Windows-only closed-source emulators, including SSF, Giri Giri, Satourne, etc. They have all been abandoned (or in the case of Giri Giri, sold to SEGA).

The Yabause emulator carries the torch now. It’s open-source. It builds on Mac OS X and even ships an OS X binary, in an app bundle too! You won’t need much help getting it to work. With a game ISO (original disc in your system, or disc image – see my earlier post on imaging your original discs), and a Sega Saturn BIOS file, you are good to go.


The first thing to do is to open Preferences, and point it to the location of your Sega Saturn BIOS file. Also uncheck the box for “Enable BIOS emulation” unless you were unable to find a copy of this BIOS file anywhere.

Next, go to the Audio/Video tab. Audio just works, and there’s nothing to change. Graphics are another story. With the current version (0.9.13) the OpenGL graphics renderer shows no graphics at all (just a black screen with audio). Then if you go to fullscreen, it crashes the emulator. The software graphics renderer is not fast enough to be playable; with frameskip turned on, the game is playable, but you wouldn’t want to. The third option is the “Grand Central Dispatch” graphics driver, and this actually works well. Not 100% speed but close. But the real fix is downloading Yabause version 0.9.12, which had a working OpenGL mode on OS X. They appear to be aware of this bug and it might get fixed in the next version. Also, if your system is fast enough, it will actually cause issues with emulation speed unless you check the option in the menu bar: Emulation -> Enable Frameskip. The emulation speed is not perfect all the time, but this keeps it on target as much as possible.

There is no support for controllers at the moment, so you have to play with the keyboard. That may be okay for some games, but I hope that controller support comes quickly in a future version. The work-around for now is to run a tool that maps keyboard keys to a controller’s inputs. On Mac OS X, your choices are ControllerMate ($25) or Enjoy2 (free, open source). Download and run Enjoy2.app, and then get your PS3 controller to Bluetooth pair with your Mac. Now it should automatically show up in Enjoy2. If you press a button on the controller, it will jump to a place in the list with an auto-generated button name (up on the d-pad will be “Button 5 (null)” but don’t worry about that). For each key you want to assign to a controller input, just set it to “Press a key” and then in the field next to it, hit a key on the keyboard. When done configuring, hit the “Start” in Enjoy2. You can test your mapping using a text editor; you should be able to type with the PS3 controller. Now, over in Yabause, configure the emulator with keyboard keys matching the ones you set in Enjoy2. This should work great unless you need analog, which few Saturn games supported anyway (and none required, to my knowledge). Also, at some future point it would be great if mouse input could emulate the light gun, or two sticks could be used for Virtual On. But now I’m just dreaming.

In order to save games (Yabause doesn’t support the emulator concept of “save states”) you have to go to Preferences, Memory, and then under “Internal Memory”, enter a pathname to somewhere on your system where you want the Saturn’s internal battery-backed RAM to be stored. It can be anywhere and named whatever, as long as you have write permissions to that location. You can do the same thing to create a file-backed emulation of a Saturn expansion cartridge. Yabause will write the files when it quits.

Getting in and out of full screen is janky; you can get into full screen mode using the menu bar, but to get out, the usual keys like ESC don’t work. You have to hit Cmd-F to toggle out of full screen. Or Cmd-Q to quit, that also works.

Lastly, if you are looking for where Yabause stores its program preferences:

~/Library/Saved Application State/org.yabause.yabause.cocoa.savedState