changeset 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 38dca41f151d
children 2be771c4dfbd a3b08915624b
files vdp.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/vdp.c	Sun Jan 17 14:36:25 2016 -0800
+++ b/vdp.c	Sun Jan 17 14:46:12 2016 -0800
@@ -605,7 +605,7 @@
 	if (!vsram_off) {
 		uint16_t left_col, right_col;
 		if (context->regs[REG_WINDOW_H] & WINDOW_RIGHT) {
-			left_col = (context->regs[REG_WINDOW_H] & 0x1F) * 2;
+			left_col = (context->regs[REG_WINDOW_H] & 0x1F) * 2 + 2;
 			right_col = 42;
 		} else {
 			left_col = 0;