Mercurial > repos > blastem
comparison vdp.c @ 1168:fa73a77ddf92
Fix benchmark mode
author | Michael Pavone <pavone@retrodev.com> |
---|---|
date | Sun, 15 Jan 2017 15:29:32 -0800 |
parents | e758ddbf0624 |
children | 82d8b9324b10 |
comparison
equal
deleted
inserted
replaced
1167:e758ddbf0624 | 1168:fa73a77ddf92 |
---|---|
110 context->vdpmem = malloc(VRAM_SIZE); | 110 context->vdpmem = malloc(VRAM_SIZE); |
111 memset(context->vdpmem, 0, VRAM_SIZE); | 111 memset(context->vdpmem, 0, VRAM_SIZE); |
112 /* | 112 /* |
113 */ | 113 */ |
114 if (headless) { | 114 if (headless) { |
115 context->output = malloc(LINEBUF_SIZE); | 115 context->output = malloc(LINEBUF_SIZE * sizeof(uint32_t)); |
116 context->output_pitch = 0; | 116 context->output_pitch = 0; |
117 } else { | 117 } else { |
118 context->fb = render_get_framebuffer(FRAMEBUFFER_ODD, &context->output_pitch); | 118 context->fb = render_get_framebuffer(FRAMEBUFFER_ODD, &context->output_pitch); |
119 } | 119 } |
120 context->linebuf = malloc(LINEBUF_SIZE + SCROLL_BUFFER_SIZE*2); | 120 context->linebuf = malloc(LINEBUF_SIZE + SCROLL_BUFFER_SIZE*2); |
1454 } | 1454 } |
1455 } else if (context->vcounter == 0xDB) { | 1455 } else if (context->vcounter == 0xDB) { |
1456 context->vcounter = 0x1D5; | 1456 context->vcounter = 0x1D5; |
1457 } | 1457 } |
1458 if (headless) { | 1458 if (headless) { |
1459 if (context->vcounter == context->inactive_start) { | |
1460 context->frame++; | |
1461 } | |
1459 context->vcounter &= 0x1FF; | 1462 context->vcounter &= 0x1FF; |
1460 } else { | 1463 } else { |
1461 if (context->vcounter == context->inactive_start) { | 1464 if (context->vcounter == context->inactive_start) { |
1462 render_framebuffer_updated(context->flags2 & FLAG2_EVEN_FIELD ? FRAMEBUFFER_EVEN: FRAMEBUFFER_ODD, context->h40_lines > (context->inactive_start + context->border_top) / 2 ? 320 : 256); | 1465 render_framebuffer_updated(context->flags2 & FLAG2_EVEN_FIELD ? FRAMEBUFFER_EVEN: FRAMEBUFFER_ODD, context->h40_lines > (context->inactive_start + context->border_top) / 2 ? 320 : 256); |
1463 if (context->double_res) { | 1466 if (context->double_res) { |