From 138440b31bb6f10d25e9607a7e5ef2a627cab999 Mon Sep 17 00:00:00 2001 From: David Kuder Date: Tue, 2 May 2023 16:19:10 -0400 Subject: [PATCH] Video 7 Monochrome and 160x192 mode fixes --- vga/render_dhgr.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/vga/render_dhgr.c b/vga/render_dhgr.c index 3dd623a..e26e8f9 100644 --- a/vga/render_dhgr.c +++ b/vga/render_dhgr.c @@ -25,7 +25,7 @@ static inline uint dhgr_line_to_mem_offset(uint line) { void DELAYED_COPY_CODE(render_dhgr)() { - if((internal_flags & IFLAGS_VIDEO7) && (internal_flags & IFLAGS_V7_MODE3 == IFLAGS_V7_MODE3)) { + if((internal_flags & IFLAGS_VIDEO7) && (internal_flags & IFLAGS_V7_MODE3 == IFLAGS_V7_MODE0)) { mono_rendering = true; } for(uint line=0; line < 192; line++) { @@ -34,7 +34,7 @@ void DELAYED_COPY_CODE(render_dhgr)() { } void DELAYED_COPY_CODE(render_mixed_dhgr)() { - if((internal_flags & IFLAGS_VIDEO7) && (internal_flags & IFLAGS_V7_MODE3 == IFLAGS_V7_MODE3)) { + if((internal_flags & IFLAGS_VIDEO7) && (internal_flags & IFLAGS_V7_MODE3 == IFLAGS_V7_MODE0)) { mono_rendering = true; } for(uint line=0; line < 160; line++) { @@ -64,7 +64,7 @@ static void DELAYED_COPY_CODE(render_dhgr_line)(bool p2, uint line) { sl->data[sl_pos++] = (text_border|THEN_EXTEND_3) | ((text_border|THEN_EXTEND_3) << 16); // 16 pixels per word } - // DHGR is weird. Nuff said. + // DHGR is weird. Video-7 just makes it weirder. Nuff said. uint32_t dots = 0; uint_fast8_t dotc = 0; uint32_t pixeldata; @@ -91,7 +91,7 @@ static void DELAYED_COPY_CODE(render_dhgr_line)(bool p2, uint line) { dotc -= 2; } } - } else if((internal_flags & IFLAGS_VIDEO7) && ((internal_flags & IFLAGS_V7_MODE3) == IFLAGS_V7_MODE1)) { + } else if((internal_flags & IFLAGS_VIDEO7) && ((internal_flags & IFLAGS_V7_MODE3) == IFLAGS_V7_MODE2)) { while(i < 40) { // Load in as many subpixels as possible while((dotc <= 18) && (i < 40)) {