All About FPGA MiSTer: it's fun to play with an F.P.G.A

This post is for a video that’s coming soon, so keep an eye out if you’re interested!

Hey guys, it’s Editor Grant! A few months ago we did a video on emulation and the role it plays in game preservation. I’ve been emulating games since I was in fifth grade, but something has recently come to my attention that’s blown my mind a bit. It’s called the MiSTer project and it’s really changed the way I’ve thought about emulation.

So what is MiSTer? MiSTer is an open source hardware based emulation project using FPGA, or Field Programmable Gate Arrays. Instead of using software like conventional emulation solutions, MiSTer configures an FPGA to perfectly mimic the hardware of the original machine, leading to highly improved emulation with virtually zero inaccuracies. You know how sometimes the colors will be slightly off when you’re playing an emulated game, or sometimes the music doesn’t sound quite right? Well on MiSTer that’s not an issue since you’re basically playing on original hardware!

This all sounds cool, but what about specifics? Well, MiSTer can emulate quite a few older arcade boards like the Bally Midway MCR series (which includes games like Tapper, Rampage, and Spy Hunter), classic computers like the ZX Spectrum and Commodore 64, as well as a bunch of consoles up to the 16 bit era (SNES/Genesis). A Playstation 1 core was just released recently, and there are work in progress cores for the Sega Saturn and the Sharp X68000, among others. In theory, you can emulate any console using FPGA, but more powerful machines would require prohibitively expensive FPGA hardware, so most of the effort has gone toward older systems.

You may be asking yourself how exactly all of this works. MiSTer uses specifically designed “cores” that are written in a language called HDL, or Hardware Description Language. This language is basically a schematic in code form, which means the developers working on the MiSTer project have, in essence, reverse engineered the hardware of these consoles and written it into code, which is nuts! These cores are then put onto the FPGA, which rearranges itself to match the original hardware.

It may seem like there’s a lot going on (and there is), but you don’t need much to get started with MiSTer. The core of the project is the Terasic DE-10 Nano FPGA. The DE-10 is unique in that it not only is an FPGA, it also has an ARM processor, HDMI out, and enough onboard memory to power most of the cores, although to use some of the more modern cores like the Neo Geo AES/MVS you’ll need an additional SDRAM module. You’ll also need a 5V power supply, an SD card reader, a micro SD card, a monitor with HDMI support, a USB keyboard, and a micro usb adapter. Those are the bare basics, but keep in mind a lot of these games were built for a controller, so you’ll probably need one of those too. The ones from 8bitdo are great for retro games, but you can use a plain ol Xbox controller if you want, it’ll work fine. A USB hub board is also useful for more easily plugging in peripherals, and an I/O board is useful if you want to get analog video out of your MiSTer for an even more accurate experience. I would also probably recommend some sort of cooling solution since the DE-10 does get pretty hot, either a heatsink or a 40mm fan. There are also wifi modules and all sorts of cool accessories, but I’m focused on getting you up and running first.

Setup for the MiSTer is very simple. We’re going to use a utility called Mr. Fusion to install the MiSTer software onto our DE-10 Nano. (GitHub - MiSTer-devel/mr-fusion: Mr. Fusion - Universal MiSTer SD card image)

It’s actually a tiny custom Linux distro designed specifically to install the MiSTer software. How cool is that? All we need to do is download the disk image and use a program like balenaEtcher or Win32 Disk Imager to flash the firmware to our micro SD card, pop it in, plug in the DE-10, and watch it go.

Once that’s done, we’ll need to get cores for the systems we want to use. You could seek out individual cores, but I found a program that’ll install all of your cores and update them automatically. (GitHub - MiSTer-devel/Downloader_MiSTer: Tool for installing and updating MiSTer cores and other files)

Just download the program, run the .bat, and copy the folders that it makes to your MiSTer SD card. Then, plug in your MiSTer, connect it to the Internet, hit F12 to pull up the menu, go to scripts, and run the update_all script. It’ll take about 30 minutes, but once it’s done your MiSTer will be good to go.

When it comes to games, I’m not going to tell you how to get the files, but I will tell you how to use them. Drop any ROMs you have into a folder with the same name as the core you want to use (so SNES for SNES, etc), pop open the MiSTer menu, select your core and your game, and you’re up and running!

You may be asking yourself if all of this effort is worth it. After all, software emulation is cheaper, easier, and more readily available. Video games have become an increasingly important part of our culture, yet games preservation efforts, especially from the companies that own the games, are usually imperfect in some way. Even when using software based emulators like MAME, there are minor graphical and sound errors that aren’t present on real hardware; you’re not getting the exact same experience. With MiSTer, it’s about as close as you can feasibly get to real hardware. This is important as the original hardware is aging to the point that it may be difficult to find working systems in the future.

But again, is MiSTer for you? After all, even software emulation is usually close enough to perfect that it doesn’t matter for most people. Getting the experience as it was originally intended is great and MiSTer is certainly cheaper than tracking down original hardware, but it’s still a lot more expensive than a RetroPie setup. That’s a question you’ll have to answer for yourself.

And if you’re interested in stuff like this but don’t want to put your own system together, there’s a company called Analogue who makes FPGA based repro consoles. Their stuff is a great option if you only want to play on a specific system or two and don’t mind having to use physical carts. They also have an amazing handheld that plays everything from Game Boy to GBA to Atari Lynx games, all using the same basic technology as the MiSTer project. Stuff like this has made the last few years of the emulation scene more exciting than it’s ever been.

10 Likes

Do note that FPGA’s aren’t anything new. I bookmarked the Xilinx website (maker of FPGA chips, currently owned by AMD) back in the early 2000’s. Likewise Lattice Semiconductors. And I have various articles from Elector, a Dutch-based international electronics magazine I’ve subscribed to in the past, about FPGA starter boards. I think I actually have one of those boards, but I’ve put all that stuff in storage so no confirmation for a while :stuck_out_tongue:

4 Likes

I have a Digilent Cora Z7 board and used it twice, then gave up on VHDL. Does not compute in my head :frowning:

MiSTer…

2 Likes

Our NorthernWing is enjoying the 1998 version… :wink:

1 Like

Flip th

Flip that around - 1989 :face_holding_back_tears: I’m in the process of abandoning that idea for something modern despite all the work I put into it, because the theoretical maximum target frequency I could run at was ~300kHz. Kilohertz. That’s the nice thing about FPGAs - as long as you’ve written it in a reasonably intelligent way, you can migrate between any device with minimal work as long as it has the gate capacity.

But yeah, it looks like this particular project is targeting a Terasic dev board with an Altera Cyclone V on it, and the particular SKU they’re using appears to be pretty beefy at least.

I hope everyone that Clint/LGR exposes this understands that FPGAs aren’t processors, and they don’t ‘run’ code - VHDL + Verilog are hardware description languages, not programming languages, and they do exactly that: the actual project here is that they’ve reverse engineered the processors in these old game consoles (or at least enough of them that it can boot a ROM dump) and written that design out in VHDL. Which is awesome. It’s called a soft processor core in industry - Xilinx has MicroBlaze, Intel/Altera has Nios, there are ARM and RISC-V soft cores, etc etc.

3 Likes

Nitpick from me if this is getting written up for a video, the core of the project is the Intel/Altera Cyclone V SoC, which is on Terasic’s DE-10 Nano development board. :kissing: It just kinda sounds funny otherwise, like saying that the heart of your computer is the Asus Rampage IV processor.

2 Likes

Hmm 98 it was the last version of the documentation he he :slight_smile:
November 9, 1998 (Version 3.1)

1 Like

Noted! The video is done and should be out soon, but I’ll keep that in mind for the future! I’m a bit of a layperson so any corrections are appreciated.

3 Likes

Haha that’s just me being a grammar nazi because it’s what I work with on a daily basis. We don’t reverse engineer old game consoles but I’ve been porting stuff to Lattice parts for the last month.

Emulators are what got me into computers, I saw my friend play conker on a school computer and I wanted to do it too

1 Like

The wall looked familiar when it hit me, you are part of the L1T team!

You are officially a nerd now. Only nerds lurk on these forums. The moment you created an account here, you are now infected with a debilitating disease and start participating on threads on whether vim or nano is more superior, talk smack about emacs and argue about how much spaces should be in a tab. Over time, you will also grow a beard regardless of gender, that will eventually cover your neck and flecks of foodstuffs will remain there forever. Then you will come to fear light and be pale just stay inside your room.

3 Likes

I am! I’ve been an editor with L1T for almost six years now. This is the first video I’m going to be in for the channel and I’m excited for everyone to see it!

God if only I could grow a sweet beard, I lost that particular lottery LOL.

3 Likes

I feel you. Could only grow a moustache and a very sparse stubble.

I have a Mister been Using it primarily for Playing Turbo-Grafx CD and Sega CD games. Lot of underrated stuff that went under the radar when those consoles came out.

Also use it for Cave and NeoGeo arcade games.

I use a switch pro controller but have been considering SNAC for SNES and Sega.

Playstation has been better than I thought and can’t wait for Saturn

Legit curious if anyone has tried this over SNAC

2 Likes

So this is a thread that activates my almonds.

What are you all playing on your Mister?

Blazing star and Metal Slug 2 have been my jam lately it perfectly replicates the slow downs the games use.

I started writing a mister guide a couple of years back, not sure if I posted it.

But yeah mister is very cool. Ps1 recently released for it and Saturn is coming.

Amen to that brother, still, it’s not completely 100% free. I work with products that do have FPGAs in them, recently we learned we need to move from an older chip to a newer due to the older being EOL (a victim of the Covid chip shortage). It takes time to move everything over since all products needs to be verified separately, but six months is still miles better than a from-scratch product.

What I wish is for someone to take a FPGA and use it for a scalable open source video processing solution to work in conjunction with a OSSC. I call it the OS-SVC. (Open source scalable video converter)

Originally the intention for this was to integrate it to OSSC and allow a direct RGBHV with custom resolution scaling to 3G-SDI or 12G-SDI. But also it would act as an open source chyron by adding a ARM co-processor running a browser instance with alpha channel support.

I just need a hardware dev and software dev to make this a reality.

This was originally intended to be included in Games Done Quick’s workflow, but of course the tech lead of GDQ hates me now.

2 Likes

I assume something like this isn’t really relevant to that? Although it seems to be OOP, I’m sure there are successors…