Archives for December 2013

Video Game Emulation on the Mac

Posted December 28, 2013

While I’ve been preoccupied with schemes of obtaining a full-sized Robotron or Galaga ’88 for our apartment, and jealously watching others pack their basements with 50 games, I’ve also been having fun at least playing these games on my iMac. Writing that makes me wince of course, as the beautifully warped glow of an arcade monitor is the antithesis of a 27″ LCD. But this is what I’ve got to work with at the moment. Especially since measuring our elevator and realizing its opening is only 25″ wide, making all but the slimmest cabarets impossible. I suppose there’s the option of dollying it up the stairs, but there’s something about 7 floors that starts to make this sort of ridiculous.

Emulation on the Mac is an afterthought to the scene, but it’s still very possible. Returning to this after a few failed attempts years back, I almost gave up again and started considering buying a cheap PC or a Mac mini running Windows 7. But I hated the idea of maintaining a Windows machine, which would essentially hook up to my iMac’s screen anyway, so I kept at it until I found a working solution. This required many painful hours of digging through clumsy forums with hot tempered men. I get why they’re so angry though, this stuff can be a pain in the ass. Still, what’s been accomplished over the past 15 years in arcade and console emulation is pretty impressive.

I think the two largest obstacles are finding a decent front-end so you’re not wading through folders of files — not exactly like walking through an arcade — and MAME. The just released OpenEmu addresses the first, and does it with the ease of using pre-bloat iTunes. OpenEmu also comes with emulators for 12 systems built-in (though not yet MAME), as well as automatically populating your games with screenshots, typically a laborious task, though I would like to see the option of having both box art as well as in-game screenshots. I’d also like preferences to tweak the game window and shaders, and probably less likely, the ability to add your own choice of emulator.

OpenEmu’s going to be a great option for a lot of Mac users, but for now I’m going to stick with the setup I’ve been using for a few months that’s worked well for me. For a front-end I’m using EMUlaunch, which is hard to recommend considering the author discontinued it in 2008. But once you step back and survey the landscape, it’s a fairly powerful and customizable little app. Pros: fully configurable, supports 15 game systems using your choice of emulator, and fills your screen with a kiosk-like menu system listing games coupled to 1-2 screenshots. It puts you in the mood to game, which I don’t think OpenEmu does just yet. Cons: fully configurable means you go find what you think is the best emulator for a particular system, tweak the shit out of it, and hope it works with your games (though this is largely true for game emulation in general). This can take many hours per system if you’re finicky. Also, the UI is very un-Mac-like and sluggish; even idle, as in no emulators are running, it consistently sips 12% of CPU cycles. But it works, and everything else I’ve tried, OpenEmu aside, has been awful. Plus, it runs MAME.

I would gladly pay for an updated version if he considered continuing development and charging for it — EMUlaunch was written by one guy, it’s not open source like OpenEmu. On a sidenote, I’ve reached out to the author on a couple of occasions and he was nice enough to respond. But you’re likely to find everything you need from his setup video and the sort of hidden FAQ.

If you want to use a gamepad to control EMUlaunch and play games, which really is the only way to go, try plugging in an old PS3/4 controller, or a generic USB gamepad, both of which work great. No drivers required for the PS3 controller as it syncs via Bluetooth, and I think this works equally well with Xbox controllers. To control a front-end with your controller though you’ll want to use something like Joystick Mapper, which is $5 in the Mac App Store. I also configured it to quit the running emulator by triggering the right-two shoulder buttons. And optionally, if you want to really speed up the process of adding new games to EMUlaunch, try a Keyboard Maestro macro. This may seem like overkill, but I recommend it. This screenshot shows how I set mine up; you’ll have to redo the coordinates though unless you’re using a 27″ iMac at native resolution.

Choosing an emulator can be a subjective call, though in some instances there’s clearly a winner. These are what have worked for me:

  • NES – Nestopia
  • Sega Genesis – Genesis Plus
  • Sega 32X & CD – Kega Fusion
  • TurboGrafx-16 – MagicEngine
  • Arcade – SDLmame or Mame OS X

By far, the fussiest emulators are for MAME. If you have a front-end that will launch it, or don’t mind Terminal, I’d highly suggest SDLmame. It has the closest parity with the officially developed MAME for the PC and all-in-all is pretty solid. Still, here’s a few tips that have come in handy and were tough to pin down.

If you notice any vertical tearing in games, set waitvsync and syncrefresh to 1 in mame.ini. A good test is Narc, as the scrolling buildings in the background were noticeably affected.

If SDLmame crashes and you happen to lose the key/controller mapping you’ve painstakingly added in MAME, make sure mame.ini has the correct cfg path.

Shaders: a GLSL (OpenGL) shader pack can make a huge difference, adding a bit of scanlines and curvature resembling a CRT. Some may feel these are gimmicky, but honestly unless you’re MAMEing through a CRT in an old cabinet, this is the next best thing. I avoided it for a long time, then tried it and can’t imagine playing games on an LCD without it.

I like sairuk’s variation shader pack with these tweaks to /osd/crt-geom.vsh:

CRTgamma = 2.0;
overscan = vec2(1.00,1.00);
R = 3.5;
const vec2 angle = vec2(0.0,-0.00);
cornersize = 0.01;

I briefly piped my iMac to a 42″ plasma through a Mini-DisplayPort-to-HDMI adapter, but you’ll lose the shader benefits, and frankly games looked better with shaders on the iMac than blown up even larger on an HDTV. Still, it works and would be fun at parties. Update: Shaders can work fine.

There you have it. Go play some old games!