emu_nes/ppu.c
2024-09-01 01:49:40 -04:00

29 lines
323 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;
}
uint8_t
ppu_read(uint16_t addr)
{
}
void
ppu_write(uint16_t addr, uint8_t byte)
{
static uint8_t prev;
prev = byte;
}