emu_nes/ppu.c

29 lines
323 B
C
Raw Normal View History

2024-07-21 13:53:04 -04:00
#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;
}
2024-08-31 22:25:12 -04:00
uint8_t
ppu_read(uint16_t addr)
{
}
void
ppu_write(uint16_t addr, uint8_t byte)
{
static uint8_t prev;
prev = byte;
}