Originally posted by BlueToad
It always started at 00:00.00 for me. Might be an Snes9x issue, since I use bsnes, in which case I do not know how to fix it.
You may want to clear the timer freeRAM on file or level load, before they're used. There is a separate gamemode for file select, in fact.
Originally posted by BlueToad Originally posted by MarkAlarm
Lastly, I was thinking that since this is a speedrun clock, it should be as accurate to real time as possible. From comparing it to another timer I had going, it desynced fairly quickly. I'd recommend using NMI to get the timing accurate, since that runs exactly once per frame regardless of lag. Granted, this would require even further optimizations, but it's something to consider. Note that this point isn't necessarily reject worthy, but it would make sense to implement.
I completely don't understand what I have to do here.
Ah, now I see why you have asked on Discord what NMI is and why you would need it. Indeed, NMI is typically
used to update the screen but since v-blank runs for every frame, you can define a frame that way. Incrementing the timer would take but it's minor. Trouble is...
: ... moving the timer to NMI would not solve the issue of desynching. Indeed, NMI is disabled* during the majority of level load due to decompressing graphics and updating the music and enabling NMI would mess this up. As a result, you would only solve the desynching for lags but not for level load (which is generally a bigger deal since it's much harder to avoid them than level lags). At some point, you can really ask whether it's worth it to just ignore the lags.
*Yes, I mentioned on Discord that NMI can't be technically disabled but that's only from the perspective of the CPU. From the perspective of the SNES, there is a register which controls whether the SNES should send a NMI to the CPU or not.
Rest in peace, Near.