diff options
author | Michael Pavone <pavone@retrodev.com> | 2017-04-16 16:38:56 -0700 |
---|---|---|
committer | Michael Pavone <pavone@retrodev.com> | 2017-04-16 16:38:56 -0700 |
commit | e477136515ecff6e4b8636ff98466787440d4a77 (patch) | |
tree | ece7cc35bdff33753e4a820580b413aff1f3d2a8 | |
parent | 380a0230aad7a9977fcd0ac0731576a9ed9ce6d5 (diff) |
Force display on in stateview if given a save state with the display off
-rw-r--r-- | stateview.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/stateview.c b/stateview.c index 238d5c0..e75a688 100644 --- a/stateview.c +++ b/stateview.c @@ -119,6 +119,10 @@ int main(int argc, char ** argv) 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(&context); return 0; } |