From a2b7a175a9873b4ac7f2a9e5f0c527c00179519e Mon Sep 17 00:00:00 2001 From: OBattler Date: Thu, 10 Aug 2023 16:47:12 +0200 Subject: [PATCH] Fixed Hercules InColor text mode wraparound, fixes #3520. --- src/video/vid_incolor.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/video/vid_incolor.c b/src/video/vid_incolor.c index 7a3b416fc..1b10def46 100644 --- a/src/video/vid_incolor.c +++ b/src/video/vid_incolor.c @@ -749,8 +749,8 @@ text_line(incolor_t *dev, uint16_t ca) for (uint8_t x = 0; x < dev->crtc[1]; x++) { if (dev->ctrl & 8) { - chr = dev->vram[(dev->ma << 1) & 0xfff]; - attr = dev->vram[((dev->ma << 1) + 1) & 0xfff]; + chr = dev->vram[(dev->ma << 1) & 0x3fff]; + attr = dev->vram[((dev->ma << 1) + 1) & 0x3fff]; } else chr = attr = 0;