ASCII by Jason Scott

Jason Scott's Weblog

MAME and the New Emulation Reality —

I’m sorry all my weblog entries seem to be variations of emulation, Internet Archive, Archive Team and Vintage Computing, but that’s kind of all my life is right now anyway. (I’m also editing documentaries, but that’s even less informative. HEY UPDATE FOLKS I AM EDITING DOCUMENTARIES.)

Time to talk about MAME.

logo-mameLike surfing, ventriloquism, or tractor pulls, MAME is one of those subjects that doesn’t invade many minds except in a very specific, very regimented set of pre-thoughts that make up the entire story as far as folks are concerned.

MAME (have you heard of MAME?) is a thing that plays Games.

“Games” in this context means arcade games, but folks just call all software or electronic based entertainment “Games”, and when they talk about MAME, the story gets to be pretty straightforward. MAME is a thing that you install on your system (with many values for “system”) and then you “play games”. It will take you a while to “find ROMs” and make MAME “play games”. As a second layer, some people will work hard (or pay people to work hard) and build an arcade cabinet that has MAME in it and this MAME Cabinet will play games.

End of story.

But like surfing, ventriloquism, or tractor pulls, this reductionism cleaves away a pile of information about MAME and its related projects, as well as a history that itself has rivaled those of the machines and products that MAME seeks to present. In just a couple more years, MAME as a project will be 20 years old. It’s probably time to talk about it for what it is: a lot more than games.

mame
Emulation, like friendship, is Magic.

Depending on how much of a piece of you you’ve invested in these machines, these quarter-sucking demons that lurk in neon-lit rooms, seeing an arcade machine work again in a small screen under your control is an emotional high. Like the first time you’re alone in a city at night or the first time you drive a car without someone in the passenger seat, the feeling is both intense and fleeting, gone into distant memory within a couple weeks. But every person I’ve made an effort to go over it with, especially people who date to a time when the Arcade was a physical place in every town, has that same moment. I know this. This is me.

Arcade games were designed, from the moment they were scribbles in an engineer’s notebook, to when they went through endless revisions of cabinet art and hardware construction, to get your attention. They were made to light up their local space, to beckon you, and to literally attract you like bright shiny metal or a siren’s song. It’s not coincidence – it’s jammed sideways into the machine’s DNA. To make that beloved thing live again, to give you even a fleeting sense of what it once was, is wizardry of the highest order.

mame_logoCalling MAME an Arcade Emulator, at this present day, is like calling the Hoover Dam a bridge.

Buried in the code, code refined over years and by many hands, are the descriptions of machines to emulate, There’s documentation about individual chips, and there’s descriptions of how different pieces go together, handed from developer to developer as needed. Machines in MAME, in other words, are collections of smaller discrete parts. The sound chip that 20 machines share is emulated once and brought in to work as needed. The CPU, the video rendering, the keyboard controls… are are modules and the modules themselves are shared, as well as sets of modules. It’s in some ways ridiculously complicated, but utterly sensible. Some of the MAME developers have spent years doing enormous re-factoring of the code to make it more modular, although some parts continue to be vaguely odd or in non-intuitive places. It is better than it was and worse than it will be.

And it’s flexible. Due to a recent merging with its sister project MESS, MAME doesn’t just emulate arcade machines. It emulates home console systems, home computers, mainframes and minis, and even speech synthesizers and keyboards. Even hard-wired electronic games are making an appearance. The parts of pinball machines that rely on a CPU are being emulated by the dozens – they exist only as squares of outputted LED displays, waiting for bumpers and spinners that usually do not come. In theory, MAME could emulate anything that has a CPU or discrete electronics; a microwave oven, Steve Wozniak’s CL9 remote control, even (in theory) a Raspberry Pi, which itself is known to run MAME.

MAME, then, is so much more than the ability to play Ms. Pac-Man on your tablet. MAME is the conduit by which hardware can become software. It is, ultimately, a saint in C++.

MAMEEngineering in a war zone is one of the most stressful activities a person can take on. When doing so out in the world today, engineers choosing this situation are well compensated, heavily protected, and are informed of both the risks and the length of their duty, not to mention the borders of their requirements.

MAME developers have had nearly none of that.

It takes a certain kind of personality and skill to negotiate a chip or schematic for the operational aspects that need emulation. It is involved work, prone to error and frequent re-checking, and always dealing with the inherent lies or hasty mistakes of companies long gone and buried. It is not pleasant work, and you don’t take it on unless you’re a strong-willed personality who is dedicated to The Mission, where The Mission for you is one form or another of rescuing historic technology and software from certain, utter oblivion.

It is not a personality that enjoys hardline management, or rapid shifts in paradigm, or chasing down the latest fads of development, losing precious worktime to politics or disagreements. The Mission is the dependable, straightforward constant in the code. Is the emulation more accurate? Is the code more efficient, as long as it doesn’t sacrifice the hard-won accuracy? Is the code more simple, except where it’s become inefficient, and maybe also lost the accuracy? It’s a loop, a goddamned loop that never ends.

