From 8e109720e6f8cfaacd6616ae82e6670a82af44af Mon Sep 17 00:00:00 2001 From: Ivan Izaguirre Date: Wed, 23 Sep 2020 18:08:19 +0200 Subject: [PATCH] RGB video modes available only with RGB card --- cardRGB.go | 2 ++ screen.go | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/cardRGB.go b/cardRGB.go index 37e47f9..b296a2a 100644 --- a/cardRGB.go +++ b/cardRGB.go @@ -35,6 +35,8 @@ func setupRGBCard(a *Apple2) *cardRGB { var c cardRGB c.step = 0 + a.io.softSwitchesData[ioFlagRGBCardActive] = ssOn + // Does not have ROM or private softswitches. It spies on the softswitches a.io.addSoftSwitchRW(0x50, func(io *ioC0Page) uint8 { io.softSwitchesData[ioFlagText] = ssOff diff --git a/screen.go b/screen.go index 6c193e9..5a20743 100644 --- a/screen.go +++ b/screen.go @@ -49,6 +49,7 @@ func getCurrentVideoMode(a *Apple2) uint16 { isDoubleResMode := !isTextMode && is80Columns && !a.io.isSoftSwitchActive(ioFlagAnnunciator3) isSuperHighResMode := a.io.isSoftSwitchActive(ioDataNewVideo) + isRGBCard := a.io.isSoftSwitchActive(ioFlagRGBCardActive) rgbFlag1 := a.io.isSoftSwitchActive(ioFlag1RGBCard) rgbFlag2 := a.io.isSoftSwitchActive(ioFlag2RGBCard) isMono560 := isDoubleResMode && !rgbFlag1 && !rgbFlag2 @@ -64,7 +65,7 @@ func getCurrentVideoMode(a *Apple2) uint16 { } else if isTextMode { if is80Columns { mode = videoText80 - } else if isStore80Active { + } else if isRGBCard && isStore80Active { mode = videoText40RGB } else { mode = videoText40