Stephen Smith's Blog

Musings on Machine Learning…

Posts Tagged ‘galaxians

Getting Started with MiSTer

with one comment

Introduction

Imagine you could have a small Single Board Computer (SBC) with programmable hardware that can be configured to run as any personal computer, gaming console or arcade machine created before 1990 or so? This is what the ambitious MiSTer project sets out to do and largely accomplished. The project is mainly driven by gaming enthusiasts who want more accurate game play than running in a software emulator, but these systems can run any software these PCs run. I first encountered MiSTer when I purchased a Sipeed Tang Primer 25K FPGA to play with creating RISC-V cores in System Verilog. However, one of the fun things the Tang Primer does, is run a ported version of both the MiSTer SNES and NES systems.

I then attended a session on MiSTer at LinuxFest Northwest and was completely blown away with how much MiSTer has accomplished. Scott Dowdle gave a great session and showed several MiSTer systems in action. He made everything look easy and I looked to set up a working MiSTer system of my own. However it is quite a DIY process. You can buy a complete system, but availability seems to be limited and they are quite expensive. This blog post covers the start of my MiSTer journey.

First Step – Buy the Hardware

The official MiSTer FPGA board is the Terasic DE10-Nano Kit. There are ports of parts of the MiSTer system to other boards, but if you want to run everything this is the board to get. Scott Dowdle recommended buying this directly from Terasic, but being Canadian, this gave me a terrible exchange rate and expensive shipping. I found it better to buy from Digikey Canada where I got a much better deal all around, including free shipping via FedEx.

With this board alone, you can run some of the simple systems such as the Apple II, however you can’t run anything much newer such as the Atari ST or Commodore Amiga. For these you need a memory expansion board. I ordered one from MiSTer Addons. The problem here is that they seem to have discovered the worst shipping company in the world, namely GlobalPost, who have spent two weeks moving the package from Idaho to LA, CA. Now they’ve given it to the US Postal service. If MiSTer Addons had just shipped by regular post, it would have been way faster and cheaper. I still don’t have the memory expansion board, but at least I can run a few simpler systems.

Second Step – Install Software (and buy more hardware)

The DE-10 runs MiSTer from a microSD memory card. To install MiSTer on the microSD card, you burn an image from Mr. Fusion which installs a minimal image, and after rebooting will download more from the Internet.

Doing this from a Windows PC is a pain because, without extra software, Windows can’t read Linux file systems and MiSTer uses a small Linux kernel to control everything. If you burn Mr. Fusion on Windows, then after burning the card isn’t readable and fails the verify step. I found dealing with the MiSTer microSD card from MacOS way better as everything just works.

After you burn the microSD card, you boot the DE-10, it comes up with the menu. To configure the system further you need to connect a keyboard to a USB port. Usually an easy thing, but not here.

The DE-10 doesn’t have standard USB-A or C ports. Instead it has microUSB ports (two different types) and comes with cables to connect these to your computer, to allow you to program the FPGA. The problem then is that this results in a male USB connector and keyboards have male USB connectors. Hence you need either a female to female adaptor or as recommended a USB hub that connects to the correct microUSB port type. Fortunately you can order a reasonable hub from Amazon for $13.00. You can order a better USB hub from Mister Addons, but theirs is $80USD and the shipping seems to take a month. Anyway the hub from Amazon arrived in a couple of days and works fine. Note that it is required to be powered, the DE-10 doesn’t have enough power.

Once the keyboard is connected, you can configure WiFi. The DE-10 doesn’t have built-in Wifi, so you need a USB Wifi dongle. The one I have wasn’t recognized. I could connect an ethernet cable, but then I would have to move everything upstairs. Instead I found the MiSTer Downloader PC Launcher which lets you update the microSD card from your laptop. Again, I needed to use a MacBook as it has no problems with dealing with Linux file systems. This step adds all the MiSTer engines. Basically, the System Verilog code to reproduce the desired computers, but without any software to run.

One way to get lots of software is to download the Arcade Punks 1TB MiSTer image. It took a couple of days to download this. I only have 512Gb drives in my laptops, but do have a 5TB external drive, so I could download to that. Then it took 8 hours to decompress the file. Then I could mount it on the MacBook (by double clicking on it) and access the files. The biggest microSD cards I have are 128Gig, so I just copied a few files from the Arcade Punks image to play with.

Actually Playing Games

Without the memory expansion board, I can only run a few 8 bit systems. I played with the Apple II and the Atari 5200. With these I could play a number of classic games. I don’t know how to take screenshots with MiSTer, so I took photos of the monitor with my phone. Back in the day I owned an Apple II+, so I remember playing many of these games back in the day.

Castle Wolfenstein on the Apple II.
Zaxon on the Atari 5200.
Galaxians on the Apple II.

Summary

MiSTer is a lot of fun to play with. But it is DIY and takes a bit of patience to get working. The community is great, so you can get help online. I started with this article without the memory expansion board, since I figured it would be long enough. I look forward to moving on to some of the new systems like the Amiga and Atari ST in the weeks ahead.

Written by smist08

June 7, 2024 at 1:43 pm

Posted in fpga, gaming

Tagged with , , ,