From 24eaf95e9d7fbc84f05d1f0f4898bf498fa99ecc Mon Sep 17 00:00:00 2001 From: Thomas Harte Date: Wed, 6 Dec 2023 09:13:47 -0500 Subject: [PATCH] Limit to eight pixels per fetch, to produce stable video. --- Machines/PCCompatible/CGA.hpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/Machines/PCCompatible/CGA.hpp b/Machines/PCCompatible/CGA.hpp index fafca1058..f4f86c1db 100644 --- a/Machines/PCCompatible/CGA.hpp +++ b/Machines/PCCompatible/CGA.hpp @@ -179,7 +179,7 @@ class CGA { if(((attributes & 7) == 1) && state.row_address == 13) { // Draw as underline. - std::fill(pixel_pointer, pixel_pointer + 9, intensity); + std::fill(pixel_pointer, pixel_pointer + 8, intensity); } else { // Draw according to ROM contents, possibly duplicating final column. pixel_pointer[0] = (row & 0x80) ? intensity : off; @@ -190,15 +190,14 @@ class CGA { pixel_pointer[5] = (row & 0x04) ? intensity : off; pixel_pointer[6] = (row & 0x02) ? intensity : off; pixel_pointer[7] = (row & 0x01) ? intensity : off; - pixel_pointer[8] = (glyph >= 0xc0 && glyph < 0xe0) ? pixel_pointer[7] : blank; } } - pixel_pointer += 9; + pixel_pointer += 8; } } // Advance. - count += 9; + count += 8; // Output pixel row prematurely if storage is exhausted. if(output_state == OutputState::Pixels && pixel_pointer == pixels + DefaultAllocationSize) {