diff options
| author | vin <git@vineetk.net> | 2024-07-21 13:53:04 -0400 |
|---|---|---|
| committer | vin <git@vineetk.net> | 2024-07-21 13:53:04 -0400 |
| commit | 7d148924e2fee1a2692d2c49a01e6770b630f906 (patch) | |
| tree | 0fc1abc86a7dae9c249f9a796f4af2e9ebbaffff /ppu.h | |
| parent | 2df7df5f5b0f325864f92c5a58f3c132cfff989e (diff) | |
start implementing PPU
Diffstat (limited to 'ppu.h')
| -rw-r--r-- | ppu.h | 23 |
1 files changed, 23 insertions, 0 deletions
| @@ -0,0 +1,23 @@ | |||
| 1 | #ifndef PPU_H | ||
| 2 | #define PPU_H | ||
| 3 | |||
| 4 | #include <stdio.h> | ||
| 5 | #include <stdint.h> | ||
| 6 | |||
| 7 | #include "rom.h" | ||
| 8 | |||
| 9 | struct ppu { | ||
| 10 | uint8_t oam[64*4]; | ||
| 11 | uint8_t vram[2048]; | ||
| 12 | uint8_t palette[16*2]; | ||
| 13 | uint16_t cycles, scanlines; | ||
| 14 | /* copied from rom */ | ||
| 15 | uint8_t *chr_rom; | ||
| 16 | size_t chr_rom_size; | ||
| 17 | enum screen_mirroring mirror; | ||
| 18 | }; | ||
| 19 | extern struct ppu ppu; | ||
| 20 | |||
| 21 | void ppu_tick(void); | ||
| 22 | |||
| 23 | #endif /* PPU_H */ | ||
