What's remarkable about pspMAME?

pspMAME is not a Mame4All, Mame4Many or Mame4Few. In other words, it’s not a stripped-down arcade emulator that shares some code with MAME. It is MAME 0.97 - the full Windows program from June 2005 - running on a PSP screen.

Even modern Chinese handhelds generally only have access to downsized versions, such as AdvanceMAME. But pspMAME is the real deal.

Screenshot

Is that precisely why it runs so poorly, though? This MAME port is notorious for its slowdowns, even when emulating games from the early 80s. But the poor performance has little to do with the emulator, the PSP hardware or even the specific port. pspMAME has the potential to be one of the better arcade emulators on any handheld, and even just limited tweaks can make it significantly better.

A bit of emulation history

TMK - the Japanese developer who created the port - released the first version in June 2005, and updated it regularly until August of that same year. After that, nearly five years of radio silence followed. TMK came back to his emulator in 2010 for two minor updates (for old times’ sake, presumably) in February and March 2010. And that was it. The source code for version 0.5 is archived here, but it is effectively still stuck where it was in August 2005.

A Brit by the name of MikeDX picked up TMK’s code in April 2006, but he gave up after a single release, having achieved nothing much in the process.

Takka - another Japanese coder, better known for his fork of gpSP - also released builds of pspMAME on his website. But despite claims to the contrary on western PSP websites, he did no work on the emulator - he simply recompiled TMK’s code for newer firmware versions.

Kindergarten devs

Screenshot

As it turns out, somebody did work on pspMAME a fair amount. But their work is pretty obscure, and it is only by chance that it wasn’t completely and irretrievably lost. The PSP Development Kindergarten coding group (PSP開発幼稚園) created custom builds of pspMAME for over a year, from late 2006 to October 2007. Rather than creating an emulator compatible with everything and optimized for nothing, they wisely decided to focus on specific arcade boards, like the Namco System 1/2 or the Taito Asuka.

Yet for whatever reason, neither Japanese nor Western scene websites picked up on their releases - and their self-hosted files turned into 404 pages long ago. So most of their work is now lost, save a couple of builds and a single repository backup from November 2006.

Accidental preservationist

That would be the end of the pspMAME story, if not for Repuken2. The best that can be said about the guy is that he had more good intentions than coding skills. As he put it in the release thread back in 2010, he simply wanted the Simpsons game on his PSP, and got tired of waiting for others to do it.

By some miracle he found the source code of the PSP Development Kindergarten version of MAME, and proceeded to replace files, code blocks and more generally make a mess of the repo, until he unilaterally declared victory and retreated from the project after three releases. But he did share the source code of his work, after someone asked for it. It is this broken, heavily redacted fork of pspMAME that survives today.

Picking up the pieces

Despite the sorry state of the repo, this is still a full, real version of MAME we are dealing with. And because of that, there are lots of additional features already implemented in there, just waiting to be activated. Save states, for instance. The code was already there, but nobody had yet added the relevant options to the menu.

Screenshot

There are additional benefits as well. I don’t know how, but the Kindergarten devs managed to squeeze quite a few extra FPS from TMK’s emulator, without having to give up quality.

Armed F: from 18 FPS to 30

Screenshot

Screenshot

Momoko: from 40 to 52

Screenshot

Screenshot

City Connection: from 40 to full speed (80 FPS if not limited)

Screenshot

Screenshot

City Connection was the game that led me to fix the throttle option - one of the many that were broken in Repuken2’s version.

Another benefit is the support for the extra memory on the PSP slim. For whatever reason, even TMK’s 2010 recompile offers no support for the full 64 Mb. Adding it means that many more games can now launch.

Altered Beast

Screenshot

Blandia

Screenshot

Afterburner and Out Run will launch, but they are still too slow to be remotely playable.

Screenshot

Screenshot

Killing sound

A somewhat extreme solution to address laggy framerates is to replace the sound CPU with a dummy. The outcome of this measure depends entirely on the game.

Armed F and The Simpsons gain over 10 FPS

Screenshot

Screenshot

For Out Run, killing the sound CPUs barely moves the needle.

Screenshot

Lead image: 4play1981 from YouTube.