summaryrefslogtreecommitdiff
path: root/ppu.h
diff options
context:
space:
mode:
authorvin <git@vineetk.net>2024-07-21 13:53:04 -0400
committervin <git@vineetk.net>2024-07-21 13:53:04 -0400
commit7d148924e2fee1a2692d2c49a01e6770b630f906 (patch)
tree0fc1abc86a7dae9c249f9a796f4af2e9ebbaffff /ppu.h
parent2df7df5f5b0f325864f92c5a58f3c132cfff989e (diff)
start implementing PPU
Diffstat (limited to 'ppu.h')
-rw-r--r--ppu.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/ppu.h b/ppu.h
new file mode 100644
index 0000000..1527b93
--- /dev/null
+++ b/ppu.h
@@ -0,0 +1,23 @@
+#ifndef PPU_H
+#define PPU_H
+
+#include <stdio.h>
+#include <stdint.h>
+
+#include "rom.h"
+
+struct ppu {
+ uint8_t oam[64*4];
+ uint8_t vram[2048];
+ uint8_t palette[16*2];
+ uint16_t cycles, scanlines;
+ /* copied from rom */
+ uint8_t *chr_rom;
+ size_t chr_rom_size;
+ enum screen_mirroring mirror;
+};
+extern struct ppu ppu;
+
+void ppu_tick(void);
+
+#endif /* PPU_H */