CHIP-8 emulator in Rust: Embedded port. Part 2

This post is the continuation of CHIP-8 emulator in Rust. Part 1, please check it if you haven’t already! In this second part I will explain how I ported the CHIP-8 emulator I built in Rust to an embedded ARM microcontroller. I will explain the hardware I chose to build this portable CHIP-8 device, the Rust libraries I used and I’ll give an overview of how the code is laid out.

NFS server over WireGuard in Alpine

I have recently built a new storage server at home consisting of 6x2TB hard drives configured as RAID-Z2 with ZFS. For the operating system I have chosen Alpine Linux, which is a distribution that I really like for its lightweightness and its simplicity. Previously I had a storage server running Debian which I was sharing via sshfs. sshfs is really easy to set up, as you just need to be running an ssh server, nevertheless it has some disadvantages:

CHIP-8 emulator in Rust. Part 1

I have been interested in the topic of emulation for many years; in particular, game console emulation. I started playing games under emulators when I was a teenager and I was fascinated by how a piece of software would let me play a game in a completely different architecture than the original one. I’ve you’ve ever been interested in learning about emulation, maybe you’ve learned about the CHIP-8; a specification of a simple virtual machine designed to play 8bit 2D videogames in the mid 1970s.

Thinkpad Helix 2 with Linux

Preface Recently I’ve bought a second hand Thinkpad Helix 2nd Gen with the intention of using it mainly as a tablet to read PDF documents and comics (although I may use it for Internet browsing and occasional development). I like running free software on my computers and so I decided to use GNU/Linux with this tablet/laptop. Here I will explain all the issues I encountered and how I solved them.

Pulseaudio for multi-user Linux

My setup For some time I’ve been using several unix users for my daily work in my desktop computer. After trying out Qubes OS for some time (an OS that achieves security by compartmentalization: different kinds of activites are performed in a different VM, isolating the data of each activity from each other), I came back to GNU/Linux and realized that there’s already a security separation in Unix (albeit not as secure as virtualization as in Qubes): users.

Programming Game Boy Chinese cartridges with an STM32F4

Introduction For the past few years I have been interested in the Game Boy: I’ve written an emulator in C (without sound), I developed a physical cartridge “emulator” using a microcontroller, and most recently I’ve built a project to interface my PC with the Game Link. I’ve also played a bit with Game Boy programming. In the past I considered buying a Game Boy flashcart so that I could run demos and other scene ROMs on real hardware comfortably, but the price of such carts is a bit high.

Printing on the Game Boy Printer using an STM32F4

In this third and final part of the project about the Game Boy serial communication I will explain how I managed to print on the Game Boy Printer from my PC using an STM32F4 as the bridge between the two. The encoding of the image into Game Boy tiles will happen on the PC, which will send it to the STM32F4 following the packet format of the Game Boy Printer. The STM32F4 will only forward the data to the Game Boy Printer.

Virtual Game Boy Printer with an STM32F4

In this second part of the project about interfacing the Game Boy serial communication with an embedded development board I will explain how I built a Virtual Game Boy Printer. The embedded board will be simulating a real Game Boy Printer, replying to the Game Boy following the protocol used by the Game Boy Printer so that the Game Boy sends the entire data meant to be print. This data will then be forwarded to my computer which will construct a PNG image out of it.

Sniffing Game Boy serial traffic with an STM32F4

In these series of blog posts I will write about the Game Boy serial communication protocol and how to interact with it by using an embedded development board. The code for the development board will be written in C, and the code running on the computer will be written in Rust. The first part will consist on understanding the Game Boy serial communication protocol, becoming familiar with embedded development using the libopencm3 free/libre library and finally building a serial communication sniffer to capture the transmission of data on the Game Link Cable.

Enabling LUKS on the PocketCHIP

Introduction I’ve recently acquired a handheld ARM computer with screen and keyboard called the PocketCHIP. The main board on the device is called the CHIP, which is a tiny ARM computer capable of running Linux that is sold for $9. After flashing it with the CHIP 4.4 GUI OS, a flavor of Debian released by Next Thing Co (the company that made the PocketCHIP) I noticed I wasn’t able to mount LUKS-encrypted partitions due to missing kernel modules.

See all articles