https://snew.notabug.io/r/cheatengine/comments/256pzb/is_it_possible_to_save_the_state_of_a_game/ :
Is it possible to save the state of a game? : cheatengine
[–] JonReeeeed [S] 0 points 1 point 1 point (+1|-0) ago
why is this post getting downvoted?
Because it is a link to reddit which is all most people need to do so.
To answer the question as stated...
Emulators for older hardware can do it because there is a much more limited state in the entire system. You can simply record the state of all memory and all registers (or what the emulated HW really has). When you restore that state execution can continue as if it was never interrupted.
For PC and newer consoles the state can be so much larger. Unless you do it in a virtual machine you won't be able to ensure things are placed into the same memory locations at a later time. You would probably be saving the state of the whole virtualized system including OS. Then you have graphics offloaded to a separate card. I don't know shit about using the GPU but I assume it has similar problems in that you have a reference to some object which may represent a memory location withing the card.
These problem are made more difficult with modern "security features" like ASLR (address space layout randomization).
I say all that but a multitasking operating system pauses execution of software all the time and can swap memory to and from disk. The first happens when something else needs to run. The second happens when you don't have enough ram for everything and is extremely noticeable.
So to have a save state in a modern game you would need almost kernel level control over the program.
[–] JonReeeeed [S] ago (edited ago)
i thought about saving in a vm before. it was just too slow for me to put up with. I recall the university I went to having some killer save state technology where when you signed out of your account and logged back in it restored even log-ins. The only log-ins that didn't survive were ones that had a time out feature to check again when you tried navigating to a new page, but it would bring up the exact page you were looking at even if you were logged into an account with a timeout feature. Those cock suckers at the univeristy had some slick spy capabilities for sure.
anyways, looks like a vm is the only route for now
[–] [deleted] 1 point 0 points 1 point (+1|-1) ago
[–] JonReeeeed [S] ago
lol what?