analog-hors - projects - writing

Stuff I've written

Also check out my RSS feed if you use that.

Writing an NES emulator: Part 1 - The 6502 CPU

Analog Hors    2023-04-02

After an immense amount of time of not sticking with a project, I finally decided to pick up writing an NES emulator again, a project which I dropped years ago. I'm not really sure I'll pull through with it this time, but I did get the CPU implemented: The ubiquitous MOS Technology 6502.

Magical Bitboards and How to Find Them: Sliding move generation in chess

Analog Hors    2022-09-24

Efficiently generating moves for sliding pieces is a tricky problem in chess programming. The obvious strategy is to iterate in each movement direction one square at a time until an obstruction is reached. However, there is a much, much faster way: Magic Bitboards. This article explains the theory, goes through a simple implementation, and notes improvements made in real-world code.

Unless stated otherwise, content on this website is licensed with CC BY-NC 4.0. Source code is licensed under the MIT license. Cited materials belong to their respective owners.

Like what I do? Support me on Ko-fi!