From 5656c0ea8a2bcc1db39eae253a605ce27e44de94 Mon Sep 17 00:00:00 2001 From: arbee Date: Fri, 17 Apr 2020 19:58:18 -0400 Subject: [PATCH] apple2gs: Fix the behavior for fill mode when no previous color is set [R. Belmont] --- src/mame/video/apple2.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/mame/video/apple2.cpp b/src/mame/video/apple2.cpp index af8dfbb6fc0..b55fb1c4c84 100644 --- a/src/mame/video/apple2.cpp +++ b/src/mame/video/apple2.cpp @@ -1372,6 +1372,15 @@ uint32_t a2_video_device::screen_update_GS(screen_device &screen, bitmap_rgb32 & } else // 320 mode { + // the low 5 bits of the SCB determine the initial fillmode color + // for the scanline (hardware testing by John Brooks) + static const uint32_t fillmode_init[32] = + { + 2, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf, + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf, + }; + + last_pixel = fillmode_init[scb & 0x1f]; for (col = 0; col < 160; col++) { b = vram[col];