Fixed scanline calculation when out-of-spec ROMS don't use VSYNC at all.

In this case, the frame runs to the limits of the virtual 'TV' (342 scanlines).


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2559 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
This commit is contained in:
stephena 2012-10-25 13:07:18 +00:00
parent 8d9fcaf774
commit b67625bfec
2 changed files with 3 additions and 3 deletions

View File

@ -18,7 +18,8 @@
again, and old state files will not work with this release.
* Improved handling of 'illegal' VSYNC signals, which sometimes created
'short' frames that caused massive flickering.
'short' frames that caused massive flickering. Also improved
related behaviour when VSYNC isn't used at all.
* Improved emulation of RIOT chip, in particular the behaviour of
reading from TIMINT. Also, D6 of the Interrupt Flag register is now

View File

@ -623,8 +623,7 @@ inline void TIA::endFrame()
myPALFrameCounter++;
// Recalculate framerate. attempting to auto-correct for scanline 'jumps'
if(myFrameCounter % 8 == 0 && myAutoFrameEnabled &&
myScanlineCountForLastFrame < myMaximumNumberOfScanlines)
if(myFrameCounter % 8 == 0 && myAutoFrameEnabled)
{
myFramerate = (myScanlineCountForLastFrame > 285 ? 15600.0 : 15720.0) /
myScanlineCountForLastFrame;