And it’s a project that never ends; it is said that filmmakers do not finish films; they abandon them. And so it is with MAME developers who, as the years go by, hit a point either internal or external that says that tomorrow will not be more productive than yesterday, and another round of butted heads and arguing positions will not beat the secondary or tertiary projects waiting downstairs. So they fade away, although often not so far they can’t hear the cacophony rage in a variety of web and mailing list locations.

It is, all told, a most unpleasant road to travel, but like many such roads, the rewards are subtle but sublime.

mame-arcade-marquee-stickerNow comes JSMESS, an attempt to port MAME and MESS into a language it was never designed to go, in a way to shove it into browsers in a way it’s not optimized for, and utilizing technologies with paint so wet it smears when you tip the board. It is, in other words, an utter abomination.

It comes from an honest place, of course, or I wouldn’t have spent years cheerleading it. The many fine folks who have dedicated hundreds of hours to making JSMESS (and JSMAME) a reality have been coming from an honest place as well. Some are MAME developers already, and others have schooled themselves in the environment because of an itch to scratch. It is not often enjoyable work.

But the payoff, at least to the JSMESS team, has been incredible – not, as much as it’s been fun, to provide free arcade games to masses via yet another conduit, but to give instantaneous booting of obscure and lost computer software. To bring long-dead and almost-forgotten game consoles a new experience for research and reference, with a single click. And to allow for the shared cultural aspects of technology to live as easily as does movies, music, writing and art.

This situation has not made everyone happy, but it has gotten an awful lot of attention. And it continues to be my strongest belief that in the universal timeline, in the great wash of progress, this aberrant branch of the MAME project has done some good – perhaps a lot of good.

fmIBFrOUp to this point, if you are a bystander who does not code or develop, there’s going to be little else of interest to you in this entry. Please enjoy MAME and respect the effort behind it and the intense love of history the team has shown over the years. Pay them homage when you can, and be sure to write them if MAME has brightened your life or the lives of those you share life with.

If you are a developer or coder, you are either involved with the MAME project and related endeavors, or you are not involved at all.

If you’re involved with the project already, Thank You. I know you don’t do it for glory or fame, and I know that it’s about The Mission and doing right by it. But I realize, even among the team members that question my motives or my approaches, that criticism and skepticism comes from protecting this all-important project that you have given so many years of your life to. I respect this. I appreciate it. I am not doing my part in it all to diminish or demean your work. I’ve been following MAME since 1998. It has always left me in awe. You have too.

And if you’re not involved at all…

retro_mame_marquee_by_mrcwatson-d4vxksmYou’ve traveled a long way through a lot of text to get down here. You’re the kind of intense personality that the MAME project needs. Maybe you didn’t learn anything new, but maybe you’ve also had some rough idea about what the MAME project is and what it entails. I’d like to inform you about several recent developments that make working in MAME different than it has ever been.

First, MAME has moved development to github. This is huge, huge news. Github has so many features aimed for collaboration, verification and contribution. A lot of people have tools and code for working in a Github environment. It’s a big step in a very good direction.

Second, MAME is now working towards being uniformly open-licensed throughout its codebase. This is not just big news, it’s a massive undertaking. Developers who have been gone a decade or more are being contacted to sign off on this move. Even the original developer of MAME, Nicola Salmoria, stepped up to make the change. Developers are currently being given a chance to choose one of several open licenses that are inter-compatible. The previous license, called simply the “MAME License“, was a reaction to a situation where MAME was being repackaged and sold. In attempting to curtail this, the license turned into a somewhat strange fork of a previous license, and has not been updated to keep up with a world of mobile platforms, libraries and references. This new move, while utterly painful and controversial, is going to be a great thing for the project.

Third, Emulation is a thing now. Not just a thing for making a home entertainment system incrementally more entertaining, but a recognized vital part of maintaining computer and software history. Museums get it. Archives and Libraries get it. They get how MAME has been not just making Street Fighter work on a desktop, but has been laying down a vital foundation, one might say the vital foundation, for how the future will reference the past. If you apply your skills to this project, you are doing good for culture, you are doing good for history. Bet on it.

mame_chart_0128There are, ultimately, a rare few of you who will both step forward and have the skills and personality to work on a project of MAME’s intensity. It is not for everyone. It is attempting something very large, and is doing so after living in strange shadows for many years. But this is the time – MAME is as strong as it has ever been, with people in it who are among the most brilliant of their generation. They are tough, they are perfectionists, and they are absolutely dedicated to what they are doing. My hope is that a handful of you out there, reading this, will realize what a rewarding thing it is to be a part of all this, and jump in. I’d write this entry a hundred times over if I thought it would help.

Please get involved.

 

 


Categorised as: computer history

Comments are disabled on this post


