28 lines
523 B
C
28 lines
523 B
C
#pragma once
|
|
|
|
#include"tigr.h"
|
|
#include<stdio.h>
|
|
#include<inttypes.h>
|
|
#include<stdbool.h>
|
|
|
|
struct Ppu;
|
|
|
|
#include"cpu.h"
|
|
#include"gb.h"
|
|
|
|
enum{M_MEM,M_DASM};
|
|
|
|
typedef struct Ppu
|
|
{
|
|
union{TPixel*t;uint32_t*i;}pixels;
|
|
Tigr*screen;
|
|
Tigr*info;
|
|
size_t mode;
|
|
} Ppu;
|
|
|
|
uint32_t ppu_closewindow(Ppu*ppu);
|
|
uint32_t ppu_openwindow(Ppu*ppu,uint8_t*str);
|
|
uint32_t ppu_updatewindow(struct Gb*gb,uint8_t*ram);
|
|
void ppu_drawtile(Ppu*ppu,uint8_t x,uint8_t y,uint16_t o,uint16_t t,uint8_t *ram);
|
|
void ppu_updatejoypad(Ppu*ppu,uint8_t*ram);
|