# My first Zig project, NESkwik: A cross-platform NES emulator

**URL:** <https://ziggit.dev/t/my-first-zig-project-neskwik-a-cross-platform-nes-emulator/16617>\
**Category:** Showcase\
**Tags:** zig-0-15-2, llm\
**Created:** [July 9, 2026, 8:56pm UTC](https://ziggit.dev/t/my-first-zig-project-neskwik-a-cross-platform-nes-emulator/16617 "2026-07-09T20:56:52Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![LaBatata101](https://ziggit.dev/user_avatar/ziggit.dev/labatata101/32/6615_2.png) [@LaBatata101](https://ziggit.dev/u/LaBatata101)\
**Post date:** [July 9, 2026, 8:56pm UTC](https://ziggit.dev/t/my-first-zig-project-neskwik-a-cross-platform-nes-emulator/16617/1 "2026-07-09T20:56:52Z")

</div>

Around some time last year I’ve decided to give Zig a try and the best way to learn a new language is to build a project with it. So after spending some time thinking about what to build, I’ve decided to build an emulator because I was always curious to know how emulators worked, thus NESkwik was born. I’ve decided to do a NES emulator because it uses an 8-bit CPU which is a simple CPU architecture to implement.

I’ve tried to use the least amount of dependencies as possible, this lead me to creating my own immediate mode UI library with [Clay](https://github.com/nicbarker/clay) which turned out pretty great, if you’re curious to see how it looks to create some UI with it, you can take a look it [here](https://github.com/LaBatata101/NESkwik/blob/4931485fb8b55dd7db8f3113446678021d968dab/src/ui/gui.zig#L1665). The renderer of the project was built using SDL3.

Currently, the emulator has 5 types of cartridges implemented which gives around 1900 “playable” games, that’s the majority of the NES game library. Disclaimer: I’ve only tested a few games and did not play them from start to finish, so the 1900 number is very theoretical.

This was a very fun project to work on and is probably the first side project that I have finish, and it’s usable 🙂 .

So, if you ever need to play a NES game give NESkwik a try, it works on Linux, Windows, Android and maybe MacOS (haven’t tested it), here’s the link for it: [https://github.com/LaBatata101/NESkwik](https://github.com/LaBatata101/NESkwik).

### Media

 ![image](https://ziggit.dev/uploads/default/original/2X/a/a4db17112a008c999ced63b927978c0f638e47c8.png)  
 ![image](https://ziggit.dev/uploads/default/original/2X/7/7dc52bc1f804c109ba0323a1cf6b7000a582a783.png)  
 ![image](https://ziggit.dev/uploads/default/original/2X/6/641adec87fe9a5960cbe38a720a8e56dbd4e7c29.jpeg)

### AI / LLM usage disclosure

> I’ve used AI to help debug problems in the emulator code, there was a few typos in bitwise expressions that caused a lot of accuracy problems. And, to help increase the emulator accuracy to pass [Blargg’s ROM tests](https://www.nesdev.org/wiki/Emulator_tests).

> As for using AI to write code, I mostly used to write the UI code, which I refactored most of it because the code was just too bad.

---

<div class="post-metadata">

**Author:** ![ForeverZer0](https://ziggit.dev/user_avatar/ziggit.dev/foreverzer0/32/2443_2.png) [@ForeverZer0](https://ziggit.dev/u/ForeverZer0)\
**Post date:** [July 10, 2026, 1:16am UTC](https://ziggit.dev/t/my-first-zig-project-neskwik-a-cross-platform-nes-emulator/16617/2 "2026-07-10T01:16:58Z")

</div>

Awesome project! The integrated UI and ROM manager is a nice touch, and the aesthetic fits perfectly.

I was recently working on an NES emulator using Raylib and roughly following [this Youtube series](https://www.youtube.com/watch?v=nViZg02IMQo&list=PLrOv9FMX8xJHqMvSGB_9G9nZZ_4IgteYf) for learning how emulator works. Seeing your project makes me want to go back and finish it, as I kind of lost interest while implementing the PPU and chasing other project ideas.

While my actual experience writing emulators is technically only in Zig, I found it a to be the perfect language for this task.

---

<div class="post-metadata">

**Author:** ![LaBatata101](https://ziggit.dev/user_avatar/ziggit.dev/labatata101/32/6615_2.png) [@LaBatata101](https://ziggit.dev/u/LaBatata101)\
**Post date:** [July 10, 2026, 1:35pm UTC](https://ziggit.dev/t/my-first-zig-project-neskwik-a-cross-platform-nes-emulator/16617/3 "2026-07-10T13:35:29Z")

</div>

> I was recently working on an NES emulator using Raylib and roughly following [this Youtube series](https://www.youtube.com/watch?v=nViZg02IMQo&list=PLrOv9FMX8xJHqMvSGB_9G9nZZ_4IgteYf)

I’ve also watched this same series while making the emulator.

> I kind of lost interest while implementing the PPU and chasing other project ideas.

The PPU is probably the hardest part of the emulator to get it right, I had to look at other emulators implementations to see what I was doing wrong.

But don’t give up, is very cool when you see the image of the game pop-up on the screen after all the work.
