Jump to content
  • entries
    657
  • comments
    2,689
  • views
    897,619

Overscan Jitter


SpiceWare

1,346 views

One of the limitations of Stella is it doesn't emulate the jitter that occurs if overscan runs longer/shorter than normal. This is a quick attempt to address this.

 

TIA.hxx
Change currentFrameBuffer

    uInt8* currentFrameBuffer() const
    {
        return myCurrentFrameBuffer + myFramePointerOffset + myVariableScanlineJitter*160;
    }
 


Add myVariableScanlineJitter

 

    // contains the difference between the scanline counts of the
    // last two frames. If non-zero the image should jitter.
    Int32 myVariableScanlineJitter;
 


TIA.hxx
Locate this bit of code in endFrame()

 

  // Recalculate framerate. attempting to auto-correct for scanline 'jumps'
  if(myAutoFrameEnabled)
 


and add this directly above it

 

  // save difference in scanline counts for jitter emulation
  myVariableScanlineJitter = myScanlineCountForLastFrame - previousCount;
  if (myVariableScanlineJitter < 0)
      myVariableScanlineJitter = --myVariableScanlineJitter / 2;
  else if (myVariableScanlineJitter > 0)
      myVariableScanlineJitter = ++myVariableScanlineJitter / 2;
 


Test build of Stella for Mac OS X:
Stella OS Jitter Test.app.zip

  • Like 1

0 Comments


Recommended Comments

There are no comments to display.

Guest
Add a comment...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...