#include "ppu.h" struct ppu ppu = {0}; void ppu_tick(void) { ppu.cycles++; if (ppu.cycles >= 341) { ppu.cycles -= 341; ppu.scanlines++; } if (ppu.scanlines >= 262) ppu.scanlines -= 262; }