Finish ppu, and mbc1 mapping
This commit is contained in:
14
lib/ppu.c
14
lib/ppu.c
@ -3,6 +3,9 @@
|
||||
#include <string.h>
|
||||
#include <ppu_sm.h>
|
||||
|
||||
void pipeline_fifo_reset();
|
||||
void pipeline_process();
|
||||
|
||||
static ppu_context ctx;
|
||||
|
||||
ppu_context *ppu_get_context() {
|
||||
@ -14,6 +17,17 @@ void ppu_init() {
|
||||
ctx.line_ticks = 0;
|
||||
ctx.video_buffer = malloc(YRES * XRES * sizeof(u32));
|
||||
|
||||
ctx.pfc.line_x = 0;
|
||||
ctx.pfc.pushed_x = 0;
|
||||
ctx.pfc.fetch_x = 0;
|
||||
ctx.pfc.pixel_fifo.size = 0;
|
||||
ctx.pfc.pixel_fifo.head = ctx.pfc.pixel_fifo.tail = NULL;
|
||||
ctx.pfc.cur_fetch_state = FS_TILE;
|
||||
|
||||
ctx.line_sprites = 0;
|
||||
ctx.fetched_entry_count = 0;
|
||||
ctx.window_line = 0;
|
||||
|
||||
lcd_init();
|
||||
LCDS_MODE_SET(MODE_OAM);
|
||||
|
||||
|
Reference in New Issue
Block a user