mirror of
https://github.com/ivanizag/izapple2.git
synced 2025-03-12 19:31:47 +00:00
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 {
|
||||
cardBase
|
||||
selected int // q5, Only 0 and 1 supported
|
||||
|
@ -81,7 +81,7 @@ func fyneRun(s *state) {
|
||||
if !s.a.IsPaused() {
|
||||
var img *image.RGBA
|
||||
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))
|
||||
} else {
|
||||
img = s.a.Snapshot(s.screenMode)
|
||||
|
@ -85,7 +85,7 @@ func sdlRun(a *izapple2.Apple2) {
|
||||
if !a.IsPaused() {
|
||||
var img *image.RGBA
|
||||
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))
|
||||
} else {
|
||||
img = a.Snapshot(izapple2.ScreenModeNTSC)
|
||||
|
@ -190,7 +190,7 @@ func (a *Apple2) Snapshot(screenMode int) *image.RGBA {
|
||||
videoMode := getCurrentVideoMode(a)
|
||||
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
|
||||
snap = linesSeparatedFilter(snap)
|
||||
}
|
||||
|
@ -5,16 +5,16 @@ import (
|
||||
)
|
||||
|
||||
// SnapshotParts the currently visible screen
|
||||
func (a *Apple2) SnapshotParts() *image.RGBA {
|
||||
func (a *Apple2) SnapshotParts(screenMode int) *image.RGBA {
|
||||
videoMode := getCurrentVideoMode(a)
|
||||
isSecondPage := (videoMode & videoSecondPage) != 0
|
||||
videoBase := videoMode & videoBaseMask
|
||||
mixMode := videoMode & videoMixTextMask
|
||||
modifiers := videoMode & videoModifiersMask
|
||||
|
||||
snapScreen := snapshotByMode(a, videoMode, ScreenModePlain)
|
||||
snapPage1 := snapshotByMode(a, videoMode&^videoSecondPage, ScreenModePlain)
|
||||
snapPage2 := snapshotByMode(a, videoMode|videoSecondPage, ScreenModePlain)
|
||||
snapScreen := snapshotByMode(a, videoMode, screenMode)
|
||||
snapPage1 := snapshotByMode(a, videoMode&^videoSecondPage, screenMode)
|
||||
snapPage2 := snapshotByMode(a, videoMode|videoSecondPage, screenMode)
|
||||
var snapAux *image.RGBA
|
||||
|
||||
/*
|
||||
@ -28,11 +28,11 @@ func (a *Apple2) SnapshotParts() *image.RGBA {
|
||||
} else {
|
||||
switch mixMode {
|
||||
case videoMixText80:
|
||||
snapAux = snapshotByMode(a, videoText80|modifiers, ScreenModePlain)
|
||||
snapAux = snapshotByMode(a, videoText80|modifiers, screenMode)
|
||||
case videoMixText40RGB:
|
||||
snapAux = snapshotByMode(a, videoText40RGB|modifiers, ScreenModePlain)
|
||||
snapAux = snapshotByMode(a, videoText40RGB|modifiers, screenMode)
|
||||
default:
|
||||
snapAux = snapshotByMode(a, videoText40|modifiers, ScreenModePlain)
|
||||
snapAux = snapshotByMode(a, videoText40|modifiers, screenMode)
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user