From e7e790701e54aa94fb73ec9624042f15d5ef6a27 Mon Sep 17 00:00:00 2001 From: SarahW Date: Thu, 23 Mar 2017 20:20:38 +0000 Subject: [PATCH] Wrap MDA and Hercules text modes at 4kb. --- src/vid_hercules.c | 4 ++-- src/vid_mda.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/vid_hercules.c b/src/vid_hercules.c index 3d72743..6587d44 100644 --- a/src/vid_hercules.c +++ b/src/vid_hercules.c @@ -162,8 +162,8 @@ void hercules_poll(void *p) { for (x = 0; x < hercules->crtc[1]; x++) { - chr = hercules->vram[(hercules->ma << 1) & 0x3fff]; - attr = hercules->vram[((hercules->ma << 1) + 1) & 0x3fff]; + chr = hercules->vram[(hercules->ma << 1) & 0xfff]; + attr = hercules->vram[((hercules->ma << 1) + 1) & 0xfff]; drawcursor = ((hercules->ma == ca) && hercules->con && hercules->cursoron); blink = ((hercules->blink & 16) && (hercules->ctrl & 0x20) && (attr & 0x80) && !drawcursor); if (hercules->sc == 12 && ((attr & 7) == 1)) diff --git a/src/vid_mda.c b/src/vid_mda.c index a9f28a3..912fbb8 100644 --- a/src/vid_mda.c +++ b/src/vid_mda.c @@ -131,8 +131,8 @@ void mda_poll(void *p) cols[1] = 7; for (x = 0; x < mda->crtc[1]; x++) { - chr = mda->vram[(mda->ma << 1) & 0x3fff]; - attr = mda->vram[((mda->ma << 1) + 1) & 0x3fff]; + chr = mda->vram[(mda->ma << 1) & 0xfff]; + attr = mda->vram[((mda->ma << 1) + 1) & 0xfff]; drawcursor = ((mda->ma == ca) && mda->con && mda->cursoron); blink = ((mda->blink & 16) && (mda->ctrl & 0x20) && (attr & 0x80) && !drawcursor); if (mda->sc == 12 && ((attr & 7) == 1))