diff --git a/src/emucore/Console.cxx b/src/emucore/Console.cxx index 8c1d0a46b..152d7dd9d 100644 --- a/src/emucore/Console.cxx +++ b/src/emucore/Console.cxx @@ -506,16 +506,26 @@ void Console::changeYStart(int direction) else return; - myTIA->setYStart(ystart); - myTIA->frameReset(); - ostringstream val; val << ystart; if(ystart == FrameManager::minYStart-1) myOSystem.frameBuffer().showMessage("YStart autodetected"); else - myOSystem.frameBuffer().showMessage("YStart " + val.str()); + { + if(myTIA->ystartIsAuto(ystart)) + { + // We've reached the auto-detect value, so reset + myOSystem.frameBuffer().showMessage("YStart " + val.str() + " (Auto)"); + val.str(""); + val << FrameManager::minYStart-1; + } + else + myOSystem.frameBuffer().showMessage("YStart " + val.str()); + } + myProperties.set(Display_YStart, val.str()); + myTIA->setYStart(ystart); + myTIA->frameReset(); } // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/emucore/DefProps.hxx b/src/emucore/DefProps.hxx index a31a8cd49..576fe762f 100644 --- a/src/emucore/DefProps.hxx +++ b/src/emucore/DefProps.hxx @@ -528,7 +528,7 @@ static const char* DefProps[DEF_PROPS_SIZE][21] = { { "278155fc9956e9b6ef2359eb238f7c7f", "", "", "Donkey Kong Junior (Unknown) (Hack)", "Hack of Donkey Kong Junior", "Hack", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" }, { "2783006ee6519f15cbc96adae031c9a9", "Telegames", "", "Night Stalker (1989) (Telegames) (PAL) [a]", "AKA Dark Cavern", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" }, { "278531cc31915747018d22145823d2c9", "", "", "Defender MegaDrive (PAL) (Genesis)", "Genesis controller (C is smartbomb)", "Hack of Defender", "", "", "", "", "", "", "GENESIS", "", "", "", "", "", "", "", "" }, - { "278f14887d601b5e5b620f1870bc09f6", "Thomas Jentzsch", "", "SWOOPS! (v0.96) (TJ)", "Uses the Joystick (L) and Paddle (R) Controllers", "Homebrew", "", "", "", "", "", "", "", "PADDLES", "", "", "", "", "", "", "" }, + { "278f14887d601b5e5b620f1870bc09f6", "Thomas Jentzsch", "", "SWOOPS! (v0.96) (TJ)", "Uses the Joystick (L) and Paddle (R) Controllers", "Homebrew", "", "", "", "", "", "", "", "PADDLES", "", "", "", "28", "", "", "" }, { "27c4c2af4b46394bb98638af8e0f6e9d", "Atari, Jerome Domurat, Peter C. Niday, Robert Vieira", "CX26109", "Sorcerer's Apprentice (1983) (Atari) (Prototype)", "", "Prototype", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" }, { "27c6a2ca16ad7d814626ceea62fa8fb4", "Parker Brothers, Mark Lesser", "PB5590", "Frogger II (1984) (Parker Bros)", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "YES", "" }, { "27f9e2e1b92af9dc17c6155605c38e49", "CCE", "", "Nightmare (CCE)", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" }, @@ -1066,7 +1066,7 @@ static const char* DefProps[DEF_PROPS_SIZE][21] = { { "50200f697aeef38a3ce31c4f49739551", "Mystique - American Multiple Industries, Joel H. Martin", "", "Custer's Revenge (1982) (Mystique) (PAL60)", "", "", "", "", "", "", "", "", "", "", "", "", "PAL60", "", "", "", "" }, { "502044b1ac111b394e6fbb0d821fca41", "", "", "Hangman Invader 4letter (Hack)", "Hack of Hangman", "Hack", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" }, { "502168660bfd9c1d2649d415dc89c69d", "Activision, Bob Whitehead - Ariola", "EAG-019, EAG-019-04I - 711 019-715", "Sky Jinks (1982) (Activision) (PAL) (4K)", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" }, - { "504688d49a41bf03d8a955512609f3f2", "Thomas Jentzsch", "", "SWOOPS! (TJ)", "Uses the Joystick (L) and Paddle (R) Controllers", "Homebrew", "", "", "", "", "", "", "", "PADDLES", "", "", "", "", "", "", "" }, + { "504688d49a41bf03d8a955512609f3f2", "Thomas Jentzsch", "", "SWOOPS! (TJ)", "Uses the Joystick (L) and Paddle (R) Controllers", "Homebrew", "", "", "", "", "", "", "", "PADDLES", "", "", "", "28", "", "", "" }, { "50568c80ac61cab789d9923c9b05b68e", "Ebivision", "", "Merlin's Walls - Standard Edition (1999) (Ebivision)", "Image rotated 90 degrees CW", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" }, { "5069fecbe4706371f17737b0357cfa68", "Apollo - Games by Apollo, Steve Stringfellow", "AP-2005", "Shark Attack (1982) (Apollo) (PAL)", "AKA Lochjaw", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" }, { "5079bfbc7b8f5770f84215ed2e3bdd1b", "Omegamatrix (2012)", "", "Genesis Button Tester", "", "Homebrew", "", "", "", "", "", "", "GENESIS", "GENESIS", "", "", "", "", "", "", "" }, @@ -1221,7 +1221,7 @@ static const char* DefProps[DEF_PROPS_SIZE][21] = { { "5d25df9dc2cde746ceac48e834cf84a7", "Activision, Steve 'Jessica' Kitchen", "EAZ-033", "Space Shuttle (1983) (Activision) (SECAM)", "", "", "", "FE", "", "", "", "", "", "", "", "", "SECAM", "", "", "", "" }, { "5d2cc33ca798783dee435eb29debf6d6", "Activision, Mike Riedel", "AK-043-04", "Commando (1988) (Activision)", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" }, { "5d799bfa9e1e7b6224877162accada0d", "Spectravision, Spectravideo, David Lubar", "SA-206", "Challenge of.... Nexar, The (1982) (Spectravision)", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" }, - { "5d8f1ab95362acdf3426d572a6301bf2", "Thomas Jentzsch", "", "SWOOPS! (v0.96) (TJ) (PAL)", "Uses the Joystick (L) and Paddle (R) Controllers", "Homebrew", "", "", "", "", "", "", "", "PADDLES", "", "", "", "", "", "", "" }, + { "5d8f1ab95362acdf3426d572a6301bf2", "Thomas Jentzsch", "", "SWOOPS! (v0.96) (TJ) (PAL)", "Uses the Joystick (L) and Paddle (R) Controllers", "Homebrew", "", "", "", "", "", "", "", "PADDLES", "", "", "", "28", "", "", "" }, { "5d8fb14860c2f198472b233874f6b0c9", "", "", "Boing! (PD) [a2]", "", "New Release", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" }, { "5d9592756425192ec621d2613d0e683d", "CCE", "C-839", "Misterious Thief, A (1983) (CCE) [a]", "AKA A Mysterious Thief", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" }, { "5da8fd0b5ed33a360bff37f8b5d0cd58", "Tron", "", "Pole Position (Tron)", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" }, diff --git a/src/emucore/stella.pro b/src/emucore/stella.pro index 1def06733..d9ed27771 100644 --- a/src/emucore/stella.pro +++ b/src/emucore/stella.pro @@ -3075,6 +3075,7 @@ "Cartridge.Note" "Uses the Joystick (L) and Paddle (R) Controllers" "Cartridge.Rarity" "Homebrew" "Controller.Right" "PADDLES" +"Display.YStart" "28" "" "Cartridge.MD5" "27c4c2af4b46394bb98638af8e0f6e9d" @@ -6382,6 +6383,7 @@ "Cartridge.Note" "Uses the Joystick (L) and Paddle (R) Controllers" "Cartridge.Rarity" "Homebrew" "Controller.Right" "PADDLES" +"Display.YStart" "28" "" "Cartridge.MD5" "50568c80ac61cab789d9923c9b05b68e" @@ -7335,6 +7337,7 @@ "Cartridge.Note" "Uses the Joystick (L) and Paddle (R) Controllers" "Cartridge.Rarity" "Homebrew" "Controller.Right" "PADDLES" +"Display.YStart" "28" "" "Cartridge.MD5" "5d8fb14860c2f198472b233874f6b0c9" diff --git a/src/emucore/tia/FrameManager.hxx b/src/emucore/tia/FrameManager.hxx index 28b7be033..ea9376027 100644 --- a/src/emucore/tia/FrameManager.hxx +++ b/src/emucore/tia/FrameManager.hxx @@ -74,6 +74,7 @@ class FrameManager : public Serializable void setYstart(uInt32 ystart) { myVblankManager.setYstart(ystart); } uInt32 ystart() const { return myVblankManager.ystart(); } + bool ystartIsAuto(uInt32 line) const { return myVblankManager.ystartIsAuto(line); } void autodetectTvMode(bool toggle) { myAutodetectTvMode = toggle; } diff --git a/src/emucore/tia/TIA.hxx b/src/emucore/tia/TIA.hxx index d26dd9bcc..cf72d7863 100644 --- a/src/emucore/tia/TIA.hxx +++ b/src/emucore/tia/TIA.hxx @@ -160,6 +160,7 @@ class TIA : public Device uInt32 width() const { return 160; } uInt32 height() const { return myFrameManager.height(); } uInt32 ystart() const { return myFrameManager.ystart(); } + bool ystartIsAuto(uInt32 line) const { return myFrameManager.ystartIsAuto(line); } /** Changes the current Height/YStart properties. diff --git a/src/emucore/tia/VblankManager.hxx b/src/emucore/tia/VblankManager.hxx index 3070f9e00..24e1d638a 100644 --- a/src/emucore/tia/VblankManager.hxx +++ b/src/emucore/tia/VblankManager.hxx @@ -39,6 +39,7 @@ class VblankManager : public Serializable void setYstart(uInt32 ystart); uInt32 ystart() const { return myYstart == 0 ? myLastVblankLines : myYstart; } + bool ystartIsAuto(uInt32 line) const { return myLastVblankLines == line; } void setVblank(bool vblank) { myVblank = vblank; }