diff stateview.c @ 803:236a184bf6f0

Merge
author Michael Pavone <pavone@retrodev.com>
date Sun, 26 Jul 2015 16:51:03 -0700
parents 9aff36a172b2
children 574495372d1c
line wrap: on
line diff
--- a/stateview.c	Sun Jul 26 16:48:25 2015 -0700
+++ b/stateview.c	Sun Jul 26 16:51:03 2015 -0700
@@ -7,6 +7,7 @@
 #include <stdio.h>
 #include "vdp.h"
 #include "render.h"
+#include "util.h"
 #include "blastem.h"
 
 //not used, but referenced by the renderer since it handles input
@@ -15,6 +16,9 @@
 uint8_t reset = 1;
 uint8_t busreq = 0;
 
+uint16_t ram[RAM_WORDS];
+uint8_t z80_ram[Z80_RAM_BYTES];
+
 uint16_t read_dma_value(uint32_t address)
 {
 	return 0;
@@ -53,17 +57,16 @@
 }
 
 tern_node * config;
+int headless = 0;
 
 int main(int argc, char ** argv)
 {
 	if (argc < 2) {
-		fprintf(stderr, "Usage: stateview FILENAME\n");
-		exit(1);
+		fatal_error("Usage: stateview FILENAME\n");
 	}
 	FILE * state_file = fopen(argv[1], "rb");
 	if (!state_file) {
-		fprintf(stderr, "Failed to open %s\n", argv[1]);
-		exit(1);
+		fatal_error("Failed to open %s\n", argv[1]);
 	}
 	config = load_config(argv[0]);
 	int width = -1;
@@ -87,7 +90,7 @@
 
 	vdp_context context;
 	render_init(width, height, "GST State Viewer", 60, 0);
-	init_vdp_context(&context);
+	init_vdp_context(&context, 0);
 	vdp_load_gst(&context, state_file);
 	vdp_run_to_vblank(&context);
 	vdp_print_sprite_table(&context);