RPCS3 Forums

Full Version: How Save States and Graphic Filters work?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I have a technology question:

How save states for example in Mednafen or PCSX2 work. what is inside a saved state and how they start at this position?

And are the features of Graphics Filters always emulator-dependent implementations? or can you reuse the Algorithm on other systems too?

Is the ReShade (the Open Source Project) an equal good technology? or would a Emulator-embedded GFX Filter produce better Quality?

Greetings
(05-09-2020, 07:29 PM)RPCS3_FAN Wrote: [ -> ]I have a technology question:

How save states for example in Mednafen or PCSX2 work. what is inside a saved state and how they start at this position?

And are the features of Graphics Filters always emulator-dependent implementations? or can you reuse the Algorithm on other systems too?

Is the ReShade (the Open Source Project) an equal good technology? or would a Emulator-embedded GFX Filter produce better Quality?

Greetings

Hi RPCS3_FAN,

I can shed some light on your Save State question and maybe a bit of what I understand for graphics filters.

A save state usually consists of the state of the CPU and it's registers, Video and audio registers, memory state, and other game or emulation specific settings. The thing that determines which position to start at is called the program counter (PC) or instruction counter. The computer reads the game byte by byte, usually starting at byte 0. Each time a byte is read, the program counter increases by 1 so the next read is the next byte. When you save a state, the emulator writes the values that are currently in the PC, registers, memory, etc to a file. It's really up to the author of the emulator to determine the format of the file. When the state is loaded, it reads this file and loads all that data back into the emulator into the correct memory locations. The save and load functions should be performed when the emulated CPU is not "running" so that the data is not changing while being written. This allows for a smooth state load each time. If everything is in the right place, when the CPU resumes running, it continues the game at the program counter value that was loaded. Since memory values are also loaded, you now have the same amount of lives, health, or money that you had before!

I don't have a lot of experience with graphic filters, but some developers create filters in specific programming languages that can be used by anyone. You may need to adjust some things so that it fits your project. Many people do create filters that are internal to their emulator because they want to see if they can produce the results they want on their own.

Hope that helps!