From 5ae1bcd9731e635b21341a2e505798fea8845398 Mon Sep 17 00:00:00 2001 From: byuu <2107894+byuu@users.noreply.github.com> Date: Sat, 31 Aug 2019 09:27:14 +0900 Subject: [PATCH] Force disable entropy when recording movies from reset. This prevents potential desyncs in games that don't initialize RAM/IO. --- bsnes/target-bsnes/program/movies.cpp | 4 ++++ bsnes/target-bsnes/settings/emulator.cpp | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/bsnes/target-bsnes/program/movies.cpp b/bsnes/target-bsnes/program/movies.cpp index e2130ee7..708039fa 100644 --- a/bsnes/target-bsnes/program/movies.cpp +++ b/bsnes/target-bsnes/program/movies.cpp @@ -41,6 +41,8 @@ auto Program::moviePlay() -> void { if(!emulator->unserialize(s)) failed = true; } } else { + //entropy can desync movies recorded without save states + emulator->configure("Hacks/Entropy", "None"); emulator->power(); } if(!failed) { @@ -61,6 +63,8 @@ auto Program::movieRecord(bool fromBeginning) -> void { if(movie.mode == Movie::Mode::Inactive) { movieMode(Movie::Mode::Recording); if(fromBeginning) { + //entropy can desync movies recorded without save states + emulator->configure("Hacks/Entropy", "None"); emulator->power(); movie.state = {}; } else { diff --git a/bsnes/target-bsnes/settings/emulator.cpp b/bsnes/target-bsnes/settings/emulator.cpp index 734305e3..05741c03 100644 --- a/bsnes/target-bsnes/settings/emulator.cpp +++ b/bsnes/target-bsnes/settings/emulator.cpp @@ -25,7 +25,7 @@ auto EmulatorSettings::create() -> void { entropyLabel.setText("Entropy (randomness)").setFont(Font().setBold()); entropyNone.setText("None").setToolTip( "All memory and registers are initialized to constant values at startup.\n" - "Use this for movie recording and compatibility with very old demoscene homebrew games." + "Use this for compatibility with very old demoscene homebrew games." ).onActivate([&] { settings.emulator.hack.entropy = "None"; });