summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Pavone <pavone@retrodev.com>2020-04-26 14:54:00 -0700
committerMichael Pavone <pavone@retrodev.com>2020-04-26 14:54:00 -0700
commitcbd07294f432f9d9c393f98c42e92b6ee08545c1 (patch)
treef172ba4284771c235264bd284f3ba9a25595f0ab
parent50a93edac0c361031cd6955cc84a8a6ac300d9b5 (diff)
Kill the stateview target as it is not very useful these days and breaks a lot
-rw-r--r--Makefile6
-rwxr-xr-xbuild_release4
-rw-r--r--stateview.c127
3 files changed, 3 insertions, 134 deletions
diff --git a/Makefile b/Makefile
index 36a93c5..7794c9d 100644
--- a/Makefile
+++ b/Makefile
@@ -260,7 +260,7 @@ ifdef FONT_PATH
CFLAGS+= -DFONT_PATH='"'$(FONT_PATH)'"'
endif
-ALL=dis$(EXE) zdis$(EXE) stateview$(EXE) vgmplay$(EXE) blastem$(EXE)
+ALL=dis$(EXE) zdis$(EXE) vgmplay$(EXE) blastem$(EXE)
ifneq ($(OS),Windows)
ALL+= termhelper
endif
@@ -308,10 +308,6 @@ ztestrun : ztestrun.o serialize.o $(Z80OBJS) $(TRANSOBJS)
ztestgen : ztestgen.o z80inst.o
$(CC) -ggdb -o ztestgen ztestgen.o z80inst.o
-stateview$(EXE) : stateview.o vdp.o $(RENDEROBJS) serialize.o $(CONFIGOBJS) gst.o render_audio.o
- $(CC) -o $@ $^ $(LDFLAGS)
- $(FIXUP) ./$@
-
vgmplay$(EXE) : vgmplay.o $(RENDEROBJS) serialize.o $(CONFIGOBJS) $(AUDIOOBJS)
$(CC) -o $@ $^ $(LDFLAGS)
$(FIXUP) ./$@
diff --git a/build_release b/build_release
index b9808a2..7d61332 100755
--- a/build_release
+++ b/build_release
@@ -34,11 +34,11 @@ else
fi
make menu.bin
if [ $OS = "Windows" -o $OS = "Win64" ]; then
- binaries="dis.exe zdis.exe stateview.exe vgmplay.exe blastem.exe $SDLDLLPATH/SDL2.dll"
+ binaries="dis.exe zdis.exe vgmplay.exe blastem.exe $SDLDLLPATH/SDL2.dll"
verstr=`sed -E -n 's/^[^B]+BLASTEM_VERSION "([^"]+)"/blastem \1/p' blastem.c`
txt=".txt"
else
- binaries="dis zdis stateview vgmplay blastem termhelper"
+ binaries="dis zdis vgmplay blastem termhelper"
if [ $OS = "Darwin" ]; then
binaries="$binaries Frameworks"
else
diff --git a/stateview.c b/stateview.c
deleted file mode 100644
index 05e5e2b..0000000
--- a/stateview.c
+++ /dev/null
@@ -1,127 +0,0 @@
-/*
- Copyright 2013 Michael Pavone
- This file is part of BlastEm.
- BlastEm is free software distributed under the terms of the GNU General Public License version 3 or greater. See COPYING for full license text.
-*/
-#include <stdlib.h>
-#include <stdio.h>
-#include "vdp.h"
-#include "render.h"
-#include "util.h"
-#include "genesis.h"
-#include "config.h"
-
-
-uint16_t read_dma_value(uint32_t address)
-{
- return 0;
-}
-
-m68k_context *m68k_handle_code_write(uint32_t address, m68k_context *context)
-{
- return NULL;
-}
-
-z80_context *z80_handle_code_write(uint32_t address, z80_context *context)
-{
- return NULL;
-}
-
-void ym_data_write(ym2612_context * context, uint8_t value)
-{
-}
-
-void ym_address_write_part1(ym2612_context * context, uint8_t address)
-{
-}
-
-void ym_address_write_part2(ym2612_context * context, uint8_t address)
-{
-}
-
-void handle_keydown(int keycode, uint8_t scancode)
-{
-}
-
-void handle_keyup(int keycode, uint8_t scancode)
-{
-}
-
-void handle_joydown(int joystick, int button)
-{
-}
-
-void handle_joyup(int joystick, int button)
-{
-}
-
-void handle_joy_dpad(int joystick, int dpadnum, uint8_t value)
-{
-}
-
-void handle_joy_axis(int joystick, int axis, int16_t value)
-{
-}
-
-void handle_joy_added(int joystick)
-{
-}
-
-void handle_mousedown(int mouse, int button)
-{
-}
-
-void handle_mouseup(int mouse, int button)
-{
-}
-
-void handle_mouse_moved(int mouse, uint16_t x, uint16_t y, int16_t deltax, int16_t deltay)
-{
-}
-
-tern_node * config;
-int headless = 0;
-
-int main(int argc, char ** argv)
-{
- if (argc < 2) {
- fatal_error("Usage: stateview FILENAME\n");
- }
- FILE * state_file = fopen(argv[1], "rb");
- if (!state_file) {
- fatal_error("Failed to open %s\n", argv[1]);
- }
- set_exe_str(argv[0]);
- config = load_config(argv[0]);
- int width = -1;
- int height = -1;
- if (argc > 2) {
- width = atoi(argv[2]);
- if (argc > 3) {
- height = atoi(argv[3]);
- }
- }
- int def_width = 0;
- char *config_width = tern_find_ptr(config, "videowidth");
- if (config_width) {
- def_width = atoi(config_width);
- }
- if (!def_width) {
- def_width = 640;
- }
- width = width < 320 ? def_width : width;
- height = height < 240 ? (width/320) * 240 : height;
-
- render_init(width, height, "GST State Viewer", 0);
- vdp_context *context = init_vdp_context(0, 0);
- vdp_load_gst(context, state_file);
- vdp_run_to_vblank(context);
- vdp_print_sprite_table(context);
- printf("Display %s\n", (context->regs[REG_MODE_2] & DISPLAY_ENABLE) ? "enabled" : "disabled");
- if (!(context->regs[REG_MODE_2] & DISPLAY_ENABLE)) {
- puts("Forcing display on");
- vdp_control_port_write(context, 0x8000 | REG_MODE_2 << 8 | context->regs[REG_MODE_2] | DISPLAY_ENABLE);
- }
- render_wait_quit();
- return 0;
-}