# HG changeset patch # User Michael Pavone # Date 1488870331 28800 # Node ID 687d3969416b131a178f5f3357e9b9816e8c2090 # Parent ff8e29eeb1ecbc4e86160b0aea188085572bcb6f 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 diff -r ff8e29eeb1ec -r 687d3969416b vdp.c --- 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):\