video: first signs of life

The video code now writes out a bmp file per-frame. With this patch
applied, the Nintendo logo is rendered in each frame.

There is still plenty of work to be done. Pretty much everything is
hardcoded to make the bootrom work.
This commit is contained in:
2018-07-18 19:32:03 -07:00
parent cd66ad8a89
commit 53cd4ab7e5
7 changed files with 165 additions and 63 deletions

View File

@@ -6,6 +6,8 @@
#include <stdint.h>
#include "gbemu/memory.h"
struct gb_video {
/* Comments ripped http://fms.komkon.org/GameBoy/Tech/Software.html */
@@ -90,9 +92,11 @@ struct gb_video {
/******************************/
int line_counter;
struct gb_memory *memory;
};
void gb_video_init(struct gb_video *video);
void gb_video_init(struct gb_video *video, struct gb_memory *memory);
void gb_video_cycle(struct gb_video *video, int cycles);
uint8_t gb_video_mem_read(struct gb_video *video, uint16_t addr);
void gb_video_mem_write(struct gb_video *video, uint16_t addr, uint8_t val);