Option to copy and run game from memory

General chat related to ScummVM, adventure gaming, and so on.

Moderator: ScummVM Team

Post Reply
User avatar
Alien Grey
Posts: 42
Joined: Thu Sep 18, 2014 1:12 pm
Location: Belgium

Option to copy and run game from memory

Post by Alien Grey »

What about an option to copy the game content to the memory to run it?

This what Mednafen has added to fix read speed issues. Windows ( and maybe other OS) has the habbit to put the disks in sleep mode for power saving. The only way to work around this is to copy the game content to the memory to run it. This shouldn't be a problem because thse days all devices have plenty of memory to work with.

I think this is the way to go for retro gaming but I've got no idea if this would actually be possible for ScummVM.
ZvikaZ
Posts: 58
Joined: Thu Mar 05, 2020 7:04 pm

Re: Option to copy and run game from memory

Post by ZvikaZ »

Can you better explain the problem you're trying to solve?
Give concrete details, what game, what machine, where's the problem.
GateKeeper
Posts: 22
Joined: Thu Dec 14, 2017 10:40 am

Re: Option to copy and run game from memory

Post by GateKeeper »

Alien Grey wrote: Mon Oct 05, 2020 8:51 amWindows ( and maybe other OS) has the habbit to put the disks in sleep mode for power saving. The only way to work around this is to copy the game content to the memory to run it.
That's not the only way, and it's not even the best way.

Go to power management options, and disable power saving on hard drives, and the problem (as you described it) should be gone.
Depending on what kind of computer you are using, you may even have some power management profiles, like on many laptops, so you can create one called "ScummVM" and set it up so that nothing interferes with your games running. If you don't have such management software, then it's only a little bit more work to manually change the setting before starting the game.

