libretro / vice-libretro

Versatile Commodore 8-bit Emulator
GNU General Public License v2.0
40 stars 70 forks source link

xvic - 'Automatic Load Warp' not working when the content is loaded first time. #393

Closed xttx closed 3 years ago

xttx commented 3 years ago

RetroArch v1.9.0 Core: vice_xvic_libretro.dll, latest version (23.05.2021) True Drive Emulation: On Virtual Device Trap: Off Reset Type: Autostart

The 'Automatic Load Warp' options seems a little bit broken. It's hard to describe in two words, but looks like 'Automatic Load Warp' option is not handled correctly when the content is loaded first time. To replicate the issue easily, you can use 'Theater War III', because this game load a title screen at startup, wait for user to press space, and then continue to load.

Steps I did:

Actual load-warping behaviour table: .d64 Load Content (autostart) Subsequent reads Reset core (autostart) Subsequent reads after reset
Autostart: Enable, Load Warp: Off No No No No
Autostart: Enable, Load Warp: On No* No* Warped Warped
Autostart: Warp, Load Warp: Off Warped No Warped No
Autostart: Warp, Load Warp: On Warped No* Warped Warped

*'no' with asterix means that the warp is not active (loading is slow, fps led on status bar is locked on ~50), but the drive sound is actually muted. This make me think, that in those cases the warp is... semi-active, somehow? This would make the behaviour perfectly logical.

Just for the record: when I load a cassete instead of a disk, the behaviour is completely different. Basically, it just ignore the "Autostart = Warp" settings. But this is probably normal. .tap Load Content (autostart) Subsequent reads Reset core (autostart) Subsequent reads after reset
Autostart: Enable, Load Warp: Off No No No No
Autostart: Enable, Load Warp: On Warped Warped Warped Warped
Autostart: Warp, Load Warp: Off No No No No
Autostart: Warp, Load Warp: On Warped Warped Warped Warped
sonninnos commented 3 years ago

This started happening after the 3.3 -> 3.5 update, because for some reason a function that was checking if a cartridge is inserted at startup decided wrongly that there is one even if there isn't, which broke disk detection, which lead to the disk not being added in Disc Control, which broke autoloadwarp, because autoloadwarp depends on Disc Control insertion status. Phew.

Though it only happens on raw disk launch, and not with M3U/ZIP. (After having that other disk related issue fixed)

Indeed there is no autostartwarp for tapes in standalone. Autostartwarp is a VICE feature (and only useful with singleloaders), and autoloadwarp is a libretro hack, which depends on drive track activity with disks (because drive LED is not reliable due to random software keeping LED on even without disk access), and tape motor+play state with tapes.

Also some games load so slow, that autoloadwarp will toggle off/on during loading, and if there are no limits on how long there is activity on the same drive track, some games will get stuck in warp forever. JiffyDOS helps with that since it speeds up disk access by a ton.

I'll push both of these disk related XVIC fixes shortly after some more testing to make sure nothing else breaks. Thanks for pointing them out.