Still working on the site, some things may be broken

Chip 8

Posted 8/17/2024

Tags: Emulation, C, SDL, Rust

Chip8 Interpretter

The Tech Stack

This emulator was written fully in C and used the SDL2 framework for the graphics library, it was then compiled with CMake using a guide I found online.

I wanted to use C again since I hadn't used it in a long time, instead opting to use higher level languages like python and javascript instead. So I wanted to see if I still knew how to write C effectively. After finishing up this Chip8 interpretter I still don't know how good my C is since I avoided using pointers, not intentionally, but because I never ran into a scenario where I believed that it would have been necessary to use them. Looking back this may have created issues since tests from various test ROMs all pass but the interpretter is still buggy and not working properly on certain games.

For the second emulator I wanted to use Rust. This is for two main reasons, the first is that I enjoy working with new toolsets and seeing what they can offer in comparison to other ones. For rust specifically I liked the idea that the language is a lot stricter when it comes to mutability and memory allocation, especially in comparison with C where you can just shoot yourself in the foot and the compiler doesn't even blink. I'm still getting the hang of writing rust code but so far I am enjoying it, even the detours to understand why certain things are the way they are and encountering rust features such as lifetimes along the way. I also found the way rust sets up unit testing to be really intuitive and easy to work with, which has so far made it far easier to incorporate tests compared to the Chip8 emulator.

Write up still in progress


Contact me

Design by @im.josh