Emulation on Mac

Saturn Emulation on Mac OS X

Advertisements

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.

Almost.

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/Preferences/org.yabause.yabause.cocoa
~/Library/Saved Application State/org.yabause.yabause.cocoa.savedState

Advertisements