comparison stateview.c @ 744:fc68992cf18d

Merge windows branch with latest changes
author Michael Pavone <pavone@retrodev.com>
date Thu, 28 May 2015 21:19:55 -0700
parents 019d27995e32
children e64975fc5f98
comparison
equal deleted inserted replaced
743:cf78cb045fa4 744:fc68992cf18d
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");
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);
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);