Skip to content

Commit

Permalink
an unsynced frame will no longer cause the screen to resize
Browse files Browse the repository at this point in the history
  • Loading branch information
JetSetIlly committed Jun 18, 2021
1 parent 0080144 commit 4d6c37b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
6 changes: 3 additions & 3 deletions hardware/memory/cartridge/harmony/arm7tdmi/arm7.go
Original file line number Diff line number Diff line change
Expand Up @@ -576,16 +576,16 @@ func (arm *ARM) Run(mamcr uint32) (uint32, float32, error) {
fallthrough
case 0:
stretchedCycles += (arm.cyclesInstruction.Npc + arm.cyclesInstruction.Spc) * arm.stretchFlash
stretchedCycles += (arm.cyclesInstruction.Spcmerged) * arm.stretchFlash
// stretchedCycles += (arm.cyclesInstruction.Spcmerged) * arm.stretchFlash
stretchedCycles += (arm.cyclesInstruction.Ndata + arm.cyclesInstruction.Sdata) * arm.stretchSRAM
case 1:
stretchedCycles += (arm.cyclesInstruction.Npc * arm.stretchFlash)
stretchedCycles += (arm.cyclesInstruction.Spc * arm.stretchMAM)
stretchedCycles += (arm.cyclesInstruction.Spcmerged) * arm.stretchMAM
// stretchedCycles += (arm.cyclesInstruction.Spcmerged) * arm.stretchMAM
stretchedCycles += (arm.cyclesInstruction.Ndata + arm.cyclesInstruction.Sdata) * arm.stretchSRAM
case 2:
stretchedCycles += (arm.cyclesInstruction.Npc + arm.cyclesInstruction.Spc) * arm.stretchMAM
stretchedCycles += (arm.cyclesInstruction.Spcmerged) * arm.stretchMAM
// stretchedCycles += (arm.cyclesInstruction.Spcmerged) * arm.stretchMAM
stretchedCycles += (arm.cyclesInstruction.Ndata + arm.cyclesInstruction.Sdata) * arm.stretchMAM
}

Expand Down
5 changes: 4 additions & 1 deletion hardware/television/resizer.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ import (
//
// * changes size after setup phase
// - Ladybug
// - aTaRSI (demo)
//
// * the occasional unsynced frame
// - Hack Em Hangly Pacman
Expand Down Expand Up @@ -94,6 +93,10 @@ func (sr *resizer) examine(tv *Television, sig signal.SignalAttributes) {
// TV. the best example of this is Andrew Davie's chess which simply does
// not care about frames during the computer's thinking time.
if !tv.state.syncedFrame {
// reset any pending changes on an unsynced frame
tv.state.resizer.pendingCt = 0
sr.pendingTop = sr.currTop
sr.pendingBottom = sr.currBottom
return
}

Expand Down

0 comments on commit 4d6c37b

Please sign in to comment.