Mercurial > repos > blastem
comparison stateview.c @ 703:6e751a8f46aa
Get save state viewer compiling again
author | Michael Pavone <pavone@retrodev.com> |
---|---|
date | Wed, 13 May 2015 19:13:15 -0700 |
parents | 140af5509ce7 |
children | 019d27995e32 |
comparison
equal
deleted
inserted
replaced
702:144df1a6d3b9 | 703:6e751a8f46aa |
---|---|
51 void handle_joy_dpad(int joystick, int dpadnum, uint8_t value) | 51 void handle_joy_dpad(int joystick, int dpadnum, uint8_t value) |
52 { | 52 { |
53 } | 53 } |
54 | 54 |
55 tern_node * config; | 55 tern_node * config; |
56 int headless = 0; | |
56 | 57 |
57 int main(int argc, char ** argv) | 58 int main(int argc, char ** argv) |
58 { | 59 { |
59 if (argc < 2) { | 60 if (argc < 2) { |
60 fprintf(stderr, "Usage: stateview FILENAME\n"); | 61 fprintf(stderr, "Usage: stateview FILENAME\n"); |
84 } | 85 } |
85 width = width < 320 ? def_width : width; | 86 width = width < 320 ? def_width : width; |
86 height = height < 240 ? (width/320) * 240 : height; | 87 height = height < 240 ? (width/320) * 240 : height; |
87 | 88 |
88 vdp_context context; | 89 vdp_context context; |
89 render_init(width, height, "GST State Viewer", 60, 0); | 90 render_init(width, height, "GST State Viewer", 60, 0, 0); |
90 init_vdp_context(&context); | 91 init_vdp_context(&context, 0); |
91 vdp_load_gst(&context, state_file); | 92 vdp_load_gst(&context, state_file); |
92 vdp_run_to_vblank(&context); | 93 vdp_run_to_vblank(&context); |
93 vdp_print_sprite_table(&context); | 94 vdp_print_sprite_table(&context); |
94 printf("Display %s\n", (context.regs[REG_MODE_2] & DISPLAY_ENABLE) ? "enabled" : "disabled"); | 95 printf("Display %s\n", (context.regs[REG_MODE_2] & DISPLAY_ENABLE) ? "enabled" : "disabled"); |
95 render_context(&context); | 96 render_context(&context); |