Skip to content

Commit

Permalink
Video 7 RGB doesn't have NTSC artifacts on the mixed mode text
Browse files Browse the repository at this point in the history
  • Loading branch information
ivanizag committed Jan 25, 2024
1 parent ddfc462 commit 624374f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
3 changes: 2 additions & 1 deletion screen/snapshots.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ func snapshotByMode(vs VideoSource, videoMode uint16, screenMode int) *image.RGB
mixMode := videoMode & VideoMixTextMask
isSecondPage := (videoMode & VideoSecondPage) != 0
isAltText := (videoMode & VideoAltText) != 0
isRGBCard := (videoMode & VideoRGBCard) != 0

var lightColor color.Color = color.White
if screenMode == ScreenModeGreen {
Expand Down Expand Up @@ -99,7 +100,7 @@ func snapshotByMode(vs VideoSource, videoMode uint16, screenMode int) *image.RGB

if mixMode != 0 {
var bottom *image.RGBA
applyNTSCFilter := screenMode != ScreenModeGreen
applyNTSCFilter := screenMode != ScreenModeGreen && !isRGBCard
switch mixMode {
case VideoMixText40:
bottom = snapshotText40(vs, isSecondPage, isAltText, lightColor)
Expand Down
1 change: 1 addition & 0 deletions screen/videoSource.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ const (
VideoModifiersMask uint16 = 0xf000
VideoSecondPage uint16 = 0x1000
VideoAltText uint16 = 0x2000
VideoRGBCard uint16 = 0x4000
)

// VideoSource provides the info to build the video output
Expand Down
3 changes: 3 additions & 0 deletions videoSourceImpl.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,9 @@ func (a *Apple2) GetCurrentVideoMode() uint16 {
if isAltText {
mode |= screen.VideoAltText
}
if isRGBCard {
mode |= screen.VideoRGBCard
}

return mode
}
Expand Down

0 comments on commit 624374f

Please sign in to comment.