Post subject: Movie randomly restarts the game
theTANCO
He/Him
Joined: 1/15/2015
Posts: 4
Location: United States
Hi, I'm new to this forum so sorry if this might be in the wrong place. I've started making my first TAS and the game I chose to do is Lunar Knights for the Nintendo DS and I'm using the emulator DeSmuME 0.9.10 x64. As I've been working I find that when I play back my movie to see how it looks, a random moment in the middle of the movie would just reset the game even though its not supposed to, and it would keep doing that in the same frame. I found that going back and rerecording fixes it, but the latest time I tried that, it placed a game reset even earlier than the part I just fixed. I even went into the movie file with Notepad++ to check my frames, and I didn't see anything there that would cause it to reset. Most of the time, but not always, it happens in a loading screen, where I'm not even pushing any buttons. Of course when I'm not recording a movie and play the game normally I don't have this issue. It only happens when I'm playing back the movie. Does anyone know what's going on with this and how I can fix this, or better yet, prevent it?
Editor, Emulator Coder
Joined: 8/7/2008
Posts: 1156
make sure youre not using the JIT/recompiler
theTANCO
He/Him
Joined: 1/15/2015
Posts: 4
Location: United States
I'm entirely new to TASing and I'm not use to this emulator yet so sorry if this sounds like a dumb question, but where do I find that setting? Edit: If the setting is called "Use dynamic recompiler" under emulation settings, that is already disabled. I don't think I've changed any of the settings other than the controls and hotkey settings. So if that's not the cause, what do I do then?
theTANCO
He/Him
Joined: 1/15/2015
Posts: 4
Location: United States
After investigating a little more, I noticed a pattern. I think the movie is resetting the game at my save states. When I enter another room in the game, I save a state to slot 0 in the middle of the loading screen. So if the game is resetting at the last state I saved, then that would explain why it happened so often in the loading screen. But just now, the game reset on state 8 which is prior to the state I saved last to slot 9, both of which are in the middle of a boss fight. Except when I go and rerecord that part and play back the movie, it plays back the entire movie without resetting. So it's a little inconsistent, but could there be some sort of glitch in the emulator's state saves? I also return to the question, does anyone know any way to stop this from happening? Edit: I looked at the movie file again and noticed that there is a line that's different from all the others. I can easily figure out what lines represent the frames in the movie. What I've noticed is that the second character in each of those lines is a 0 except the first line, which is 2. I scrolled down all the way to the bottom, and noticed that there is a 2 instead of a 0 on my last button input, which was Y. So I decided to just push random buttons and see what happens with that number and this was the result:
|2|........Y....000 000 0|
|0|.............000 000 0|
|2|...U.........000 000 0|
|0|.............000 000 0|
|0|.L...........000 000 0|
|0|.............000 000 0|
|0|..D..........000 000 0|
|0|.............000 000 0|
After testing I can tell that the number is basically a reset code. But I still don't understand why it's assigning a reset code to random button inputs. I can just go into the file and edit it myself, but that's tedious and I would have to stop recording the movie just so I can see the latest button inputs, because np++ doesn't show them all while the file is being recorded in the emulator.
Editor, Emulator Coder
Joined: 8/7/2008
Posts: 1156
I gave a quick look through the code and dont see how this could be happening. Try using an older version of the emulator or not x64, and try using a shorter movie filename (try c:\poop.dsm) There shouldnt be a 2 getting into the input log unless you see a reset happening. If youre wrestling with a movie infested by these, just try zapping them all 0 in your text editor and maybe you can eradicate it for good.
theTANCO
He/Him
Joined: 1/15/2015
Posts: 4
Location: United States
You know what I just thought of? Right now I'm using a program let's me use a PS3 controller on PC by having it emulate an XBox 360 controller. Do you think the way my controller inputs buttons has anything do with this?
Editor, Emulator Coder
Joined: 8/7/2008
Posts: 1156
no. the only way it could be affecting it is by issuing reset hotkeys to the emulator, which you would see happening (and theyd be recorded faithfully)
TAG
He/Him
Joined: 2/9/2014
Posts: 407
Location: In Oblivion
Isn't there AUSSIE bug with Desume that polls resets in anyway?
I’m sorry. Really I am... I am so sorry for what I did. Forgive me.
ALAKTORN
He/Him
Player (99)
Joined: 10/19/2009
Posts: 2527
Location: Italy
I didn’t even know |2| means a reset. I’ve TAS’d on DeSmuME since version 0.9.4 and have never seen a reset in an input file, lol. Btw in Notepad++ you can Ctrl+H and replace all instances of “|2|” into “|0|”. Shouldn’t be too tedious to do every time you stop recording and watch it back. Oh and also, Lunar Knights TAS?! Hype!! Make a topic for it and post your progress.