From 93a07b451767cecc1dd5a24f104d48cd4c9851b3 Mon Sep 17 00:00:00 2001 From: Stephen Anthony Date: Sun, 10 Mar 2019 16:49:11 -0230 Subject: [PATCH] Remove setting 'fixed' height from frame-manager completely. --- src/emucore/Console.cxx | 10 +--------- src/emucore/tia/TIA.hxx | 3 +-- .../tia/frame-manager/AbstractFrameManager.hxx | 6 ------ src/emucore/tia/frame-manager/FrameManager.cxx | 13 +------------ src/emucore/tia/frame-manager/FrameManager.hxx | 3 --- 5 files changed, 3 insertions(+), 32 deletions(-) diff --git a/src/emucore/Console.cxx b/src/emucore/Console.cxx index 153f95741..666ae93df 100644 --- a/src/emucore/Console.cxx +++ b/src/emucore/Console.cxx @@ -746,6 +746,7 @@ void Console::updateYStart(uInt32 ystart) // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - void Console::setTIAProperties() { + // FIXME - ystart is probably disappearing soon, or at least autodetection is uInt32 ystart = atoi(myProperties.get(Display_YStart).c_str()); if(ystart != 0) ystart = BSPF::clamp(ystart, 0u, TIAConstants::maxYStart); @@ -754,11 +755,6 @@ void Console::setTIAProperties() myYStartAutodetected = true; } -// FIXME - Remove concept of 'height' entirely -// The height will eventually be constant, and the aspect scaling will take care -// of differences in NTSC vs. PAL - uInt32 height = TIAConstants::viewableHeight; - if(myDisplayFormat == "NTSC" || myDisplayFormat == "PAL60" || myDisplayFormat == "SECAM60") { @@ -768,14 +764,10 @@ void Console::setTIAProperties() else { // Assume we've got ~312 scanlines (PAL-like format) - // PAL ROMs normally need at least 250 lines - height = std::max(height, 250u); - myTIA->setLayout(FrameLayout::pal); } myTIA->setYStart(ystart); - myTIA->setHeight(height); myEmulationTiming.updateFrameLayout(myTIA->frameLayout()); myEmulationTiming.updateConsoleTiming(myConsoleTiming); diff --git a/src/emucore/tia/TIA.hxx b/src/emucore/tia/TIA.hxx index 3cdbe9c64..27a8c7add 100644 --- a/src/emucore/tia/TIA.hxx +++ b/src/emucore/tia/TIA.hxx @@ -252,9 +252,8 @@ class TIA : public Device uInt32 ystart() const { return myFrameManager->ystart(); } /** - Changes the current Height/YStart properties. + Changes the current YStart property. */ - void setHeight(uInt32 height) { myFrameManager->setFixedHeight(height); } void setYStart(uInt32 ystart) { myFrameManager->setYstart(ystart); } void setLayout(FrameLayout layout) { myFrameManager->setLayout(layout); } diff --git a/src/emucore/tia/frame-manager/AbstractFrameManager.hxx b/src/emucore/tia/frame-manager/AbstractFrameManager.hxx index 664a337b6..d3ea2ddf2 100644 --- a/src/emucore/tia/frame-manager/AbstractFrameManager.hxx +++ b/src/emucore/tia/frame-manager/AbstractFrameManager.hxx @@ -148,12 +148,6 @@ class AbstractFrameManager : public Serializable */ virtual uInt32 height() const { return 0; } - /** - * Configure a fixed frame height (the default is determined by the frame - * layout). - */ - virtual void setFixedHeight(uInt32 height) {} - /** * The current y coordinate (valid only during rendering). */ diff --git a/src/emucore/tia/frame-manager/FrameManager.cxx b/src/emucore/tia/frame-manager/FrameManager.cxx index e553c0a16..cc0d32299 100644 --- a/src/emucore/tia/frame-manager/FrameManager.cxx +++ b/src/emucore/tia/frame-manager/FrameManager.cxx @@ -45,7 +45,6 @@ FrameManager::FrameManager() myOverscanLines(0), myFrameLines(0), myHeight(0), - myFixedHeight(0), myYStart(0), myJitterEnabled(false) { @@ -189,15 +188,7 @@ void FrameManager::onLayoutChange() } myFrameLines = Metrics::vsync + myVblankLines + myKernelLines + myOverscanLines; - if (myFixedHeight == 0) - myHeight = myKernelLines + Metrics::visibleOverscan; -} - -// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -void FrameManager::setFixedHeight(uInt32 height) -{ - myFixedHeight = height; - myHeight = myFixedHeight > 0 ? myFixedHeight : (myKernelLines + Metrics::visibleOverscan); + myHeight = myKernelLines + Metrics::visibleOverscan; } // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -221,7 +212,6 @@ bool FrameManager::onSave(Serializer& out) const out.putInt(myOverscanLines); out.putInt(myFrameLines); out.putInt(myHeight); - out.putInt(myFixedHeight); out.putInt(myYStart); out.putBool(myJitterEnabled); @@ -245,7 +235,6 @@ bool FrameManager::onLoad(Serializer& in) myOverscanLines = in.getInt(); myFrameLines = in.getInt(); myHeight = in.getInt(); - myFixedHeight = in.getInt(); myYStart = in.getInt(); myJitterEnabled = in.getBool(); diff --git a/src/emucore/tia/frame-manager/FrameManager.hxx b/src/emucore/tia/frame-manager/FrameManager.hxx index 7e3cd68f6..d133e93e5 100644 --- a/src/emucore/tia/frame-manager/FrameManager.hxx +++ b/src/emucore/tia/frame-manager/FrameManager.hxx @@ -38,8 +38,6 @@ class FrameManager: public AbstractFrameManager { uInt32 height() const override { return myHeight; } - void setFixedHeight(uInt32 height) override; - uInt32 getY() const override { return myY; } uInt32 scanlines() const override { return myCurrentFrameTotalLines; } @@ -91,7 +89,6 @@ class FrameManager: public AbstractFrameManager { uInt32 myOverscanLines; uInt32 myFrameLines; uInt32 myHeight; - uInt32 myFixedHeight; uInt32 myYStart; bool myJitterEnabled;