emu_nes/ppu.c
2024-07-21 13:53:04 -04:00

16 lines
200 B
C

#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;
}