summaryrefslogtreecommitdiff
path: root/stateview.c
diff options
context:
space:
mode:
Diffstat (limited to 'stateview.c')
-rw-r--r--stateview.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/stateview.c b/stateview.c
index ee34407..3f860e7 100644
--- a/stateview.c
+++ b/stateview.c
@@ -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 @@ io_port gamepad_2;
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 @@ void handle_joy_dpad(int joystick, int dpadnum, uint8_t value)
}
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 @@ int main(int argc, char ** argv)
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);