Hey everyone.
I'm making another thread to announce that I have found a way to track down where changes get introduced into memory at the instruction level. Based on this, I discovered that one of the 24 values that was desyncing at the end of the first frame that a desync occurred on first became out of sync at the 785th instruction after the start of the frame (where the first instruction is numbered 1). More specifically, the value at Address 0X3764804 becomes different on this instruction (this is the value stored in r5 when the write to the memory address stored in r5 occurs on the previous instruction).
I then generated log files for the first 1000 instructions for each TAS (both the syncing one and the desyncing one on this frame). As it turns out, both TASes execute the same instructions in the same order for these first 1000 instructions, so the change isn't introduced due to one TAS branching to a different location in the code.
Since the RAM and all register states are set to an exact match of the syncing TAS at the start of this frame (right before instruction 0), the only way the 2 TASes could get out of sync is if a value from outside of the game's main RAM was loaded into a register in a certain instruction. This change could then propagate downwards, up until the point where the contents of r0 are written to 0X3764804.
I am not very familiar with what to look for with respect to which instructions could access variables/info from outside of RAM, so I was hoping that a more experienced Dolphin developer could help me out.
Below, I have included the debug file for the first 1000 lines of code being executed. Each line says the instruction number, the PC value, and the actual instruction which was executed. Since the desyncing TAS and the syncing TAS produced identical log files for these 1000 instructions, I have only included one file here.
If anyone could help me out or give me any advice, I would greatly appreciate it!
If all goes well, then within a day or two, I should have some idea how to eliminate this specific kind of desync from Dolphin!
First 1000 Lines: https://pastebin.com/yvwQRb0Z
I'm making another thread to announce that I have found a way to track down where changes get introduced into memory at the instruction level. Based on this, I discovered that one of the 24 values that was desyncing at the end of the first frame that a desync occurred on first became out of sync at the 785th instruction after the start of the frame (where the first instruction is numbered 1). More specifically, the value at Address 0X3764804 becomes different on this instruction (this is the value stored in r5 when the write to the memory address stored in r5 occurs on the previous instruction).
I then generated log files for the first 1000 instructions for each TAS (both the syncing one and the desyncing one on this frame). As it turns out, both TASes execute the same instructions in the same order for these first 1000 instructions, so the change isn't introduced due to one TAS branching to a different location in the code.
Since the RAM and all register states are set to an exact match of the syncing TAS at the start of this frame (right before instruction 0), the only way the 2 TASes could get out of sync is if a value from outside of the game's main RAM was loaded into a register in a certain instruction. This change could then propagate downwards, up until the point where the contents of r0 are written to 0X3764804.
I am not very familiar with what to look for with respect to which instructions could access variables/info from outside of RAM, so I was hoping that a more experienced Dolphin developer could help me out.
Below, I have included the debug file for the first 1000 lines of code being executed. Each line says the instruction number, the PC value, and the actual instruction which was executed. Since the desyncing TAS and the syncing TAS produced identical log files for these 1000 instructions, I have only included one file here.
If anyone could help me out or give me any advice, I would greatly appreciate it!
If all goes well, then within a day or two, I should have some idea how to eliminate this specific kind of desync from Dolphin!
First 1000 Lines: https://pastebin.com/yvwQRb0Z