12 Comments

  1. This was a really beautiful article, thanks for writing it!

    One thing I look for on new github projects is discussion, usually in the issues section. Where is the MAME discussion taking place?

  2. Sophie Hamilton says:

    I really would get involved as a developer, but I don’t have any access to arcade hardware to be able to do the kind of “documentation in code” that I feel the MAME/MESS project is looking for, and neither do I own ant physical arcade machines. Without having reference hardware, it seems to me that there wouldn’t be a lot I would be able to do for the project. ๐Ÿ™

    That said, you’ve inspired me to take a closer look. I’ve been a fan of MAME/MESS for a long time and even have my own self-built framework for managing ROMs designed to save disk space. They’re projects that I dearly love, and I’m in love with the idea of documenting hardware as functioning code.

    One thing, by the way – while it’s true that pinball ROMs usually never get tables, bumpers, etc. to go with them, there’s a project called Visual PinMAME which allows external programs to provide that in software. The mist common external programs used are Visual Pinball and Future Pinball, and – you’ve guessed it – people have actually built physical pinball cabinets for these! Sure, the playfield is a screen, which can be a little offputting if you’re a seasoned pinball player, and the physics will generally be off somewhat (tables have to be designed manually, of course; there’s no way to dump physical objects from ROM!), but f*ck it, you’re playing The Addams Family again, or Funhouse, or White Water, or any number of countless other classic pinball games that have been painstakingly recreated in MAME. It’s amazing.

    I agree – MAME and MESS are extremely cool projects, and I use them all the frickin’ time.

  3. Sophie Hamilton says:

    Painstakingly recreated in MAME and the table painstakingly recreated in Visual/Future Pinball, I should say. The table author often has to do a *lot* of work!

  4. Darkstar says:

    Discussion for MESS is on bannister.org (http://forums.bannister.org/ubbthreads.php?ubb=postlist&Board=1&page=1) and #messdev on EFnet, while discussion for MAME is mostly on MAMEworld.info (http://www.mameworld.info/ubbthreads/ubbthreads.php).

  5. Ricardo Bรกnffy says:

    Thanks for writing this.

    Right before the move to Github and the MESS merger was announced I volunteered to bring back to emulated life an ancient and nearly forgotten Brazilian computer, one of the few that were not clones of other machines. It’ll take me time to figure everything out, but I bet you’ll see me around.

    Cheers.

  6. balrog says:

    Probably the best place for discussion right now is the #messdev IRC channel on EFNet (efnet.org).
    Another good place is the Gitter room that we recently started, which is accessible by clicking the Gitter button at the top of the readme on Github; several of us monitor and help people there too.

    I’ve been pushing for these kinds of changes for years ๐Ÿ™‚ It’s great to see this finally happening!

  7. Arbee says:

    What Darkstar said, with the addition that it’s OK to talk about MAME on forums.bannister.org too, given the teams merged years ago and the programs are now merged. I can’t recommend IRC because certain personalities there have scared away would-be contributors in the past, and the forums are generally less abrasive.

    Sophie: it’s entirely possible to emulate something you don’t have a physical example of. Probably a majority of what’s in MAME/MESS actually was done that way. It does introduce certain difficulties, but these days you can get comparison photos and videos for nearly anything from YouTube and other sites.

  8. Sophie Hamilton says:

    Ardee: Interesting. That makes me feel happier about the idea of joining the project. I’d previously thought that to be able to do much useful you’d need actual hardware. Glad to be proven wrong. :x)

    I will admit that I tend to work better in IRC chats than in forums, but given the abrasive personalities you mentioned, I might give that a miss until I’m a bit more acclimated. Or I might not. We’ll see. ๐Ÿ™‚

    I can’t do much right now anyway due to not having a working computer, so it’ll be a few days before I can get started.

  9. balrog says:

    Sophie:
    I’m not sure what sort of abrasiveness Arbee is referring to. In the seven years that I’ve been involved, I haven’t seen Arbee once on the #messdev IRC channel. In that time, abrasiveness has been minimal, with occasional trolling handled quickly by the moderators. The moderators (myself included) have and will continue to handle any such issues promptly, as long as we see it, and if we don’t, please inform someone.

    Regarding PinMAME: the current PinMAME codebase uses an old version of MAME forked off a few years ago, and hasn’t kept up with upstream MAME changes. In addition the “visual” part of Visual PinMAME relies heavily on Windows-specific code (specifically using COM interop), which is not portable at all. There have been some efforts to get pinball into mainline MAME, but so far this has been limited to board emulation, as proper pinball simulation requires accurate physics modeling. Unfortunately, there’s already plenty to do without considering major projects like this.

  10. adammaxcarey says:

    Excellent article, and a supremely worthy cause.

    It reminds me of the Irish monks who, during the Dark Ages, sat in their cells transcribing much of the history of the Roman Empire that would probably have been lost over time.

    Almost everything we know about Roman times comes from information these Clergy saved.

    For without MAME (et al), how would we explain to our children who “Mr. Do”, “Q*bert” and “Pac Man” were?

  11. Chris M. says:

    I had a run-in with a MESS developer that didn’t go well for some reason, but I’m over it. One of these days I have to report a bug in a sound driver and test a patch for it, but I can’t test it until I find an obscure keyboard ROM to shut the driver up in question….. despite the fact that every other emulator for this particular computer (and previous releases of MESS) don’t require it.

    Folks if you want to help, but don’t know how to code, please help with the docs. Some of them are non-existent at the moment.

  12. Thomas says:

    Very nice. However, Nicola Salmoria – who invented mame long time back, deserved to be mentioned and honored in such article.