From f27e8413fb547c3201329915f0231a533ab2bb33 Mon Sep 17 00:00:00 2001 From: Michael Pavone Date: Wed, 13 May 2015 19:13:15 -0700 Subject: Get save state viewer compiling again --- stateview.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'stateview.c') diff --git a/stateview.c b/stateview.c index ee34407..713c390 100644 --- a/stateview.c +++ b/stateview.c @@ -53,6 +53,7 @@ void handle_joy_dpad(int joystick, int dpadnum, uint8_t value) } tern_node * config; +int headless = 0; int main(int argc, char ** argv) { @@ -86,8 +87,8 @@ int main(int argc, char ** argv) height = height < 240 ? (width/320) * 240 : height; vdp_context context; - render_init(width, height, "GST State Viewer", 60, 0); - init_vdp_context(&context); + render_init(width, height, "GST State Viewer", 60, 0, 0); + init_vdp_context(&context, 0); vdp_load_gst(&context, state_file); vdp_run_to_vblank(&context); vdp_print_sprite_table(&context); -- cgit v1.2.3 From 863ea0b3f8b8879ac3092f391a68dc95d0d04de2 Mon Sep 17 00:00:00 2001 From: Michael Pavone Date: Wed, 20 May 2015 19:05:11 -0700 Subject: Upgrade to SDL 2.0 and drop support for the non-OpenGL render path --- stateview.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'stateview.c') diff --git a/stateview.c b/stateview.c index 713c390..0d2286d 100644 --- a/stateview.c +++ b/stateview.c @@ -87,7 +87,7 @@ int main(int argc, char ** argv) height = height < 240 ? (width/320) * 240 : height; vdp_context context; - render_init(width, height, "GST State Viewer", 60, 0, 0); + render_init(width, height, "GST State Viewer", 60, 0); init_vdp_context(&context, 0); vdp_load_gst(&context, state_file); vdp_run_to_vblank(&context); -- cgit v1.2.3 From e7b2812fbdb135338db7a5bade0db8a16dc772b2 Mon Sep 17 00:00:00 2001 From: Michael Pavone Date: Tue, 21 Jul 2015 00:52:21 -0700 Subject: Fix stateview build and fix Makefile to use /bin/echo since builtin echo does not always support -e --- stateview.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'stateview.c') diff --git a/stateview.c b/stateview.c index 0d2286d..751d2af 100644 --- a/stateview.c +++ b/stateview.c @@ -15,6 +15,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; -- cgit v1.2.3 From 80ff833dd8ad011b579bff26ac654819e6735bce Mon Sep 17 00:00:00 2001 From: Michael Pavone Date: Sat, 25 Jul 2015 18:22:07 -0700 Subject: Use a new fatal_error function instead of calling fprintf and exit for fatal errors. This new function more gracefully handles the case in which BlastEm was not started from a terminal or disconnected from ther terminal (Windows). --- stateview.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'stateview.c') diff --git a/stateview.c b/stateview.c index 751d2af..1e8632f 100644 --- a/stateview.c +++ b/stateview.c @@ -61,13 +61,11 @@ 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; -- cgit v1.2.3 From 25fc1e88deea8253d9d4b8084485e176eb69abd0 Mon Sep 17 00:00:00 2001 From: Michael Pavone Date: Sun, 26 Jul 2015 01:09:05 -0700 Subject: Fix missing includes of util.h --- stateview.c | 1 + 1 file changed, 1 insertion(+) (limited to 'stateview.c') diff --git a/stateview.c b/stateview.c index 1e8632f..3f860e7 100644 --- a/stateview.c +++ b/stateview.c @@ -7,6 +7,7 @@ #include #include "vdp.h" #include "render.h" +#include "util.h" #include "blastem.h" //not used, but referenced by the renderer since it handles input -- cgit v1.2.3