diff vdp.c @ 2414:dc05f1805921

Fix out of bound read from mode4_address_map in TMS modes
author Michael Pavone <pavone@retrodev.com>
date Thu, 04 Jan 2024 23:31:54 -0800
parents efd2242c2c23
children b0408f38f464
line wrap: on
line diff
--- a/vdp.c	Thu Jan 04 22:56:35 2024 -0800
+++ b/vdp.c	Thu Jan 04 23:31:54 2024 -0800
@@ -3698,7 +3698,7 @@
 		address &= 0x2000;
 		address |= context->vcounter << 5 & mask;
 	}
-	address |= context->col_1 << 3;
+	address |= context->col_1 << 3 & 0x7F8;
 	if (context->regs[REG_MODE_2] & BIT_M2) {
 		//Multicolor
 		address |= context->vcounter >> 2 & 0x3;