Screenmode in debug mode
This commit is contained in:
parent
4ec3bff858
commit
9d4df5b643
|
@ -20,6 +20,7 @@ NIB: 35 tracks 6656 bytes, 232960 bytes
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
// CardDisk2 is a DiskII interface card
|
||||||
type CardDisk2 struct {
|
type CardDisk2 struct {
|
||||||
cardBase
|
cardBase
|
||||||
selected int // q5, Only 0 and 1 supported
|
selected int // q5, Only 0 and 1 supported
|
||||||
|
|
|
@ -81,7 +81,7 @@ func fyneRun(s *state) {
|
||||||
if !s.a.IsPaused() {
|
if !s.a.IsPaused() {
|
||||||
var img *image.RGBA
|
var img *image.RGBA
|
||||||
if s.showPages {
|
if s.showPages {
|
||||||
img = s.a.SnapshotParts()
|
img = s.a.SnapshotParts(s.screenMode)
|
||||||
s.win.SetTitle(fmt.Sprintf("%v %v %vx%v", s.a.Name, s.a.VideoModeName(), img.Rect.Dx()/2, img.Rect.Dy()/2))
|
s.win.SetTitle(fmt.Sprintf("%v %v %vx%v", s.a.Name, s.a.VideoModeName(), img.Rect.Dx()/2, img.Rect.Dy()/2))
|
||||||
} else {
|
} else {
|
||||||
img = s.a.Snapshot(s.screenMode)
|
img = s.a.Snapshot(s.screenMode)
|
||||||
|
|
|
@ -85,7 +85,7 @@ func sdlRun(a *izapple2.Apple2) {
|
||||||
if !a.IsPaused() {
|
if !a.IsPaused() {
|
||||||
var img *image.RGBA
|
var img *image.RGBA
|
||||||
if kp.showPages {
|
if kp.showPages {
|
||||||
img = a.SnapshotParts()
|
img = a.SnapshotParts(izapple2.ScreenModeNTSC)
|
||||||
window.SetTitle(fmt.Sprintf("%v %v %vx%v", a.Name, a.VideoModeName(), img.Rect.Dx()/2, img.Rect.Dy()/2))
|
window.SetTitle(fmt.Sprintf("%v %v %vx%v", a.Name, a.VideoModeName(), img.Rect.Dx()/2, img.Rect.Dy()/2))
|
||||||
} else {
|
} else {
|
||||||
img = a.Snapshot(izapple2.ScreenModeNTSC)
|
img = a.Snapshot(izapple2.ScreenModeNTSC)
|
||||||
|
|
|
@ -190,7 +190,7 @@ func (a *Apple2) Snapshot(screenMode int) *image.RGBA {
|
||||||
videoMode := getCurrentVideoMode(a)
|
videoMode := getCurrentVideoMode(a)
|
||||||
snap := snapshotByMode(a, videoMode, screenMode)
|
snap := snapshotByMode(a, videoMode, screenMode)
|
||||||
|
|
||||||
if screenMode == ScreenModeNTSC && snap.Bounds().Dy() == hiResHeight {
|
if screenMode != ScreenModePlain && snap.Bounds().Dy() == hiResHeight {
|
||||||
// Apply the filter to regular CRT snapshots with 192 lines. Not to SHR
|
// Apply the filter to regular CRT snapshots with 192 lines. Not to SHR
|
||||||
snap = linesSeparatedFilter(snap)
|
snap = linesSeparatedFilter(snap)
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,16 +5,16 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
// SnapshotParts the currently visible screen
|
// SnapshotParts the currently visible screen
|
||||||
func (a *Apple2) SnapshotParts() *image.RGBA {
|
func (a *Apple2) SnapshotParts(screenMode int) *image.RGBA {
|
||||||
videoMode := getCurrentVideoMode(a)
|
videoMode := getCurrentVideoMode(a)
|
||||||
isSecondPage := (videoMode & videoSecondPage) != 0
|
isSecondPage := (videoMode & videoSecondPage) != 0
|
||||||
videoBase := videoMode & videoBaseMask
|
videoBase := videoMode & videoBaseMask
|
||||||
mixMode := videoMode & videoMixTextMask
|
mixMode := videoMode & videoMixTextMask
|
||||||
modifiers := videoMode & videoModifiersMask
|
modifiers := videoMode & videoModifiersMask
|
||||||
|
|
||||||
snapScreen := snapshotByMode(a, videoMode, ScreenModePlain)
|
snapScreen := snapshotByMode(a, videoMode, screenMode)
|
||||||
snapPage1 := snapshotByMode(a, videoMode&^videoSecondPage, ScreenModePlain)
|
snapPage1 := snapshotByMode(a, videoMode&^videoSecondPage, screenMode)
|
||||||
snapPage2 := snapshotByMode(a, videoMode|videoSecondPage, ScreenModePlain)
|
snapPage2 := snapshotByMode(a, videoMode|videoSecondPage, screenMode)
|
||||||
var snapAux *image.RGBA
|
var snapAux *image.RGBA
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -28,11 +28,11 @@ func (a *Apple2) SnapshotParts() *image.RGBA {
|
||||||
} else {
|
} else {
|
||||||
switch mixMode {
|
switch mixMode {
|
||||||
case videoMixText80:
|
case videoMixText80:
|
||||||
snapAux = snapshotByMode(a, videoText80|modifiers, ScreenModePlain)
|
snapAux = snapshotByMode(a, videoText80|modifiers, screenMode)
|
||||||
case videoMixText40RGB:
|
case videoMixText40RGB:
|
||||||
snapAux = snapshotByMode(a, videoText40RGB|modifiers, ScreenModePlain)
|
snapAux = snapshotByMode(a, videoText40RGB|modifiers, screenMode)
|
||||||
default:
|
default:
|
||||||
snapAux = snapshotByMode(a, videoText40|modifiers, ScreenModePlain)
|
snapAux = snapshotByMode(a, videoText40|modifiers, screenMode)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue