Stephen Smith's Blog

Musings on Machine Learning…

Posts Tagged ‘mister

Continuing the MiSTer Journey

leave a comment »

Introduction

Last time, we started our MiSTer journey and could run the various cores that didn’t require the add-on memory expansion module. I finally received the memory expansion board, so now theoretically I can run any of the MiSTer computers, consoles and arcade games. For game consoles, this seems to be the case as all you need is the software images from the original game cartridges, for computers it’s a bit more complicated.

MiSTer uses the FPGA to replicate the original computer hardware. This leaves out the software side of things. Typically, you then need the boot ROMs and operating system. Once you can boot the operating system, then you can run various programs such as games.

Further, many of these older systems are rather quirky and you have to spend a bit of time learning the system. First a quick recap of components I purchased and components I already had lying around.

Quick Recap

I have quite a few Raspberry Pi type Single Board Computers, so I generally already have a number of the components for these sorts of projects, so here is a summary.

Components I purchased:

Components I already had:

  • HDMI Monitor
  • HDMI Cable
  • USB Keyboard
  • USB Mouse
  • USB Nintendo Game Controller
  • 128GB microSD card (plus USB adapter to plug into a computer)
  • microUSB cord and plugin, for power to USB hub

Nintendo – The Easy Part

Copy the files from the Arcade Punks image for Nintendo, namely games/NES and games/SNES and you are ready to play pretty much any Nintendo or Super Nintendo game. Already having an USB Nintendo game controller is a big help as you don’t need to worry about mapping buttons, etc. With these, loading and running the games is pretty painless. You just need to remember F12 is the MiSTer button to bring up the menu where you load them.

Atari ST – A Bit More Work

I copied the games/AtariST folder from the Arcade Punks image to the microSD card, inserted it into the DE-10 Nano, booted and chose Computers / AtariST from the MiSTer menu. I then received a blank screen. Popping up the configuration menu and selecting a floppy drive didn’t help. A bit of Googling revealed I was missing the GEM operating system. Atari referred to this as TOS (The Operating System) and you need this. AtariMania seems to be a good place to get a copy of TOS. Choose the version and language you prefer and download. I chose 2.06 and US English. Then copy the .img file to games/AtariST and rename it TOS.img. Now when you boot, you should load into the GEM desktop.

Once you have the GEM desktop running, then you can press F12 to select floppy disk images. Some of the images you can open and run the program contained on the disk. Others you have to select reset to cause a reboots since they are bootable floppies. For instance, here is Apache running.

As long as you aren’t too picky this is fine, meaning try a game, and if it doesn’t work properly then ignore it and run another, after all there are lots to choose from. There is a bit of extra complexity being glossed over here. Generally if you want to run a specific game, there may be a bit more work to do. Here is a list of potential issues:

  1. Hardware version. There were quite a few versions of hardware with different memory and processors. A particular game may require a specific hardware configuration from the MiSTer configuration.
  2. TOS software version. A particular program may require an exact version of the TOS image. It may not work on either newer or older images.
  3. Many of the games were on copy protected floppy disks, these are mostly available in “cracked” versions meaning the copy protection has been removed. This process might have introduced bugs, hard to say the quality of any specific “crack”.
  4. Perhaps there is a bug in MiSTer? Completely modeling a computer as sophisticated as an Atari ST is a challenge. They seem to have done a great job, but bugs are still being fixed and functionality improved.

A key thing I found is patience. Loading some of these old games is slow and as I’m about to give up, suddenly it appears or starts. MiSTer claims to emulate the speed of the CPU exactly, but I’m not sure about floppy disks. They do seem slow, but then I don’t know if it’s the CPU running at 8MHz, the 1MB RAM or the slow floppy drive.

Summary

With each step I can run more things on my MiSTer system. Some are easy to get going. Others require patience. The MiSTer name was formed out of the Mi in Commodore Amiga and the ST in Atari ST. So I have the Atari ST part working. Now onto the Commodore Amiga which looks fun.

Written by smist08

