<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Low-Level Programming on AI VOID</title><link>https://ai-blog.noorshomelab.dev/categories/low-level-programming/</link><description>Recent content in Low-Level Programming on AI VOID</description><generator>Hugo</generator><language>en</language><lastBuildDate>Tue, 05 May 2026 00:00:00 +0000</lastBuildDate><atom:link href="https://ai-blog.noorshomelab.dev/categories/low-level-programming/index.xml" rel="self" type="application/rss+xml"/><item><title>The CPU Core: Registers, Flags, and Basic Instructions</title><link>https://ai-blog.noorshomelab.dev/game-boy-emulator-fsharp/cpu-core-registers-flags-basic-instructions/</link><pubDate>Tue, 05 May 2026 00:00:00 +0000</pubDate><guid>https://ai-blog.noorshomelab.dev/game-boy-emulator-fsharp/cpu-core-registers-flags-basic-instructions/</guid><description>&lt;h2 id="introduction"&gt;Introduction&lt;/h2&gt;
&lt;p&gt;Welcome to the foundational stage of our Game Boy emulator! In this chapter, we&amp;rsquo;re going to construct the very brain of our system: the Central Processing Unit (CPU). The Game Boy uses a custom 8-bit CPU, often referred to as the &amp;ldquo;SM83,&amp;rdquo; which is a hybrid between a Zilog Z80 and Intel 8080. Understanding and accurately emulating its behavior is paramount to running any Game Boy software.&lt;/p&gt;
&lt;p&gt;This milestone is critical because every single action within a Game Boy game—from moving a character to calculating damage—is ultimately a sequence of CPU instructions. Building the CPU core correctly is non-negotiable for a functional emulator. By the end of this chapter, you will have a functional, albeit minimal, CPU core capable of storing its state (registers and flags) and executing a few fundamental instructions. This forms the bedrock upon which we&amp;rsquo;ll build memory access, graphics, and more complex logic.&lt;/p&gt;</description></item><item><title>Memory Management Unit (MMU) and Basic Memory Access</title><link>https://ai-blog.noorshomelab.dev/game-boy-emulator-fsharp/mmu-basic-memory-access/</link><pubDate>Tue, 05 May 2026 00:00:00 +0000</pubDate><guid>https://ai-blog.noorshomelab.dev/game-boy-emulator-fsharp/mmu-basic-memory-access/</guid><description>&lt;p&gt;The CPU you started building in the last chapter is blind without memory. It can execute instructions, but it can&amp;rsquo;t load programs, store data, or interact with any of the Game Boy&amp;rsquo;s peripherals like the screen or sound chip. This is where the Memory Management Unit (MMU) comes in.&lt;/p&gt;
&lt;p&gt;This chapter guides you through creating the Game Boy&amp;rsquo;s core memory system, the &lt;strong&gt;Memory Management Unit (MMU)&lt;/strong&gt;. You&amp;rsquo;ll learn about the Game Boy&amp;rsquo;s memory map, how to model different memory regions, and implement the fundamental &lt;code&gt;readByte&lt;/code&gt; and &lt;code&gt;writeByte&lt;/code&gt; operations crucial for any emulator. By the end, your emulator will be able to load a Game Boy ROM into its virtual memory, a significant step towards running actual games.&lt;/p&gt;</description></item><item><title>Audio Processing Unit (APU) Basics: Square Wave Channels</title><link>https://ai-blog.noorshomelab.dev/game-boy-emulator-fsharp/apu-basics-square-waves/</link><pubDate>Tue, 05 May 2026 00:00:00 +0000</pubDate><guid>https://ai-blog.noorshomelab.dev/game-boy-emulator-fsharp/apu-basics-square-waves/</guid><description>&lt;p&gt;In this chapter, we&amp;rsquo;re diving into the fascinating world of sound emulation for our Game Boy project. While often overlooked, a truly accurate emulator needs to replicate the distinct chiptune sounds that define the Game Boy experience. We&amp;rsquo;ll start by tackling the foundational elements of the Audio Processing Unit (APU), specifically focusing on its two square wave channels.&lt;/p&gt;
&lt;p&gt;This milestone is critical because it brings our emulator to life in a new dimension. Hearing the familiar bleeps and boops of a Game Boy game validates our CPU and MMU work in a very tangible way. By the end of this chapter, you&amp;rsquo;ll have a basic APU implementation capable of generating square wave sounds, hooked into your emulator&amp;rsquo;s main loop, and outputting audio via SDL2&amp;rsquo;s direct audio queuing API.&lt;/p&gt;</description></item><item><title>Synchronization, Debugging, and Verifying with Test ROMs</title><link>https://ai-blog.noorshomelab.dev/game-boy-emulator-fsharp/synchronization-debugging-test-roms/</link><pubDate>Tue, 05 May 2026 00:00:00 +0000</pubDate><guid>https://ai-blog.noorshomelab.dev/game-boy-emulator-fsharp/synchronization-debugging-test-roms/</guid><description>&lt;h2 id="introduction"&gt;Introduction&lt;/h2&gt;
&lt;p&gt;Building a Game Boy emulator is a complex dance of interacting hardware components. The CPU, Picture Processing Unit (PPU), and Audio Processing Unit (APU) all operate at different speeds and rely on precise timing to function correctly. In this chapter, we&amp;rsquo;ll tackle the critical challenge of &lt;strong&gt;synchronization&lt;/strong&gt;, ensuring these components work together harmoniously.&lt;/p&gt;
&lt;p&gt;Beyond just making things &lt;em&gt;run&lt;/em&gt;, we need to know &lt;em&gt;why&lt;/em&gt; they run or, more importantly, &lt;em&gt;why they fail&lt;/em&gt;. This is where &lt;strong&gt;debugging&lt;/strong&gt; becomes indispensable. We&amp;rsquo;ll implement practical debugging tools—from logging to conditional breakpoints—to help us peer into the emulator&amp;rsquo;s internal state.&lt;/p&gt;</description></item><item><title>Build a Game Boy Emulator with F#</title><link>https://ai-blog.noorshomelab.dev/game-boy-emulator-fsharp/</link><pubDate>Tue, 05 May 2026 00:00:00 +0000</pubDate><guid>https://ai-blog.noorshomelab.dev/game-boy-emulator-fsharp/</guid><description>&lt;p&gt;This comprehensive guide walks developers through the intricate process of creating a Game Boy emulator from the ground up using F#. Explore fundamental concepts like CPU emulation, memory mapping, graphics rendering, input handling, and sound synthesis. Delve into low-level system design and practical F# implementation details to truly understand retro console architecture.&lt;/p&gt;</description></item><item><title>Building a Game Boy Emulator with F#</title><link>https://ai-blog.noorshomelab.dev/projects-v2/game-boy-emulator-fsharp-guide/</link><pubDate>Tue, 05 May 2026 00:00:00 +0000</pubDate><guid>https://ai-blog.noorshomelab.dev/projects-v2/game-boy-emulator-fsharp-guide/</guid><description>&lt;p&gt;Building a Game Boy emulator from the ground up is a deeply rewarding project that takes you into the heart of computer architecture and low-level system design. This guide will walk you through constructing a functional Game Boy emulator using F#, focusing on a modular, functional approach to replicate the original hardware&amp;rsquo;s behavior.&lt;/p&gt;
&lt;h2 id="why-build-an-emulator"&gt;Why Build an Emulator?&lt;/h2&gt;
&lt;p&gt;Emulators are more than just software; they are digital time capsules that preserve computing history and provide a unique window into how hardware and software truly interact. By building one, you&amp;rsquo;ll gain an unparalleled understanding of:&lt;/p&gt;</description></item></channel></rss>