From 4e9d208ce75e68a42b1bbcb0b8a4f057a2bd93ea Mon Sep 17 00:00:00 2001 From: OBattler Date: Fri, 11 Aug 2023 05:03:26 +0200 Subject: [PATCH] Fixed text mode wrapping on the Hercules Plus. --- src/video/vid_herculesplus.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/video/vid_herculesplus.c b/src/video/vid_herculesplus.c index 6ae13ba3f..5c210777e 100644 --- a/src/video/vid_herculesplus.c +++ b/src/video/vid_herculesplus.c @@ -459,8 +459,8 @@ text_line(herculesplus_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;