diff --git a/Changes.txt b/Changes.txt index 2e229c2ba..4b684cedf 100644 --- a/Changes.txt +++ b/Changes.txt @@ -35,6 +35,9 @@ information). In the case of 'saveses', the filename is now named based on the date and time of when the command was entered. + * Fixed bug with saving snapshots in 'filtering disabled' mode; there + was graphical corruption in some cases. + * Added debugger pseudo-register '_fcycles', which gives the number of CPU cycles that have occurred since the frame started. diff --git a/src/emucore/TIASurface.cxx b/src/emucore/TIASurface.cxx index 2aaca0e7b..b474cb313 100644 --- a/src/emucore/TIASurface.cxx +++ b/src/emucore/TIASurface.cxx @@ -122,8 +122,9 @@ const FBSurface& TIASurface::baseSurface(GUI::Rect& rect) const { for(uInt32 x = 0; x < tiaw; ++x) { - *buf_ptr++ = myFB.tiaSurface().pixel(y*tiaw + x); - *buf_ptr++ = myFB.tiaSurface().pixel(y*tiaw + x); + uInt32 pixel = myPalette[*(myTIA->frameBuffer() + y*tiaw + x)]; + *buf_ptr++ = pixel; + *buf_ptr++ = pixel; } } @@ -133,22 +134,7 @@ const FBSurface& TIASurface::baseSurface(GUI::Rect& rect) const // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - uInt32 TIASurface::pixel(uInt32 idx, uInt8 shift) { - uInt8 c = *(myTIA->frameBuffer() + idx) | shift; - - if(!myUsePhosphor) - return myPalette[c]; - else - { - const uInt32 p = myRGBFramebuffer[idx]; - - // Mix current calculated frame with previous displayed frame - const uInt32 retVal = getRGBPhosphor(myPalette[c], p); - - // Store back into displayed frame buffer (for next frame) - myRGBFramebuffer[idx] = retVal; - - return retVal; - } + return myPalette[*(myTIA->frameBuffer() + idx) | shift]; } // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -