BizHawk icon indicating copy to clipboard operation
BizHawk copied to clipboard

Warn the user before closing if the cycle count won't be saved properly

Open RetroEdit opened this issue 5 years ago • 8 comments

Similar to #2203, but distinct. Generally, TASers will want to know if the cycle count for Game Boy movies will not be saved properly, since it's the most precise mechanism for timing. The only way to calculate the cycle count is to emulate to the end of the movie (because VBLANK frames on Game Boy can have differing amount of cycles).

With my changes in #2337, this is slightly improved because the cycle count will then only be saved if it's guaranteed to be valid. However, this still doesn't prevent the user from forgetting to seek to the end of the movie to save the cycle count, it only prevents them from saving the wrong cycle count by instead saving no cycle count at all.

Note: we could also provide an option in the nag UI to have the movie session automatically seek to the end of the movie and save the cycle count. This would make saving it properly very convenient for the user.

In IRC, this was discussed, and I don't think it's necessarily a good idea for 2.5 at this point, but I think it's worth considering for the future.


More specifically, this is not a simple as it may first seem:

  • Nagging the user about cores where the cycle count can be inferred from the frame count seems annoying and pointless. If more cores expose their cycle count in the future, this doesn't mean the user needs to be nagged about not reaching the end of the movie for those cores.
  • Every exit-based interaction like this can become complicated. For instance, how is importing into TAStudio from a current movie session going to be handled?

RetroEdit avatar Aug 27 '20 20:08 RetroEdit

I tried looking into it, and the best idea I can come up with is to tell the user about the problem when they save. Currently, there is an annoying message when the movie end is reached, which is not ideal (and useless).

Displaying a message box on save would work if the Bk2Movie class had a way of doing that...

Morilli avatar Sep 15 '24 16:09 Morilli

When TAStudio is open for instance, it can present this dialog box when you press the 'x' button on EmuHawk or Alt+F4:

---------------------------
Closing with Unsaved Changes
---------------------------
Save TAStudio project?
---------------------------
Yes   No   Cancel   
---------------------------

It seems to me that cycle count could be incorporated into those pre-exit checks and perhaps this particular dialog box (though probably prior?), like:

Do you want to seek to the end of the movie to save the cycle count?
For TAS movies, the cycle count allows the movie length to be calculated more precisely.

But having that dialog occur every time you save might get tedious to be honest. See also: #4062

RetroEdit avatar Sep 28 '24 19:09 RetroEdit

Displaying a message box on save would work if the Bk2Movie class had a way of doing that...

Would it unblock you if I wired up IDialogParent for it?

YoshiRulz avatar Sep 25 '25 15:09 YoshiRulz

Displaying a message box on save would work if the Bk2Movie class had a way of doing that...

Would it unblock you if I wired up IDialogParent for it?

That could work, yeah.

But having that dialog occur every time you save might get tedious to be honest.

Is that a legitimate concern? It would only show if you saved somewhere other than at movie end, how often does that realistically happen? Previously there was a nagging dialog that appeared whenever the end of the movie was hit which I personally think is much more annoying and much less useful.

Morilli avatar Nov 17 '25 13:11 Morilli

But having that dialog occur every time you save might get tedious to be honest.

Is that a legitimate concern?

Yes.

TAStudio's core workflow is adjusting existing inputs, so you're usually not exactly at the movie end. Nagging on every TAStudio save is excessive.

Bk2 export in TAStudio is a different story—that usually signifies a finished draft or final product, so you want the proper movie length saved.

So the one improvement I see is to replace this informational message with this interactive one:

Do you want to seek to the end of the movie to save the cycle count?
For this emulated system, the cycle count allows the movie length to be calculated more precisely.

Edit: Which we actually previously did from 2.3.3 (4e389ab1ec64d6ddcfcd8791479be656be20ed94) until 2.4.1 (a8472a77f396b9dc1bdd29f5c0c9e2c6fedc7e0f), but seeking probably broke stuff. Edit 2: Oh wait, seeking to movie end in TAStudio was extremely inconvenient until #2292 was fixed. So now it's probably more viable.

RetroEdit avatar Nov 17 '25 19:11 RetroEdit

Sure, we can change the TAStudio logic (although I do see problems with automatically seeking), but that does nothing for traditional movie recording outside of TAStudio. Do you think displaying a dialog box on save there would be annoying?

Ideally I'd want the logic to be the same across TAStudio and normal bk2 recording. I guess for site purposes the bk2's data is more important than the tasproj one (I think? Apparently the site supports tasprojs but I believe bk2 is the common uploaded format) but I don't think this should change the logic here.

Morilli avatar Nov 18 '25 09:11 Morilli

I think as far as TASVideos is concerned, it's one format with two possible file extensions, since the only effect of the greenzone is bloating the filesize.

Ideally I'd want the logic to be the same across TAStudio and normal bk2 recording.

Agreed.

YoshiRulz avatar Nov 18 '25 10:11 YoshiRulz

Traditional rerecording and TAStudio differ in some key aspects here.

Traditional rerecording has two modes: read-only and read+write. In read+write mode, I believe you'll always be at movie end, so cycle count will always be saved anyway.

Read-only mode doesn't save by default upon closing (as the name implies), so a new dialog that nags about saving might be unwanted. To be fair, sometimes you do want to save and/or validate a new cycle count. One compromise is to only show the dialog when the cycle count is missing (maybe it does already? Not sure.)


For TAStudio, I could see how an uninterruptible seek might be annoying, so the logic probably would need care. Maybe best to leave it alone.

RetroEdit avatar Nov 18 '25 12:11 RetroEdit