Feature Request: Load CDs fully into memory
https://github.com/TASVideos/BizHawk/issues/2674
Summary
When loading CDs from hard drives, the hard drive will eventually spin down (possibly every few minutes). This causes 10+ seconds of stuttering while the emulator waits for the hard drive to spin back up.
This can be resolved by fully loading the CD into RAM.
Zeromus recommends that this should not be fixed, but instead should be an optional setting.
Recommendation
- Create an Option in the settings menu to load CDs into memory.
- Make that option the default for desktop builds (I'm assuming the reason we don't want it always on is for mobile builds with low RAM).
- Consider setting the option automatically based on system resources available
Correction: the hard drive will eventually spin down on systems that have been configured to spin down the hard drive
- Don't hold your breath.
- Won't be done, as it takes a long time to load a big disk
- Won't be done, because it isn't about RAM but about loading lag.
Hope your expectations have been appropriately set.
I'm not sure why the file can't be loaded into RAM asynchronously, and then swapped from live-disk to RAM when it's ready.
I'm not sure why you think I said it can't be done
I have a better idea. Let's read sector 0 repeatedly with a file opened with FILE_FLAG_NO_BUFFERING so the disk can never go to sleep
Oh, this may be even better
https://stackoverflow.com/questions/8733457/how-to-programatically-prevent-windows-from-hard-disk-drive-spin-down
I would propose to simply add that as a general preference (not core specific) that you can check.
Keep-aliving the disk occurred to me as an alternate solution as well. That solution is probably easier to implement. Keeping the disc on isn't optimal IMO, but it's probably sufficient as a solution.
Edit: The comment below points out that power consumption by the game itself likely dwarfs the power consumption of the disk. I think that reasoning sounds convincing.
You're playing a video game, I couldn't care less about how much power is getting used by a disk. I think the solution may even by optimal from my POV