Category: Emulators
Yet another architectural update for Play Kid
My Game Boy emulator gets yet another architectural update to drop the pixels dependency. This is the final one. I promise, maybe.
I finished my previous post on Play Kid, only two days ago, with the following words:
Next, I’ll probably think about adding Game Boy Color support, but not before taking some time off from this project.
Yeah, this was a lie.
Game Boy emulator tech stack update
Play Kid update from SDL2 to a modern Rust stack using pixels, winit, and egui
0.2.0, which uses pixels to create and manage the pixel frame buffer. Since then, versions 0.3.0 and 0.4.0 have been released, which dropped pixels in favor of rendering directly to a texture. See this write-up for more information.In my previous post, I shared the journey of building Play Kid, my Game Boy emulator. At the time, I was using SDL2 to handle the “heavy lifting” of graphics, audio, and input. This was released as v0.1.0. It worked, and it worked well, but it always felt a bit like a “guest” in the Rust ecosystem. SDL2 is a C library at heart, and while the Rust wrappers are good, they bring along some baggage like shared library dependencies and difficult integration with Rust-native UI frameworks.
So I decided to perform a heart transplant on Play Kid. For version v0.2.0 I’ve moved away from SDL2 entirely, replacing it with a stack of modern, native Rust libraries: wgpu, pixels, egui, winit, rodio, and gilrs:
Implementing a Game Boy emulator
Write-up about Play Kid, my own homegrown Game Boy emulator.
0.1.0, which works with SDL2. Since then, version 0.2.0 has been released. This new version uses Rust native crates like winit, egui, rodio, and pixels. See this write-up for more information on the new version.When I was a kid my parents got me and my brothers a brand new Game Boy. I used to play it a lot, and I was mesmerized and amazed at how such a tiny brick could give life to so many wonderful worlds. Some of my favorite games were Super Mario Land (1, 2, and 3, Wario Land), The Amazing Spider-Man, and Kirby’s Dream Land. We also had some other games, like Bugs Bunny Crazy Castle or Tetris, that I also played quite a lot. I remember fondly too.
Implementing a CHIP-8 emulator
Writing a simple emulator from scratch is fun: rCHIP8
I’ve written about the CHIP-8 machine before. It is a very simple interpreted programming language that can be implemented without much hassle by anyone interested in getting their feet wet with emulators. It is commonly regarded as the “hello world” of emulators.
Some time ago I decided to implement a CHIP-8 emulator in Rust as my second project written in that language. My first foray into the language was the porting of the Gaia Sky LOD catalog generation tool from Java. This allowed us to substantially increase the generation speed and dramatically (really) decrease the memory consumption of the processing, to the point where a processing that previously needed more than 2 TB of RAM could now be done with less than a hundred gigs. Back to the topic at hand, I called my implementation rchip8 (very creative). This post describes the process and structure of such an emulator with more or less detail.