Pixels May Jitter Computer graphics ramblings, randomly sampled.

CHIP-8 Emulator

Thought it was a fun idea to implement a very basic emulator so I did just that! My CHIP-8 emu can run most vanilla ROMs without problems. It’s a simple 8bits computer with a rather reduced instruction set, so it wasn’t too much pain to get things going.

I used the publicly available ROMs for testing as well as a bunch of custom unit tests. I have to say it was a fun little side projet, especially since I didn’t have to write any of the games for it, just load that ROM and here we go!

As usual, the source code is available on GitHub.

If you want to join the fun and make your own, here’s a rather complete documentation to get you going!

Here are a bunch of screenshots:

Release: Unofficial Vulkan API Manpages

I still find good old manpages really useful for coding, their long lifetime made them reliable and well integrated into a lot of tools (vim in my case). What’s more satisfying than accessing the exact doc you’re looking for in a couple of keystrokes? It’s hard to go back to browsing HTML docs after that…

Imagine the sadness when Khronos stopped supporting the vulkan API manpages! Long story short, I tried to add the support upstream (see PR #839), ended up keeping an unofficial fork and released something usable there (formatting is still weird sometimes).

As usual, the source code is available on GitHub. There’s also a vulkan-man-git package on AUR if you’re using Arch Linux.

Weekend Raytracer Project

Raytracers are one of those cool programs that you can write in a few hours and already have something fun to play with. I never got to write one at school so I figured I would spend a day or two and get one going!

Because many other sources recommend it, I downloaded Peter Shirley’s book Ray tracing in one weekend and gave it a go. Even though I was familiar with the concepts, it was a good exercise and also surprisingly fun!

I’d really recommend this book since it gives you enough knowledge to get things going without drowning you into too much implementation details. You’ll get to practice basic matrix transformations, ray intersection maths, random distributions, surface shading amongst other topics.

As a reference I’ve put the full source code of my implementation on GitHub.

Release: AMD GCN ISA Syntax Highlighting for Vim

I got into low-level shader optimizations lately, and realised that not many tools are provided for the job. Since i’m looking at GCN assembly regularly now, i used the occasion to write a decent syntax highlighting for it inside vim.

That way i got to go through the whole GCN ISA document (props to AMD for having the only public GPU ISA out there) as well as learning some vim scripting basics!

You can find the plugin on GitHub.

Writing a simple syntax plugin for vim was overall a pleasant experience, and i strongly recommend taking a look at AMD’s GCN3 ISA document if you care about performance (or just GPU architecture in general).