From 7d78f85f4c0b1848da84c6c1993f6972deccf3a9 Mon Sep 17 00:00:00 2001 From: gocha Date: Wed, 17 Apr 2013 13:03:23 +0000 Subject: [PATCH] Reset firmware at movie play/record (if external firmware is not used). This prevents movie desync caused by games which rewrites firmware area during the play. (for instance, Ragnarok Online DS) --- desmume/src/movie.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/desmume/src/movie.cpp b/desmume/src/movie.cpp index 5f2e769bc..27f592df4 100644 --- a/desmume/src/movie.cpp +++ b/desmume/src/movie.cpp @@ -574,6 +574,12 @@ const char* _CDECL_ FCEUI_LoadMovie(const char *fname, bool _read_only, bool tas //fully reload the game to reinitialize everything before playing any movie //poweron(true); + // reset firmware (some games can write to it) + if (CommonSettings.UseExtFirmware == false) + { + NDS_CreateDummyFirmware(&CommonSettings.InternalFirmConf); + } + NDS_Reset(); ////WE NEED TO LOAD A SAVESTATE @@ -683,6 +689,12 @@ void FCEUI_SaveMovie(const char *fname, std::wstring author, int flag, std::stri currMovieData.romFilename = path.GetRomName(); currMovieData.rtcStart = rtcstart; + // reset firmware (some games can write to it) + if (CommonSettings.UseExtFirmware == false) + { + NDS_CreateDummyFirmware(&CommonSettings.InternalFirmConf); + } + NDS_Reset(); //todo ?