How MISTER emulation is redefining the art of resurrecting gaming’s past
The people driving open-source emulator MiSTer tell us how they’re reviving gaming’s past
Last Christmas, José Tejada encountered a weird issue in Contra. A player of his recreation of Konami’s original arcade PCB had reported that the music was playing too slowly if you compared it with the genuine 1987 hardware. The pitch was right, but the pacing wasn’t – and that, to Tejada, was very odd.
You’d be hard-pressed to find someone in the world with a better understanding of Contra’s PCB and its Yamaha YM2151 sound chip than Tejada, known as Jotego in retrogaming circles. A microelectronics engineer with a love of classic videogames, he’d become interested in reverseengineering the chips that defined the sound of many arcade games, computers such as the MSX range, and consoles such as Sega’s Mega Drive, so that he could simulate them perfectly on his PC. He’d painstakingly measured the voltages and timings of the original chips, figuring out exactly how they directed flows of data around them. To find his recreation not performing exactly as it should, then, was a surprise.
So Jotego dug once again into the minute architectures of Contra’s PCB and the YM2151, following connections between components until he found an anomaly in the way the real Yamaha uses the PCB’s power-distribution unit as a timer for its music. Jotego’s recreation had made a logical assumption about how the chip’s timer operates, and it didn’t match: the Yamaha timer was failing to properly reset itself as it looped. “So the Yamaha design was actually wrong, because the counter was out of control!” Jotego says. This tiny error, made decades ago when the chip was designed, was inserting random values into the timer which has meant that, ever since its release in 1987, Contra’s music has been running just a little faster than it was meant to.
This detail is the tiniest of footnotes in the annals of gaming history, but it shows the level of precision that modern recreations of old games, like those of Jotego, can reach. Or more specifically, recreations of old games running on MiSTer, an opensource retrogaming system using a programmable chip called an FPGA to recreate hundreds of different arcade PCBs, consoles and computers. MiSTer can run a PDP-1, Spacewar!, ZX Spectrum, DoDonPachi, PC Engine, a 486 PC, Neo Geo, Super Nintendo, Street Fighter II Turbo: Hyper Fighting; the list swells with each passing month, as its community of programmers and engineers makes new ’cores’ – sets of configurations for MiSTer’s FPGA which make it behave just like original hardware.
FPGA stands for ‘field programmable gate array’, and it sits at the heart of a fast-growing approach to emulation which differs from the typical software emulators that run on your PC (such as MAME and Dolphin), your Mega Drive Mini or your Switch (via Capcom Arcade Stadium). For enthusiasts, FPGA sells the dream of highly accurate and low-latency or even latency-free recreation of classic machines on modern TVs and USB devices. Connect a MiSTer to a responsive screen and good controllers and it delivers a remarkable sense of authenticity. Acorn’s BBC Micro feels like it did when you played on it as a child; so do the 16bit Amiga and 8bit NES, their every quirk preserved, for good and bad.
Today, emulation offers us easy access to gaming history. A Switch readily turns from running a round of Fortnite to Neo Geo game Samurai Shodown. RetroPie on a £35 Raspberry Pi 4 can run most games released up to Sega’s Dreamcast. But while RetroPie and Switch are arguably much more convenient, MiSTer is probably the most exciting development in retrogaming since the introduction of MAME in 1997.
New features, such as pixel-perfect display scaling, autosaving and add-on boards which support original controllers and Roland MIDI interfaces, arrive on the platform by the week. And its limits are still being tested. Currently the community is buzzing at the prospect of PlayStation and Saturn cores, once thought far too complex for MiSTer to take on, while Jotego’s CP System II arcade cores have opened access to classics such as Street Fighter Alpha 3, Darkstalkers and Giga Wing. MiSTer does not feature many of the common niceties of modern software emulation, such as save states and swollen lists of configurable shaders, but as a way to play ultra-faithful recreations of old hardware with modern equipment, there’s nothing like it.
Indeed, MiSTer’s devotees are adamant, perhaps to a fault, that neither RetroPie nor any other emulation system can hold a candle to the quality of that recreation. It’s very important, however, to note that FPGA hardware emulation does not automatically achieve ‘perfect’ accuracy. “That’s one of the most common pieces of misinformation I hear: ‘Super accurate, just like original hardware.’ It’s not true at all,” says Jamie ‘Kitrinx’ Blank, one of many developers active in the MiSTer project. FPGA-based emulation remains an abstraction – a simulation of the real thing. “FPGA cores are more accurate in some ways, but that’s because they can be made more accurate with less effort.”
In fact, software emulators can create results that are just as technically accurate as the finest recreations on FPGA. But what they cannot do is replicate the fundamental way original hardware works. Software emulators have to be timed to your screen’s refresh rate, and they must run every operation they need in a specific order, one at a time: the PPU ticks, it ticks again, then the CPU ticks. Each step executes very quickly, then the emulator waits for the 60th-of-a-second interval when the display requests a completed frame of video, and then it starts again for the next frame. By contrast, an FPGA core works asynchronously, just as each component in a real SNES or arcade board works in concert. The chunk of logic blocks that has been set up to behave as a sound chip runs at the same time as the logic blocks that are working as the CPU, and they take controller inputs as you press them, not at the point in the frame cycle when the emulator gives the controller bus its turn.
The trick for a FPGA core’s creator is to ensure that the timing of all its virtual components matches the real thing. “It’s like winding up a toy and letting it go,” Kitrinx says. ”If you set the timings right, it goes in the right direction.” All of the original hardware’s quirks, such as Contra’s sound anomaly (if you’d noticed the error and incorporated it in hardware description language, or HDL, the programming format a core maker writes), will simply exist. “If you stop a core quickly, sometimes you’ll get an image that’s half-drawn because we don’t wait for the display – we throw it out as the raster line moves,” Jotego adds. “We’re racing the beam.” Just as an Atari 2600 always did.
Still, software emulation can achieve accuracy, but only by making specific exceptions to account for the ways old games had to use the specifics of their hardware to achieve certain effects – things that come for free with FPGA. And every exception requires more processing time during the 60th of a second the emulator has to complete a frame of game action. That’s why software emulation requires a powerful computer running as fast as 2GHz to run an NES at full cycle accuracy, while MiSTer – whether running as an NES, a Neo Geo or a full 486 PC that supports Windows 95 – can reach cycle accuracy on an exceedingly low-powered device. “It allows a programmer to be more accurate if they’re willing to go down that rabbit hole,” Kitrinx says. “The result is that you get very detailorientated people making these emulators, and they can do so without a lot of compromises.”
The fine-grained distinction between software emulation and FPGA has been enough to launch a company. Marketing itself like a high-end audio maker, Analogue manufactures a range of extremely desirable consoles, each an FPGA recreation of a different system and designed to run games from its original media, from cartridges on Mega Sg (Mega Drive) and Super Nt (SNES), and soon HuCards and CD-ROMs on the forthcoming Duo (PC Engine). But though it uses the Altera Cyclone V, the same FPGA as all Analogue’s consoles, MiSTer takes a different approach. It’s not plug-and-play, to the extent that you have to assemble its parts, connecting them to a naked motherboard. “MiSTer is an enthusiast’s hotrod,” says SmokeMonster, a
THE COMMUNITY IS BUZZING AT THE IDEA OF PLAYSTATION AND SATURN CORES, ONCE THOUGHT TOO COMPLEX FOR MISTER
retrogaming streamer and early adopter of the project. By comparison, Analogue’s consoles are “like a car you buy from a dealership and you’re ready to go.”
MiSTer is a tinkerer’s device, an open-source platform for experimentation and celebration of old hardware, and it all stems from the day in 2015 when, in memory of a computer he used to work on, a Russian programmer called Alexey ‘Sorgelig’ Melnikov decided to buy an Amiga computer. Researching his purchase, he came across a project to recreate Commodore’s machine in its entirety on an FPGA. Called Minimig, it had been kicked off a decade before by a Dutch electronics engineer named Dennis van Weeren. By the time Sorgelig heard about it, the original project was long dead. But it lived on in another: MiST, which had started as an attempt to create a single platform for FPGA-powered recreations of 16bit computers such as the Amiga and Atari ST, but had since swollen to take on many more.
MiST was catnip for Sorgelig, who had started assembling radios, tape players and TVs from the age of 12, before moving on to build simple 8bit computers and port ZX Spectrum and Commodore 64 games to the BK0011M, a Russian 16bit computer. He learned how to write HDL so he could contribute new cores, such as one for the ZX Spectrum. A year later, though, he was getting frustrated. For one thing, the project was dying, based as it was on a commercially produced FPGA-based development board which was expensive and hard to get hold of. What’s more, computers output different video signals, and he couldn’t find a monitor that would support them all. “I had to use external converters and scalers to connect my TV and monitor,” he says. That’s where the kernel for MiSTer originated: what if there was a way make an FPGA board that could connect to modern displays? “So I got the idea to find a suitable FPGA board on the market, and with little modification make a retro platform.”
A big part of the MiSTer project’s success arguably comes down to Sorgelig’s choice to build it on Terasic’s DE10-Nano. At the time, this FPGA development board, which looks a little like a Raspberry Pi, was new to the market. Sorgelig reckons he was the first consumer to purchase one, and he had to teach himself about how to work with its odd hybrid design from example source code. But it proved ideal. Intended to promote FPGA development to programmers, the DE10-Nano’s price is heavily subsidised by electronics companies including Analog Devices (which, as it happens, is Jotego’s employer) and Panasonic, which cuts its market value to a far more affordable £120. Its Cyclone V FPGA chip sits alongside a more standard ARM processor. And it features an HDMI port and enough connectors to ensure that users don’t need to solder anything to get it up and running.
In June 2017, a year after conceiving the MiSTer project, Sorgelig released the first version of MiSTer, along with schematics for expansion boards which add analogue VGA and audio ports for playing on CRT screens. He’d created a framework which uses the ARM chip to manage the cores running on its FPGA, a bridge between old and new which feeds your PS4 controller inputs into a Vectrex, then sends the Vectrex’s video output into the back of your OLED TV. It can open network access to its file system, so you can easily manage its ROMs, and it handles saves. It gives instant access to a user-interface overlay that reveals a combination of MiSTer-wide and core-specific options, including simple scanline filters and scalers to make recreations of old games feel more authentic on modern displays.
“One of the hardest things is to get the core communicating with the outside world,” says Kitrinx, who works as a software engineer for a successful New York tech startup. “This is why I believe MiSTer is so successful, because all these things are abstracted away so the developer only needs to worry about the logic of the core, and not [about how] to get input and how to output video and sound, which are very complicated and not related to how the NES worked.” And, sure enough, MiSTer has grown ever since, with developers able to focus on recreating the specifics of their chosen systems. “I’m proud of the fact that the FPGA emulator is out of the marginal community,” Sorgelig says. “MiSTer gave a boost to FPGA emulation.”
In the early days, however, Sorgelig had to work to pull cores and developers such as Jotego into the project. Jotego’s work on Yamaha sound chips had led the maker of a Mega Drive core for MiST to ask him for help, because Sega’s console has a YM2203 sound chip. That led Jotego to make his own core for Capcom’s 1985 coin-op Ghosts ’n Goblins, because its PCB also features a YM2203 and its schematics had become public. “I don’t know how they got leaked – maybe a service manual?” Jotego says. “But it means you only have to verify a little on an actual board. As long as we have schematics, it’s straightforward to be accurate.” Sorgelig then converted his Ghosts ’n Goblins core to MiSTer, which pulled Jotego in with it. “SmokeMonster made a video which gave the Ghosts ’n Goblins core visibility, so I bought a MiSTer,” Jotego says. “It seemed to be popular.”
Another prominent core maker in the community is Furrtek, a French programmer and electronics engineer who, before MiSTer’s advent, had become concerned by the rising number of failing Neo Geo MVS arcade machines in circulation, the ravages of time causing their custom chips to break down. Replacements were increasingly thin on the ground, mostly only available by cannibalising from other machines, so Furrtek decided to translate them into HDL so they could either be run through FPGAs or be manufactured to keep machines running. “Then MiSTer came about and we roped him in,” says SmokeMonster, who by day is an archaeologist who specialises in Peruvian cooking pots. Within six months, a full Neo Geo core which supports both its arcade and home console flavours (a job made easier, in part, by the MiSTer framework) was released for the project. Well, mostly. “Furrtek got it close to the finish line, and then I guess he lost a bit of steam,” Kitrinx recalls. “He took no credit for it, but it was really Sorg who did enormous amounts of work to get it working on MiSTer.”
IT FEEDS YOUR PS4 CONTROLLER INPUTS INTO A VECTREX, THEN SENDS THE VECTREX’S VIDEO INTO YOUR OLED TV
currently unemployed – he releases updates and commits code on a near-daily basis. (“It’s my hobby. It’s something to let me rest from daily routine.”) Sorgelig has a steely focus on the project’s founding principles. He wants to maintain MiSTer’s cohesion, whereby each core accesses the same set of framework features and avoids special-case features that would add technical debt to the overall project. “In FPGA, more than software, additional code has a cost,” Kitrinx says. “It has to be maintained – it takes space in the FPGA; it makes timings more difficult. People ask for frivolous fringe features, and neither of us loves those.”
“It’s important to keep the project smooth without throwing to different extremes,” Sorgelig says. “As a completely open-sourced project, I know some forks exist for different purposes. Some advanced users feel they need DB9 joysticks, but 99 per cent don’t. Some other users make forks to work in an arcade cabinet with a CRT, and again, 99 per cent of users don’t need it. I stick to my original idea of using modern input and output devices, and carefully support all features with all cores. Some new developers come in full of energy to change the world and show what MiSTer should look like. What I can do is stand aside and let them use their energy to understand that the result will be the same as now.”
What some developers find difficult, though, is that Sorgelig hasn’t documented much of the MiSTer framework, which means that even the most experienced engineers sometimes have to ask him questions about how their cores should interact with it. He can seem rather withering in discussions, especially about features that diverge from his vision, resulting in the community moniker of ‘Angry Sorgelig’. In a pinned thread on the project’s forum, he explained that it’s because he has so little time to attend to every query that’s made. “I’m not angry, really,” he tells us. “Supporting is not my strong point. I like to explore. I don’t like to explain things that are obvious from my point of view. I’m also not much into social networks.”
It’s an affectionate caricature, for the most part. “I don’t know if it’s lost in translation sometimes, or it’s the Russian personality, but he’s pretty brash and terse sometimes,” says Josh ‘Nullobject’ Bassett, developer of various arcade cores including Rygar and DoDonPachi. “But if you reach out and chat to him, he’s superhelpful and almost friendly at times. But he’s very to the point, and a bit of a mysterious character in the community.”
“Look, Sorg is from Cold War Russia and he has some character traits that indicate that,” says Kitrinx, who knows him as well as anyone on the project. “He just generates tons of code. It’s a meme that developers don’t document things – it’s so boring compared to writing code – but he’s gotten better about it. And he can be argumentative. You’ll hear people with issues with him, and he’s pushing back and not really candy-coating it. But he is, and has been, very reasonable about the things he’s let in.” All projects have pressure points, and it’s clear that whatever difficulties core developers have, they’re not stopping them contributing to MiSTer in a fruitful way.
Unlike Minimig and MiST, then, the dwindled projects that led Sorgelig to this point, it doesn’t look like MiSTer is in any danger of dying out. Indeed, thoughts currently dwell on just how far MiSTer can go. Expectations were raised by Nullobject’s release of the DoDonPachi core in January, which is the first of a planned series of recreations of Cave’s 68000-based arcade games. Game Boy and Game Boy Advance cores, meanwhile, recently delivered one of FPGA gaming’s white whales: save states, which are notoriously hard to produce because the exact state of every component has to be recorded. Currently, MiSTer’s ao486 core, which performs at around the speed of a 486DX33, is probably the most demanding on the Cyclone V (yes, it runs Doom).
Ahead, though, lie two projects that will push MiSTer beyond expectations. Tokyo-based laxer3a is working on a PlayStation core, which looks likely to fit easily within the DE10-Nano’s FPGA. Instead, the challenge is the latency and bandwidth of the DE10-Nano’s memory, which may mean some games will never run perfectly or that various workarounds will be required. And Sergey ‘srg320’ Dvodnenko is working on a Sega Saturn core, an eight-processor system that many thought was simply too complex to recreate on the Cyclone V. But it’s unlikely MiSTer will support the N64 or beyond, even if it moved to a more powerful FPGA board. “Those projects, the amount of engineering those projects would take… PlayStation is reaching that limit in hardware constraints and also dev resources,” Nullobject says. “Arcade machines and old consoles are mostly solo projects because one person can wrap their head around them. But more modern consoles – entire teams designed them, so how can one person recreate them?”
“Eventually you hit the limit of manpower,” SmokeMonster agrees. “Technology is always improving and FPGAs are getting bigger, but in order to make a reverse-engineered PS3, you need as much manpower as Sony had. Two times, probably.” And that’s before figuring out how to implement the online services on which PS3 is reliant. In many ways, however, MiSTer’s strength is in its restrictions: what the DE10-Nano can support; what MiSTer’s volunteers can realistically collaborate on; and what Sorgelig allows in the framework. If MiSTer’s account of videogame history ends with PlayStation and Saturn, it merely gives its members the opportunity to continue to complete and refine computing history from its beginnings up to 1994. After all, there are still many consumer and arcade systems left to cover.
Holding a MiSTer, it is a wonder that such a small, delicateseeming thing can do so much. And yet, the DE10-Nano is replaceable. MiSTer’s real promise is in its community of developers, an international hotchpotch of particularly smart people brought together by a passion for gaming and computers. Their efforts to trace tiny signals on dusty hardware and deduce the decisions made by their creators decades ago is keeping these machines running, and also helping to preserve them forever. Because that’s another strength to FPGA: the HDL these coders create to configure each core can also be used to fabricate actual integrated circuitry. It’s an assurance that these systems, which birthed videogames and nurtured them into what they have become today, will never die.
MISTER’S PROMISE IS IN ITS COMMUNITY OF DEVELOPERS, AN INTERNATIONAL HOTCHPOTCH OF PARTICULARLY SMART PEOPLE