June 14, 2024 at 12:11 pm

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 , , ,

LinuxFest Northwest 2024

with 2 comments

Introduction

LinuxFest Northwest is an annual gathering of open source enthusiasts held in Bellingham halfway between the major cities of Vancouver, BC and Seattle, Washington. Sadly, the last proper event was held in 2019, then during COVID they tried running a virtual event with limited success and then when COVID ended they were going to startup again, but there was a major structural calamity at the  Bellingham Technical College campus which caused it to close and LinuxFest to be canceled. Finally, this year, 2024, enough of the college is back open that the organizers were able to start the conference again. The main big building on the campus was still closed, but LinuxFest was able to spread across three of the smaller buildings to operate. It poured with rain for the entire conference which made people get quite wet when crossing between buildings.

This year I attended the conference both as an attendee and a speaker. 

Most of the presentations were recorded and are now available on LFNW’s YouTube channel.

RISC-V

There was a lot of interest in RISC-V, people are interested in getting hold of RISC-V development boards to play with. My session on RISC-V filled the room, so the monitors had to close the door when the fire department capacity was reached.

Judging from the questions, many in the audience have been playing with RISC-V already and getting quite far into it. Also nice to meet my readers as several people said they already have my RISC-V book.

Later, I chatted with the folks from Rocky Linux, who had a booth in the expo hall. They were given ten Starfive Visionfive 2s which they are going to use to set up a build farm to build native RISC-V versions of Rocky Linux. This is pretty cool, but they would really like beefier hardware, in that it will be quite slow to build everything from GCC, Linux, all the utilities and bundled programs to completion. But still nice to see more Linux distributions providing native RISC-V builds.

MiSTer

MiSTer was started as an Amiga/Atari ST hardware emulator using an Intel FPGA. Since then, the project has added hundreds of computer and gaming console hardware cores. Last time I blogged on my Tang Nano 25K and mentioned using it to emulate a SuperNES system. This is actually a port of just one MiSTer core over to the Gowin FPGA platform. There was a two hour talk/lab on MiSTer at the show presented by Scott Dowdle which showed real MiSTer hardware and he had three systems setup to play with.

It’s really amazing all the different computers that can be modeled on the FPGA along with all the classic software that can be run.

To run MiSTer properly, you need a Terasic DE10-Nano Kit along with a RAM add-in module. This board includes an ARM CPU along with an Intel Cyclone® V SE FPGA (110K LEs).

Ham Radio and Open Source

I attended Steve Stroh’s presentation on the parallels between the open source computer community and the amateur radio community. It was a good overview of all the things happening in amateur radio and how so much new radio technology is being developed by hobbyists in an open collaborative sharing manner.

Other Stuff

There were a lot of sessions and often multiple sessions I wanted to see were on at the same time. Now that I’m back home, I can spend some time watching the sessions I missed.

I did catch NextCloud’s session on AI, on how they are trying to do everything OpenAI and Microsoft are doing, but all running locally. Plus how to promote open source AI models so you know what you are running and have some control over it.

I attended Lomash Kumar’s presentation on IoT security. It is interesting on the extra security requirements on IoT due to the amount of communications and discovery between devices.

I attended Mumbling Hugo’s presentation on Linux gaming distributions. Hugo is actually quite a good speaker and not a mumbler. I think my main takeaway is that gaming distributions don’t add much and you may as well use a main line distribution.

Besides the sessions, there was the trade expo where quite a few vendors were present. The people manning the tables weren’t just sales people and were quite technical and interesting to talk to.

Thanks to System76 for sponsoring the hotdog bbq on Saturday. Always appreciate a free lunch, even if it means eating it in the pouring rain.

Summary

All in all, LinuxFest Northwest was well worth attending. I had a great time and learned a lot. Now I’m enthusiastic to attend SeaGL, the Seattle GNU/Linux conference coming up Nov. 8 and 9.

Written by smist08

April 30, 2024 at 1:26 pm

Posted in linux

Tagged with , , , ,