diff src/main.c @ 11:04d8efe7a1f0

Initial stab at video output and background color rendering. Fixed address decoding in address port write handler.
author Michael Pavone <pavone@retrodev.com>
date Sun, 27 Mar 2016 17:36:02 -0700
parents 5176efdda5ae
children ae58e7c3c328
line wrap: on
line diff
--- a/src/main.c	Sun Mar 27 17:32:09 2016 -0700
+++ b/src/main.c	Sun Mar 27 17:36:02 2016 -0700
@@ -4,6 +4,7 @@
 #include <string.h>
 #include "cpu.h"
 #include "vdp.h"
+#include "system.h"
 
 #define CYCLES_PER_FRAME (832*262)
 
@@ -140,6 +141,11 @@
 	context.proc->port_handlers[PORT_VRAM_ADDRESS].write = address_port_write;
 	context.proc->port_handlers[PORT_VRAM_ADDRESS].read = address_port_read;
 	context.proc->port_handlers[PORT_VRAM_DATA].write = data_port_write;
+	
+	if (!system_init(640, 480)) {
+		return 1;
+	}
+	
 	run_console(&context);
 	return 0;
 }