Day 10: Cathode-Ray Tube

Day 10 involves simulating a CPU with a simple instruction set and a CRT display.

Problem Overview

You need to fix a small handheld device with a CPU and CRT screen. The task involves:

  1. Simulating a CPU that executes instructions with different timing
  2. Monitoring the X register at specific cycles
  3. Drawing pixels on a CRT screen based on the X register's value

This problem tests your ability to implement a simple processor simulation and track the state over time, as well as generating visual output based on that state.