From 16e0cd5352a9950fff2972f5c08636ff62987265 Mon Sep 17 00:00:00 2001 From: Michael Pavone Date: Thu, 1 Nov 2018 20:14:56 -0700 Subject: Forcefully update the display when entering the 68K debugger so you can see it update in realtime as you step through the code --- vdp.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'vdp.c') diff --git a/vdp.c b/vdp.c index 23eadb3..b09861d 100644 --- a/vdp.c +++ b/vdp.c @@ -1720,6 +1720,22 @@ static void vdp_advance_line(vdp_context *context) } } +void vdp_force_update_framebuffer(vdp_context *context) +{ + uint16_t lines_max = (context->flags2 & FLAG2_REGION_PAL) + ? 240 + BORDER_TOP_V30_PAL + BORDER_BOT_V30_PAL + : 224 + BORDER_TOP_V28 + BORDER_BOT_V28; + + uint16_t to_fill = lines_max - context->output_lines; + memset( + ((char *)context->fb) + context->output_pitch * context->output_lines, + 0, + to_fill * context->output_pitch + ); + render_framebuffer_updated(context->cur_buffer, context->h40_lines > context->output_lines / 2 ? LINEBUF_SIZE : (256+HORIZ_BORDER)); + context->fb = render_get_framebuffer(context->cur_buffer, &context->output_pitch); +} + static void advance_output_line(vdp_context *context) { if (headless) { -- cgit v1.2.3