mirror of
https://github.com/JetSetIlly/Gopher2600.git
synced 2024-05-20 13:48:02 -04:00
vcs.RunForFrameCount() checks for CPU KIL state
This commit is contained in:
parent
7a6d877096
commit
5b7a22ebb9
|
@ -110,6 +110,12 @@ func (vcs *VCS) RunForFrameCount(numFrames int, continueCheck func(frame int) (g
|
|||
|
||||
state := govern.Running
|
||||
for frameNum != targetFrame && state != govern.Ending {
|
||||
// check if CPU has been killed. emulation will run forever if we don't
|
||||
// check for this
|
||||
if vcs.CPU.Killed {
|
||||
return nil
|
||||
}
|
||||
|
||||
err := vcs.Step(nil)
|
||||
if err != nil {
|
||||
return err
|
||||
|
|
|
@ -15,4 +15,8 @@
|
|||
|
||||
// Package preview is used to emulate a ROM for a short period of time in order
|
||||
// to gather information that would takes time to acquire.
|
||||
//
|
||||
// For example, it is used to determine the initial framing for the television
|
||||
// on startup. Without a preview emulation the default framing will most often
|
||||
// be wrong, resulting in a visible change in the image.
|
||||
package preview
|
||||
|
|
|
@ -28,7 +28,7 @@ type Emulation struct {
|
|||
vcs *hardware.VCS
|
||||
}
|
||||
|
||||
// NewPreview is the preferred method of initialisation for the Preview type
|
||||
// NewEmulation is the preferred method of initialisation for the Emulation type
|
||||
func NewEmulation(prefs *preferences.Preferences) (*Emulation, error) {
|
||||
em := &Emulation{}
|
||||
|
||||
|
|
Loading…
Reference in a new issue