comparison stateview.c @ 1317:32e95d6733a6

Force display on in stateview if given a save state with the display off
author Michael Pavone <pavone@retrodev.com>
date Sun, 16 Apr 2017 16:38:56 -0700
parents c95893007a83
children 0174759e559f
comparison
equal deleted inserted replaced
1316:3185438e0134 1317:32e95d6733a6
117 init_vdp_context(&context, 0); 117 init_vdp_context(&context, 0);
118 vdp_load_gst(&context, state_file); 118 vdp_load_gst(&context, state_file);
119 vdp_run_to_vblank(&context); 119 vdp_run_to_vblank(&context);
120 vdp_print_sprite_table(&context); 120 vdp_print_sprite_table(&context);
121 printf("Display %s\n", (context.regs[REG_MODE_2] & DISPLAY_ENABLE) ? "enabled" : "disabled"); 121 printf("Display %s\n", (context.regs[REG_MODE_2] & DISPLAY_ENABLE) ? "enabled" : "disabled");
122 if (!(context.regs[REG_MODE_2] & DISPLAY_ENABLE)) {
123 puts("Forcing display on");
124 vdp_control_port_write(&context, 0x8000 | REG_MODE_2 << 8 | context.regs[REG_MODE_2] | DISPLAY_ENABLE);
125 }
122 render_wait_quit(&context); 126 render_wait_quit(&context);
123 return 0; 127 return 0;
124 } 128 }