comparison vdp.c @ 920:e64168bb2b25

Fix calculation of window start column when it's on the right side. This removes graphical glitches in Afterburner 2, Fireshark and Dungeons and Dragons: Warriors of the Eternal Sun and probably others
author Michael Pavone <pavone@retrodev.com>
date Sun, 17 Jan 2016 14:46:12 -0800
parents 252dfd29831d
children 2be771c4dfbd
comparison
equal deleted inserted replaced
919:38dca41f151d 920:e64168bb2b25
603 vscroll_shift = 3; 603 vscroll_shift = 3;
604 } 604 }
605 if (!vsram_off) { 605 if (!vsram_off) {
606 uint16_t left_col, right_col; 606 uint16_t left_col, right_col;
607 if (context->regs[REG_WINDOW_H] & WINDOW_RIGHT) { 607 if (context->regs[REG_WINDOW_H] & WINDOW_RIGHT) {
608 left_col = (context->regs[REG_WINDOW_H] & 0x1F) * 2; 608 left_col = (context->regs[REG_WINDOW_H] & 0x1F) * 2 + 2;
609 right_col = 42; 609 right_col = 42;
610 } else { 610 } else {
611 left_col = 0; 611 left_col = 0;
612 right_col = (context->regs[REG_WINDOW_H] & 0x1F) * 2; 612 right_col = (context->regs[REG_WINDOW_H] & 0x1F) * 2;
613 if (right_col) { 613 if (right_col) {