From b8978aa76e8d642e377e9c9c8f5cd803b5dcdaa7 Mon Sep 17 00:00:00 2001 From: Stephen Anthony Date: Sat, 12 May 2018 17:04:33 -0230 Subject: [PATCH 1/5] Variables declared as uInt64 should be serialized as such. --- src/common/StateManager.cxx | 2 +- src/emucore/tia/PaddleReader.cxx | 4 ++-- src/emucore/tia/TIA.cxx | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/common/StateManager.cxx b/src/common/StateManager.cxx index 768d4c928..66a62bf29 100644 --- a/src/common/StateManager.cxx +++ b/src/common/StateManager.cxx @@ -27,7 +27,7 @@ #include "StateManager.hxx" -#define STATE_HEADER "05010000state" +#define STATE_HEADER "05019000state" // #define MOVIE_HEADER "03030000movie" // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/emucore/tia/PaddleReader.cxx b/src/emucore/tia/PaddleReader.cxx index cdb6c9437..f5a036145 100644 --- a/src/emucore/tia/PaddleReader.cxx +++ b/src/emucore/tia/PaddleReader.cxx @@ -116,7 +116,7 @@ bool PaddleReader::save(Serializer& out) const out.putDouble(myU); out.putDouble(myValue); - out.putDouble(myTimestamp); + out.putLong(myTimestamp); out.putInt(int(myConsoleTiming)); out.putDouble(myClockFreq); @@ -144,7 +144,7 @@ bool PaddleReader::load(Serializer& in) myU = in.getDouble(); myValue = in.getDouble(); - myTimestamp = in.getDouble(); + myTimestamp = in.getLong(); myConsoleTiming = ConsoleTiming(in.getInt()); myClockFreq = in.getDouble(); diff --git a/src/emucore/tia/TIA.cxx b/src/emucore/tia/TIA.cxx index 543a51be3..5babe0e7d 100644 --- a/src/emucore/tia/TIA.cxx +++ b/src/emucore/tia/TIA.cxx @@ -273,7 +273,7 @@ bool TIA::save(Serializer& out) const out.putByte(myColorHBlank); - out.putDouble(myTimestamp); + out.putLong(myTimestamp); out.putBool(myAutoFrameEnabled); @@ -344,7 +344,7 @@ bool TIA::load(Serializer& in) myColorHBlank = in.getByte(); - myTimestamp = in.getDouble(); + myTimestamp = in.getLong(); myAutoFrameEnabled = in.getBool(); From 2fd1cafc2dbee82f0093261b3a7afc2d52a008d9 Mon Sep 17 00:00:00 2001 From: Stephen Anthony Date: Sat, 12 May 2018 22:33:15 -0230 Subject: [PATCH 2/5] Fix [[nodiscard]] warning in VS (applies only to C++17 mode). --- src/debugger/DebuggerParser.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/debugger/DebuggerParser.cxx b/src/debugger/DebuggerParser.cxx index 53c4596e3..3640e4584 100644 --- a/src/debugger/DebuggerParser.cxx +++ b/src/debugger/DebuggerParser.cxx @@ -414,7 +414,7 @@ bool DebuggerParser::validateArgs(int cmd) { if(required) { - commandResult.str(); + void(commandResult.str()); outputCommandError("missing required argument(s)", cmd); return false; // needed args. didn't get 'em. } @@ -513,13 +513,13 @@ cerr << "curCount = " << curCount << endl if(curCount < argRequiredCount) { - commandResult.str(); + void(commandResult.str()); outputCommandError("missing required argument(s)", cmd); return false; } else if(argCount > curCount) { - commandResult.str(); + void(commandResult.str()); outputCommandError("too many arguments", cmd); return false; } From 02dbbca861e4f0fc32b9c83158d80f7cd81adce5 Mon Sep 17 00:00:00 2001 From: Stephen Anthony Date: Sat, 19 May 2018 22:01:00 -0230 Subject: [PATCH 3/5] Fixed bug with autodetecting SaveKey controller. - The cycles were being reset to the current system cycles, when in the old code they were not being updated at all (other than being normalized when the old system cycles could be running backwards). - This change restores behaviour to that in 5.0.2. --- src/emucore/MT24LC256.cxx | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/emucore/MT24LC256.cxx b/src/emucore/MT24LC256.cxx index 80fe2f4e3..6c3ba58db 100644 --- a/src/emucore/MT24LC256.cxx +++ b/src/emucore/MT24LC256.cxx @@ -149,9 +149,6 @@ void MT24LC256::update() // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - void MT24LC256::systemReset() { - myCyclesWhenSDASet = myCyclesWhenSCLSet = myCyclesWhenTimerSet = - mySystem.cycles(); - memset(myPageHit, false, sizeof(myPageHit)); } @@ -399,8 +396,8 @@ bool MT24LC256::jpee_timercheck(int mode) { if(myTimerActive) { - uInt32 elapsed = uInt32(mySystem.cycles() - myCyclesWhenTimerSet); - myTimerActive = elapsed < uInt32(5000000.0 / 838.0); + uInt64 elapsed = mySystem.cycles() - myCyclesWhenTimerSet; + myTimerActive = elapsed < uInt64(5000000.0 / 838.0); } return myTimerActive; } From ec1e65d6837904fe7457588f3ea8e9118a77ec63 Mon Sep 17 00:00:00 2001 From: Stephen Anthony Date: Sun, 20 May 2018 11:55:55 -0230 Subject: [PATCH 4/5] Make Champ Games that use SaveKey use it by default. --- src/emucore/DefProps.hxx | 8 ++++---- src/emucore/stella.pro | 4 ++++ 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/emucore/DefProps.hxx b/src/emucore/DefProps.hxx index 7d4739700..c5811a0a8 100644 --- a/src/emucore/DefProps.hxx +++ b/src/emucore/DefProps.hxx @@ -473,7 +473,7 @@ static const char* const DefProps[DEF_PROPS_SIZE][21] = { { "2319922df4d0c820b3e5f15faa870cc3", "Atari - GCC, Mike Feinstein", "CX2681, CX2681P", "Battlezone (1983) (Atari) (PAL) [a]", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" }, { "2327456f86d7e0deda94758c518d05b3", "Digitel", "", "Mr. Postman (Digitel)", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" }, { "2351d26d0bfdee3095bec9c05cbcf7b0", "", "", "Warring Worms (19-01-2002) (Billy Eno)", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" }, - { "2353725ec98e0f0073462109e886efd7", "Champ Games", "CG-03-P", "Scramble (PAL60)", "Compatible with Genesis controller", "Homebrew", "", "", "", "", "", "", "", "", "", "", "PAL60", "", "", "YES", "" }, + { "2353725ec98e0f0073462109e886efd7", "Champ Games", "CG-03-P", "Scramble (PAL60)", "Compatible with Genesis controller", "Homebrew", "", "", "", "", "", "", "", "SAVEKEY", "", "", "PAL60", "", "", "YES", "" }, { "235436ab0832370e73677c9c6f0c8b06", "", "", "Beast Invaders (Double Shot) (Hack)", "Hack of Space Invaders", "Hack", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" }, { "2365e1534d67f94d8670394ab99150ce", "Thomas Jentzsch", "", "Missile Command (Atari Mouse) (2002) (TJ)", "Uses Atari ST Mouse Controller", "Homebrew", "", "", "", "", "", "", "ATARIMOUSE", "", "", "", "", "", "", "YES", "" }, { "23d445ea19a18fb78d5035878d9fb649", "CBS Electronics - JWDA, Sylvia Day, Todd Marshall, Henry Will IV", "4L1818, 4L1819, 4L1820, 4L1821", "Mouse Trap (1983) (CBS Electronics) (PAL)", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "YES", "" }, @@ -1186,7 +1186,7 @@ static const char* const DefProps[DEF_PROPS_SIZE][21] = { { "59e53894b3899ee164c91cfa7842da66", "Data Age", "", "Survival Run (1983) (Data Age) (Prototype)", "", "Prototype", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" }, { "59e96de9628e8373d1c685f5e57dcf10", "PlayAround - J.H.M.", "204", "Beat 'Em & Eat 'Em (1982) (PlayAround)", "Uses the Paddle Controllers", "Extremely Rare", "", "", "", "", "", "", "PADDLES", "", "", "AUTO 45", "", "", "", "", "" }, { "59f596285d174233c84597dee6f34f1f", "CCE", "C-811", "River Raid (1983) (CCE)", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" }, - { "5a0ff99ba10bd26d542e1d6f59f56850", "Champ Games", "CG-04-P", "Super Cobra Arcade (PAL60)", "Compatible with Genesis controller", "Homebrew", "", "", "", "", "", "", "", "", "", "", "PAL60", "", "", "YES", "" }, + { "5a0ff99ba10bd26d542e1d6f59f56850", "Champ Games", "CG-04-P", "Super Cobra Arcade (PAL60)", "Compatible with Genesis controller", "Homebrew", "", "", "", "", "", "", "", "SAVEKEY", "", "", "PAL60", "", "", "YES", "" }, { "5a17e30e6e911e74ccd7b716d02b16c6", "Activision, Dan Kitchen", "AX-029", "Crackpots (1983) (Activision) (8K)", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" }, { "5a272012a62becabcd52920348c7c60b", "Star Game", "", "Pitfall (Star Game)", "AKA Pitfall!", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" }, { "5a2f2dcd775207536d9299e768bcd2df", "Otto Versand", "781698", "Flippern (Double-Game Package) (1983) (Otto Versand) (PAL)", "AKA Video Pinball", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" }, @@ -1762,7 +1762,7 @@ static const char* const DefProps[DEF_PROPS_SIZE][21] = { { "83f50fa0fbae545e4b88bb53b788c341", "Atari, Larry Kaplan - Sears", "CX2643 - 6-99815", "Codebreaker (1978) (Atari) (4K)", "Uses Keypad Controllers", "", "", "", "", "", "", "", "KEYBOARD", "KEYBOARD", "", "", "", "", "", "", "" }, { "83fafd7bd12e3335166c6314b3bde528", "Epyx, Steven A. Baker, Tod Frye, Peter Engelbrite", "80561-00251", "Winter Games (1987) (Epyx)", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" }, { "840a5a2eaea24d95d289f514fd12f9bb", "", "", "GBImprov (Hack)", "Hack of Ghostbusters", "Hack", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" }, - { "841057f83ce3731e6bbfda1707cbca58", "Champ Games", "CG-04-N", "Super Cobra Arcade (NTSC)", "Compatible with Genesis controller", "Homebrew", "", "", "", "", "", "", "", "", "", "", "", "", "", "YES", "" }, + { "841057f83ce3731e6bbfda1707cbca58", "Champ Games", "CG-04-N", "Super Cobra Arcade (NTSC)", "Compatible with Genesis controller", "Homebrew", "", "", "", "", "", "", "", "SAVEKEY", "", "", "", "", "", "YES", "" }, { "841b7bc1cad05f5408302308777d49dc", "Activision", "", "Unknown Activision Game (10-22-1982) (Activision) (Prototype)", "", "Prototype", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" }, { "84290e333ff7567c2380f179430083b8", "Imagic, Dave Johnson", "13211, EIX-004-04I", "Quick Step! (1983) (Imagic) (PAL) [a]", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" }, { "843435eb360ed72085f7ab9374f9749a", "Joe Grand", "", "SCSIcide (1.31) (Joe Grand)", "Uses the Paddle Controllers", "New Release", "", "", "", "", "", "", "PADDLES_IAXDR", "", "", "AUTO 65", "", "", "", "", "" }, @@ -3032,7 +3032,7 @@ static const char* const DefProps[DEF_PROPS_SIZE][21] = { { "e9cb18770a41a16de63b124c1e8bd493", "Parker Brothers, Joe Gaucher", "931519", "Popeye (1983) (Parker Bros) (PAL)", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "YES", "" }, { "e9e646f730b8400cd5da08c849ef3e3b", "Tron", "", "Enduro (Tron)", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" }, { "e9e6ad30549a6e2cd89fe93b7691d447", "Atari - Bobco, Robert C. Polaro", "CX26140, CX26140P", "Desert Falcon (05-27-1987) (Atari) (Prototype) (PAL)", "AKA Nile Flyer, Sphinx", "Prototype", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" }, - { "e9f25c7af4f27c9e1b5b8f6fe6141e8c", "Champ Games", "CG-03-N", "Scramble (NTSC)", "Compatible with Genesis controller", "Homebrew", "", "", "", "", "", "", "", "", "", "", "", "", "", "YES", "" }, + { "e9f25c7af4f27c9e1b5b8f6fe6141e8c", "Champ Games", "CG-03-N", "Scramble (NTSC)", "Compatible with Genesis controller", "Homebrew", "", "", "", "", "", "", "", "SAVEKEY", "", "", "", "", "", "YES", "" }, { "ea38fcfc06ad87a0aed1a3d1588744e4", "Atari, Lou Harp", "CX26122", "Sinistar (1984) (Atari) (Prototype)", "", "Prototype", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" }, { "ea6d40db5498d6386571a76df448aa4c", "", "", "Vertical Playfield Demo 2 (PD)", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" }, { "ea7e25ade3fe68f5b786ee0aa82b1fe5", "", "", "Galatic (208 in 1) (Unknown) (PAL)", "AKA Challenge of.... Nexar, The", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" }, diff --git a/src/emucore/stella.pro b/src/emucore/stella.pro index 90ff27032..6b100b49e 100644 --- a/src/emucore/stella.pro +++ b/src/emucore/stella.pro @@ -2733,6 +2733,7 @@ "Cartridge.Name" "Scramble (PAL60)" "Cartridge.Note" "Compatible with Genesis controller" "Cartridge.Rarity" "Homebrew" +"Controller.Right" "SAVEKEY" "Display.Format" "PAL60" "Display.Phosphor" "YES" "" @@ -7146,6 +7147,7 @@ "Cartridge.Name" "Super Cobra Arcade (PAL60)" "Cartridge.Note" "Compatible with Genesis controller" "Cartridge.Rarity" "Homebrew" +"Controller.Right" "SAVEKEY" "Display.Format" "PAL60" "Display.Phosphor" "YES" "" @@ -10697,6 +10699,7 @@ "Cartridge.Name" "Super Cobra Arcade (NTSC)" "Cartridge.Note" "Compatible with Genesis controller" "Cartridge.Rarity" "Homebrew" +"Controller.Right" "SAVEKEY" "Display.Phosphor" "YES" "" @@ -18507,6 +18510,7 @@ "Cartridge.Name" "Scramble (NTSC)" "Cartridge.Note" "Compatible with Genesis controller" "Cartridge.Rarity" "Homebrew" +"Controller.Right" "SAVEKEY" "Display.Phosphor" "YES" "" From 57d1f359334230b0ca72cd5c123bb3c8d6d67cbc Mon Sep 17 00:00:00 2001 From: Stephen Anthony Date: Sun, 20 May 2018 14:37:04 -0230 Subject: [PATCH 5/5] Updated changelog from 5.1.2 release. --- Changes.txt | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/Changes.txt b/Changes.txt index 9636cc60e..7404c54f5 100644 --- a/Changes.txt +++ b/Changes.txt @@ -12,7 +12,7 @@ Release History =========================================================================== -5.1.1 to 5.2: (MMM d, 2018) +5.1.2 to 5.2: (MMM d, 2018) * Extra functionality for Time Machine dialog (start/stop recording; minor fixes; TODO button and initial key repeats...) @@ -21,16 +21,23 @@ * UI modernization (new widget look, dialog titles added, dialogs refactored) - * Fixed bug in UI navigation with joystick hat movement. - * The Linux builds now use the system-installed PNG and ZLIB libraries by default. - * Updated version of SDL included with the Windows build to 2.0.8. - -Have fun! +5.1.1 to 5.1.2: (May 20, 2018) + + * Fixed bug with SaveKey autodetection; some ROMs were not correctly + detecting that a virtual SaveKey device was plugged in. This notably + fixes issues in "Super Cobra" and "Scramble" ROMs. + + * Make previously mentioned ROMs use the SaveKey device by default. + + * Fixed bug in UI navigation with joystick hat movement. + + 5.1 to 5.1.1: (February 21, 2018) * Fixed bug in Stargunner ROM starting with a blank screen.