diff --git a/Changes.txt b/Changes.txt index 27ba6e9c1..0276a60e7 100644 --- a/Changes.txt +++ b/Changes.txt @@ -51,7 +51,7 @@ * Added another oddball TIA glitch option for delayed background color. - * Added option to disable all scaling and postprocessing. + * Added option to disable aspect correct scaling. * Replaced "Re-disassemble" with "Disassemble @ current line" in debugger. diff --git a/docs/index.html b/docs/index.html index e5b9be777..a74fdc3a6 100644 --- a/docs/index.html +++ b/docs/index.html @@ -2285,8 +2285,8 @@ -
-tia.plain_video <1|0>
- Disable all scaling and postprocessing. +
-tia.correct_aspect <1|0>
+ Enable aspect correct scaling. diff --git a/src/emucore/Console.cxx b/src/emucore/Console.cxx index 3ae8c203e..04eafc58a 100644 --- a/src/emucore/Console.cxx +++ b/src/emucore/Console.cxx @@ -623,7 +623,7 @@ FBInitStatus Console::initializeVideo(bool full) if(full) { uInt32 width, height; - if (myOSystem.settings().getBool("tia.plain_video")) { + if (myOSystem.settings().getBool("tia.correct_aspect")) { width = 2 * myTIA->width(); height = myTIA->height(); } else { diff --git a/src/emucore/FrameBuffer.cxx b/src/emucore/FrameBuffer.cxx index 80b1d67e1..6f5dd951a 100644 --- a/src/emucore/FrameBuffer.cxx +++ b/src/emucore/FrameBuffer.cxx @@ -835,7 +835,8 @@ void FrameBuffer::setPauseDelay() } // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -shared_ptr FrameBuffer::allocateSurface(int w, int h, ScalingInterpolation interpolation, const uInt32* data) +shared_ptr FrameBuffer::allocateSurface(int w, int h, ScalingInterpolation interpolation, + const uInt32* data) { // Add new surface to the list mySurfaceList.push_back(createSurface(w, h, interpolation, data)); diff --git a/src/emucore/Settings.cxx b/src/emucore/Settings.cxx index f3f1ef61b..083b97467 100644 --- a/src/emucore/Settings.cxx +++ b/src/emucore/Settings.cxx @@ -57,7 +57,7 @@ Settings::Settings() setPermanent("tia.fs_overscan", "0"); setPermanent("tia.vsizeadjust", 0); setPermanent("tia.dbgcolors", "roygpb"); - setTemporary("tia.plain_video", "false"); + setTemporary("tia.correct_aspect", "true"); // Palette options setPermanent("palette", PaletteHandler::SETTING_STANDARD); setPermanent("pal.phase_ntsc", "26.2"); @@ -454,7 +454,7 @@ void Settings::usage() const << " -tia.fs_overscan <0-10> Add overscan to TIA image in fullscreen mode\n" << " -tia.dbgcolors Debug colors to use for each object (see manual\n" << " for description)\n" - << " -tia.plain_video <1|0> Disable all scaling and postprocessing\n" + << " -tia.correct_aspect <1|0> Enable aspect correct scaling\n" << endl << " -tv.filter <0-5> Set TV effects off (0) or to specified mode\n" << " (1-5)\n" diff --git a/src/emucore/TIASurface.cxx b/src/emucore/TIASurface.cxx index a9cca5795..2a2cd0327 100644 --- a/src/emucore/TIASurface.cxx +++ b/src/emucore/TIASurface.cxx @@ -56,7 +56,7 @@ TIASurface::TIASurface(OSystem& system) myTiaSurface = myFB.allocateSurface( AtariNTSC::outWidth(TIAConstants::frameBufferWidth), TIAConstants::frameBufferHeight, - plainVideoEnabled() + !correctAspect() ? FrameBuffer::ScalingInterpolation::none : interpolationModeFromSettings(myOSystem.settings()) ); @@ -278,8 +278,6 @@ uInt32 TIASurface::enableScanlines(int change) // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - void TIASurface::enablePhosphor(bool enable, int blend) { - enable = enable && !plainVideoEnabled(); - if(myPhosphorHandler.initialize(enable, blend)) { myFilter = Filter(enable ? uInt8(myFilter) | 0x01 : uInt8(myFilter) & 0x10); @@ -290,8 +288,6 @@ void TIASurface::enablePhosphor(bool enable, int blend) // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - void TIASurface::enableNTSC(bool enable) { - enable = enable && !plainVideoEnabled(); - myFilter = Filter(enable ? uInt8(myFilter) | 0x10 : uInt8(myFilter) & 0x01); uInt32 surfaceWidth = enable ? @@ -305,7 +301,7 @@ void TIASurface::enableNTSC(bool enable) mySLineSurface->setSrcSize(1, 2 * myTIA->height()); - myScanlinesEnabled = !plainVideoEnabled() && myOSystem.settings().getInt("tv.scanlines") > 0; + myScanlinesEnabled = myOSystem.settings().getInt("tv.scanlines") > 0; FBSurface::Attributes& sl_attr = mySLineSurface->attributes(); sl_attr.blending = myScanlinesEnabled; sl_attr.blendalpha = myOSystem.settings().getInt("tv.scanlines"); @@ -317,10 +313,9 @@ void TIASurface::enableNTSC(bool enable) // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - string TIASurface::effectsInfo() const { - if (plainVideoEnabled()) return "Plain video mode"; - const FBSurface::Attributes& attr = mySLineSurface->attributes(); ostringstream buf; + switch(myFilter) { case Filter::Normal: @@ -333,12 +328,12 @@ string TIASurface::effectsInfo() const buf << myNTSCFilter.getPreset() << ", scanlines=" << attr.blendalpha; break; case Filter::BlarggPhosphor: - buf << myNTSCFilter.getPreset() << ", phosphor, scanlines=" - << attr.blendalpha; + buf << myNTSCFilter.getPreset() << ", phosphor, scanlines=" << attr.blendalpha; break; } buf << ", inter=" << (myOSystem.settings().getBool("tia.inter") ? "enabled" : "disabled"); + buf << ", aspect correction=" << (correctAspect() ? "enabled" : "disabled"); return buf.str(); } @@ -524,6 +519,6 @@ void TIASurface::updateSurfaceSettings() } // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -bool TIASurface::plainVideoEnabled() const { - return myOSystem.settings().getBool("tia.plain_video"); +bool TIASurface::correctAspect() const { + return myOSystem.settings().getBool("tia.correct_aspect"); } diff --git a/src/emucore/TIASurface.hxx b/src/emucore/TIASurface.hxx index a8c17bda4..dd38b2de5 100644 --- a/src/emucore/TIASurface.hxx +++ b/src/emucore/TIASurface.hxx @@ -184,7 +184,7 @@ class TIASurface uInt32 averageBuffers(uInt32 bufOfs); // Is plain video mode enabled? - bool plainVideoEnabled() const; + bool correctAspect() const; private: // Enumeration created such that phosphor off/on is in LSB,