Last time time we took a quick look at MiSTer FPGA (read it here), and what it can do, but we didn’t really talk about how it works, and what makes it so special. This time we’ll try to do just that.
FPGA
Before we talk about MiSTer itself, we need to talk about FPGA. The acronym stands for Field Programmable Gate Array. Let’s look at what all these words mean.
Field Programmable
FPGA is an integrated circuit, that can be programmed indefinitely after production. In other words, you can think of it as a computer chip, that can morph into other computer chips in a relatively short period of time.
Re-programmability is the thing to know about FPGAs, if you don’t want to learn anything else about them. That is the “Field Programmable” part.
The “Field” here can be thought as your own home, or most likely it was meant to be understood as the location where some kind of an electronic device is running and serving users, such as a mobile phone link tower.
Gate Array
“Gate Array” part is more harder to understand, at least for non-technical people. The really short and limited explanation is, that the gates in the Gate Array are the thing that holds the programming of the integrated circuit, and are the thing that can be re-programmed.
Even software developers might have difficulties understanding what a Gate Array is, because this kind of hardware programming is a whole another world from software programming. This is not the whole truth though. Both FPGA and software programming is about logic: how to make your ones and zeroes flow and transform in your application. Software development nowadays just has so many layers on top of the actual ones and zeroes logic, that a software developer doesn’t really a need to know the insides of their program to make it work.
FPGA programming also has high-level programming languages that hide the details from the developer, but an FPGA developer actually needs to understand the insides of the hardware they are working with.
A Gate Array is made of different type of logic gates:
AND Gate: This gate outputs a high signal (1) only when all of its inputs are high (1).
OR Gate: The OR gate outputs a high signal (1) if at least one of its inputs is high (1).
NOT Gate: The NOT gate, also called an inverter, changes a high signal (1) into a low signal (0) and vice versa.
NAND Gate: The NAND gate is like an AND gate followed by a NOT gate. It outputs a low signal (0) only when all of its inputs are high (1).
NOR Gate: The NOR gate is like an OR gate followed by a NOT gate. It outputs a low signal (0) if at least one of its inputs is high (1).
XOR Gate: The XOR gate (exclusive OR) outputs a high signal (1) if an odd number of its inputs are high (1).
XNOR Gate: The XNOR gate (exclusive NOR) outputs a high signal (1) if an even number of its inputs are high (1).
There are also something called flip-flops: components to store your ones and zeros. Then there are Look-Up Tables or LUTs, which are like cheat sheets, where you can store pre-calculated values for given inputs.
The gates, flip-flops, LUTs, etc are logic elements (LE). The interconnections of all these form the configuration that can be re-programmed. Logic element count is one way to describe the capabilities of an FPGA. For example the FPGA used in the MiSTer, the Terasic DE-10 Nano, has 110K LE. For comparison, the Analogue Pocket handheld console has an Altera Cyclone V FPGA, with 49K LE.
MiSTer FPGA
History
The MiSTer project was created by Alexey “Sorgelig” Melnikov. It was introduced on 2017, and it is based on the MiST project, which was FGPA recreation on Amiga and Atari ST. The original name MiST comes from Amiga/ST.
Running console and computer recreations
As stated previously, the MiSTer FPGA has a Terasic DE-10 Nano FPGA. It has a small form factor, just about the size of two credit cards. MiSTer on its own does not emulate or reproduce any game consoles, or computers. You need to have something called a “core”, to get things running. The core is the programming for the FPGA. As we learned in the previous post Introduction to MiSTer FPGA - A retro video game console, there are a lot of old video game consoles and computers that the MiSTer can emulate / reproduce. All these have their own core, and all of them are community programmed. Quite a feat!
MiSTer cores can be downloaded for example from their GitHub repositories. Here you can find links to the console and computer cores:
Note that there are utilities to download all relevant cores without a hassle, so you really shouldn’t download them manually. The Update All script is the one to use: Update_All_MiSTer. Transfer the script to your MiSTer, and run it using the menu system. To get games running you also need the ROMs.
Connectivity and peripherals
The DE-10 Nano board also includes an dual-core ARM processor, and on the MiSTer it runs a Linux distro when the device booted up. This provides a menu system to choose which core to run, and for example to run an FTP server to transfer files from your computer to the MiSTer. You can connect to the network using a LAN cable, or use a USB WLAN dongle. The board itself does not have a WLAN interface.
To be able to connect USB devices, you need to have a separate USB hub. Below are to pictures of my DE-10 Nano with the USB hub. The two boards are connected with a small connector, which is somewhat visible on the image on lower the left side.
You can connect modern game controllers such as Xbox and PlayStation controllers via USB and Bluetooth (if the controller supports it). You can even get more nostalgic and get one of those retro controllers, for example from 8BitDo. Button configuration can be set per core. Mouse and keyboard also work as expected, so you can play those old PC point-and-click adventure games just as they were intended.
The files needed to run MiSTer (the Linux distro, the cores, and ROMs) are installed on a Micro-SD card, which is inserted in the DE-10 Nano board. A USB-disk can also be used to store at least the ROMs.
Is it an emulator?
The question people often ask is: why should I get a MiSTer FPGA, which costs hundreds of dollars to build, and not just a Raspberry Pi with some emulation software on it? Well, there isn’t really a universal answer for this. There are some points that might construct your own answer:
The MiSTer is not emulating the systems
The MiSTer reproduces the systems on hardware level
It is more accurate in modelling the old systems than software emulation
It has a vibrant community, and there’s always something new brewing (like the Nintendo 64 and Sega Saturn cores right now)
What ever your own answer is, enjoy gaming! I know I will.