There are plenty of other workarounds as well. You can copy the game files to a memory stick or memory card, stick that to a USB port or memory card slot, and run the game from there. Even if the hard drives stop, it has no effect on those (although some other problems are possible, like conflicts with other USB devices and such but that's another story).

You can also get yourself some space from a cloud server, upload the game there or another computer in your LAN, and mount that as a virtual drive, and then run the game from there.

And so on and so on.

The point is, the problem you are describing (and as I understand it, and I may have misunderstood) has so many solutions that it really can't be a real problem.

Of course if you absolutely must have it running in your RAM, then create a RAM disk, and the problem should be once again, solved.
For more information, start by reading this:
http://www.howtogeek.com/171432/ram-dis ... t-use-one/
User avatar
Alien Grey
Posts: 42
Joined: Thu Sep 18, 2014 1:12 pm
Location: Belgium

Re: Option to copy and run game from memory

Post by Alien Grey »

Disable sleep does only work for HDD. How many devices still use HDD?

The only thing that does work is using some kind of application to write to the drive so the drive doesn't go in to sleep mode.

To give you an example. Try to play Beneath a steel sky (talkie version) from a USB drive or MicroSD card and you'll notice that after a short time (between 1 or 2 minutes) the drive is in sleep mode and you've got to wait some time for the drive to wake up before it plays the voice file. This can be avoided and proves to be working with Mednafen if you copy the game data files to the memory and run it from the memory.
GateKeeper
Posts: 22
Joined: Thu Dec 14, 2017 10:40 am

Re: Option to copy and run game from memory

Post by GateKeeper »

Alien Grey wrote: Mon Oct 05, 2020 12:47 pm Disable sleep does only work for HDD. How many devices still use HDD?
Most of them?

Alien Grey wrote: Mon Oct 05, 2020 12:47 pm The only thing that does work is using some kind of application to write to the drive so the drive doesn't go in to sleep mode.
Not at all true. Even if what you claim about sleep mode would be true (which it really isn't), you could have a number of ways to keep the drive, or whatever thing you are using, active. If you can do some coding, you could write some small script that runs a directory search or something every 60 seconds or something.
The easiest way could be simply having some mp3 file there, and playing it in an endless repeat loop with some player having muted the audio in that player. The computer would never power down.

Alien Grey wrote: Mon Oct 05, 2020 12:47 pmTo give you an example. Try to play Beneath a steel sky (talkie version) from a USB drive or MicroSD card and you'll notice that after a short time (between 1 or 2 minutes) the drive is in sleep mode and you've got to wait some time for the drive to wake up before it plays the voice file.
I think setting USB Selective Suspend to disabled should solve the problem?

But I think we are getting a bit confused here. First you describe the problem as if it's related to hard drives stopping, but now you are describing it as a USB port issue, so what's exactly the hardware that's not working as desired?
User avatar
Alien Grey
Posts: 42
Joined: Thu Sep 18, 2014 1:12 pm
Location: Belgium

Re: Option to copy and run game from memory

Post by Alien Grey »

Not sure what you're trying to prove here. But none of that works. That''s the reason why a developer wrote a small application to write every 30 seconds to the drive to keep it from going in sleep mode. I asked him why not just read from the drive and he told me that's not possible because of Windows caching so the drive would still go in sleep mode.
User avatar
criezy
ScummVM Developer
Posts: 785
Joined: Sat Sep 23, 2006 10:41 am
Location: West Sussex, UK

Re: Option to copy and run game from memory

Post by criezy »

It seems to me that asking every application to implement a workaround for what looks like a OS or hardware issue might not be the right solution. And I would also expect the Windows advanced power settings for the HDD sleep and USB selective suspend to help control that.

It would be fairly easy to implement some caching of files when accessing them, but that would also probably be pretty useless (the OS already does that usually). And that would also probably not solve your issue. Implementing something more advanced does not seem trivial to me (and maybe not even possible for some engines in which the file access is controlled by the game scripts and the engine does not even know the list of game files). If somebody figures a clean solution, implement it, and open a pull request, we might consider it. But otherwise I don't see it happening anytime soon.
User avatar
Alien Grey
Posts: 42
Joined: Thu Sep 18, 2014 1:12 pm
Location: Belgium

Re: Option to copy and run game from memory

Post by Alien Grey »

Thank you for this straight answer.

I know this shouldn't be needed in every application but this issue has been going on for years and probably many years will follow. We don't even know if it's a Microsoft issue or an Intel one. it might as well be an issue with the Intel controller or driver. Nobody has anything to say about this and the manufacturer of my device promissed this would be fixed in the next device. They failed. The read speed improved but the driives still go in sleep mode {power saving mode}. So they didn't fix anything. :(
ZvikaZ
Posts: 58
Joined: Thu Mar 05, 2020 7:04 pm

Re: Option to copy and run game from memory

Post by ZvikaZ »

Have you tried any of Gatekeeper's ideas?
He gave you many workarounds. I think it makes sense to try them. I'd suggest that you start with creating a RAM disk.
User avatar
Alien Grey
Posts: 42
Joined: Thu Sep 18, 2014 1:12 pm
Location: Belgium

Re: Option to copy and run game from memory

Post by Alien Grey »

Trust me. I've tried everything and it's impossible to stop it from going in power save mode. If it was possible someone would've found a fix for it a long time a go because I.m not alone with this issue.
ZvikaZ
Posts: 58
Joined: Thu Mar 05, 2020 7:04 pm

Re: Option to copy and run game from memory

Post by ZvikaZ »

Simple yes no question.
Have you tried creating a ram disk?
If yes, please explain how did you create it.
User avatar
Alien Grey
Posts: 42
Joined: Thu Sep 18, 2014 1:12 pm
Location: Belgium

Re: Option to copy and run game from memory

Post by Alien Grey »

No. I didn't try that.

I only tried to find a way to stop it from going in to power saving mode. I don't even know how this feature got added to Mednafen but maybe some of the developers also had this issue and wanted to deal with this with copy the game to the memory to run it. There was also a guy who digged a bit deeper in his pockets and bought one of those expensive Pro MicroSD cards. Didn't fix anything and didn't even give him any speed improvements.

You can imagen that I'm a bit disgusted about this because you guys do a wonderful job creating and polishing these applictions and all of this gets ruined because of stupid hardware issues. It got to the point that I had to go back to Windows 10 1709 because of a DDraw issue that never got fixed and Intel support was already ended although they never released a Vulcan driver that the hardware supported. We ended up with OpenGL and that's the worst possible option for that device.

At least there was one thing I learned from all of this and that is that you can disable Windows 10 Home edition upgrade and never look back. :D
ZvikaZ
Posts: 58
Joined: Thu Mar 05, 2020 7:04 pm

Re: Option to copy and run game from memory

Post by ZvikaZ »

Well, you have now 3 options:
- Try the ramdisk suggestion (I'd recommend that...)
- Don't try it, but say that you have "tried everything" (and then no one will be able to help you)
- Wait for something to change (what? when? by whom?)
User avatar
Alien Grey
Posts: 42
Joined: Thu Sep 18, 2014 1:12 pm
Location: Belgium

Re: Option to copy and run game from memory

Post by Alien Grey »

I go for option 1 and I'm going to give it a try this evening.
User avatar
Alien Grey
Posts: 42
Joined: Thu Sep 18, 2014 1:12 pm
Location: Belgium

Re: Option to copy and run game from memory

Post by Alien Grey »

I've tried it with ImDisk Toolkit and that fixes the issue. 8)
Post Reply