Mercurial > repos > blastem
comparison vdp.c @ 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 |
comparison
equal
deleted
inserted
replaced
1269:ff8e29eeb1ec | 1270:687d3969416b |
---|---|
710 #define CRAM_BITS 0xEEE | 710 #define CRAM_BITS 0xEEE |
711 #define VSRAM_BITS 0x7FF | 711 #define VSRAM_BITS 0x7FF |
712 #define VSRAM_DIRTY_BITS 0xF800 | 712 #define VSRAM_DIRTY_BITS 0xF800 |
713 | 713 |
714 //rough estimate of slot number at which border display starts | 714 //rough estimate of slot number at which border display starts |
715 #define BG_START_SLOT 0 | 715 #define BG_START_SLOT 6 |
716 | 716 |
717 void write_cram(vdp_context * context, uint16_t address, uint16_t value) | 717 void write_cram(vdp_context * context, uint16_t address, uint16_t value) |
718 { | 718 { |
719 uint16_t addr; | 719 uint16_t addr; |
720 if (context->regs[REG_MODE_2] & BIT_MODE_5) { | 720 if (context->regs[REG_MODE_2] & BIT_MODE_5) { |
1202 uint8_t *sprite_buf, *plane_a, *plane_b; | 1202 uint8_t *sprite_buf, *plane_a, *plane_b; |
1203 int plane_a_off, plane_b_off; | 1203 int plane_a_off, plane_b_off; |
1204 if (col) | 1204 if (col) |
1205 { | 1205 { |
1206 col-=2; | 1206 col-=2; |
1207 dst = context->output + BORDER_LEFT + col * 8; | 1207 if (col) { |
1208 dst = context->output + BORDER_LEFT + col * 8; | |
1209 } else { | |
1210 dst = context->output; | |
1211 uint32_t bg_color = context->colors[context->regs[REG_BG_COLOR] & 0x3F]; | |
1212 for (int i = 0; i < BORDER_LEFT; i++, dst++) | |
1213 { | |
1214 *dst = bg_color; | |
1215 } | |
1216 } | |
1208 if (context->debug < 2) { | 1217 if (context->debug < 2) { |
1209 sprite_buf = context->linebuf + col * 8; | 1218 sprite_buf = context->linebuf + col * 8; |
1210 uint8_t a_src, src; | 1219 uint8_t a_src, src; |
1211 if (context->flags & FLAG_WINDOW) { | 1220 if (context->flags & FLAG_WINDOW) { |
1212 plane_a_off = context->buf_a_off; | 1221 plane_a_off = context->buf_a_off; |
1526 #define COLUMN_RENDER_BLOCK(column, startcyc) \ | 1535 #define COLUMN_RENDER_BLOCK(column, startcyc) \ |
1527 case startcyc:\ | 1536 case startcyc:\ |
1528 read_map_scroll_a(column, context->vcounter, context);\ | 1537 read_map_scroll_a(column, context->vcounter, context);\ |
1529 CHECK_LIMIT\ | 1538 CHECK_LIMIT\ |
1530 case ((startcyc+1)&0xFF):\ | 1539 case ((startcyc+1)&0xFF):\ |
1531 if (column == 2) {\ | |
1532 uint32_t bg_color = context->colors[context->regs[REG_BG_COLOR] & 0x3F];\ | |
1533 for (int i = 0; i < BORDER_LEFT; i++) {\ | |
1534 context->output[i] = bg_color;\ | |
1535 }\ | |
1536 }\ | |
1537 external_slot(context);\ | 1540 external_slot(context);\ |
1538 CHECK_LIMIT\ | 1541 CHECK_LIMIT\ |
1539 case ((startcyc+2)&0xFF):\ | 1542 case ((startcyc+2)&0xFF):\ |
1540 render_map_1(context);\ | 1543 render_map_1(context);\ |
1541 CHECK_LIMIT\ | 1544 CHECK_LIMIT\ |