Mercurial > repos > blastem
changeset 1270:687d3969416b
Adjust correspondance between slot number and actual video output to better match video signal measurements and analysis of Outrunners behavior on hardware. Partially fixes ticket:13
author | Michael Pavone <pavone@retrodev.com> |
---|---|
date | Mon, 06 Mar 2017 23:05:31 -0800 |
parents | ff8e29eeb1ec |
children | c865ee5478bc |
files | vdp.c |
diffstat | 1 files changed, 11 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/vdp.c Mon Mar 06 09:54:44 2017 -0800 +++ b/vdp.c Mon Mar 06 23:05:31 2017 -0800 @@ -712,7 +712,7 @@ #define VSRAM_DIRTY_BITS 0xF800 //rough estimate of slot number at which border display starts -#define BG_START_SLOT 0 +#define BG_START_SLOT 6 void write_cram(vdp_context * context, uint16_t address, uint16_t value) { @@ -1204,7 +1204,16 @@ if (col) { col-=2; - dst = context->output + BORDER_LEFT + col * 8; + if (col) { + dst = context->output + BORDER_LEFT + col * 8; + } else { + dst = context->output; + uint32_t bg_color = context->colors[context->regs[REG_BG_COLOR] & 0x3F]; + for (int i = 0; i < BORDER_LEFT; i++, dst++) + { + *dst = bg_color; + } + } if (context->debug < 2) { sprite_buf = context->linebuf + col * 8; uint8_t a_src, src; @@ -1528,12 +1537,6 @@ read_map_scroll_a(column, context->vcounter, context);\ CHECK_LIMIT\ case ((startcyc+1)&0xFF):\ - if (column == 2) {\ - uint32_t bg_color = context->colors[context->regs[REG_BG_COLOR] & 0x3F];\ - for (int i = 0; i < BORDER_LEFT; i++) {\ - context->output[i] = bg_color;\ - }\ - }\ external_slot(context);\ CHECK_LIMIT\ case ((startcyc+2)&0xFF):\