Resolved: Save State Bug
#1
I'm not sure when it first manifested though I'm pretty sure it wasn't always the case.

Found On: PCSX2 5850 Windows 32-bit
Found With: Xenosaga II NTSC

When playing a multi-disc game if you swap disc and then create a save state. The save state has the SLUS number of the disc that the game was started with instead of the disc that was swapped to.

Steps to reproduce:
1) Load the first disc of multi-disc game, main menu should suffice.
2) Swap to the game's second disc.
3) Create a save state.
4) Reload the emulator but with the second disc of the game instead of swapping after the game starts.
5) Attempt to load the state.

A look at the save state folder reveals the reason it can't find the second disc save state after a swap disc is that it's SLUS number was generated from the first disc despite it being swapped out for the second disc.
"Through hard work and bad hygiene, I can achieve anything!" -Kyle, Lunar Silver Star Complete

Sponsored links

#2
(02-03-2014, 03:27 AM)siferion Wrote: I'm not sure when it first manifested though I'm pretty sure it wasn't always the case.

Found On: PCSX2 5850 Windows 32-bit
Found With: Xenosaga II NTSC

When playing a multi-disc game if you swap disc and then create a save state. The save state has the SLUS number of the disc that the game was started with instead of the disc that was swapped to.

Steps to reproduce:
1) Load the first disc of multi-disc game, main menu should suffice.
2) Swap to the game's second disc.
3) Create a save state.
4) Reload the emulator but with the second disc of the game instead of swapping after the game starts.
5) Attempt to load the state.

A look at the save state folder reveals the reason it can't find the second disc save state after a swap disc is that it's SLUS number was generated from the first disc despite it being swapped out for the second disc.
It's not a bug since a save sate is basically a memory dump.
The second disc ID won't be seen by your PS2 (or the emu)'s memory unless the game explicitely asks for it.
CPU : AMD Ryzen 7 3800X
Mobo : Asus PRIME B450-PLUS
GPU : NVIDIA GeForce RTX 3070
RAM : 16 Go
#3
(02-03-2014, 04:06 AM)jesalvein Wrote: It's not a bug since a save sate is basically a memory dump.
The second disc ID won't be seen by your PS2 (or the emu)'s memory unless the game explicitely asks for it.

I don't see why the save state file names aren't created from the currently inserted disc. As a programmer myself saving a state on the second disc of a game after swapping disc and then not being able to load it because it has the wrong SLUS number (which I assume is what the emulator is looking for) sounds an awful lot like a logic bug (as in the logic that went into the system was incomplete or flawed).
"Through hard work and bad hygiene, I can achieve anything!" -Kyle, Lunar Silver Star Complete
#4
(02-03-2014, 12:29 PM)siferion Wrote: As a programmer myself saving a state on the second disc of a game after swapping disc and then not being able to load it because it has the wrong SLUS number (which I assume is what the emulator is looking for) sounds an awful lot like a logic bug (as in the logic that went into the system was incomplete or flawed).

Sorry, didn't know you were a dev.
when do you think you can correct this problem, then ? Because the disc swapping issue is a long time known one and I'm pretty sure many people would love yo see it fixed ...
CPU : AMD Ryzen 7 3800X
Mobo : Asus PRIME B450-PLUS
GPU : NVIDIA GeForce RTX 3070
RAM : 16 Go
#5
(02-03-2014, 05:18 PM)jesalvein Wrote: Sorry, didn't know you were a dev.
when do you think you can correct this problem, then ? Because the disc swapping issue is a long time known one and I'm pretty sure many people would love yo see it fixed ...

Haven't worked on PCSX2 so I don't know the code base all that well, have looked it over before out of curiosity but never played with the code. Just thought I'd bring it up if there's a dev that knows that part of PCSX2 better than what I could make of it. If it doesn't get fixed before my current time consuming project I might take a look at it (might be awhile, big project for one person).
"Through hard work and bad hygiene, I can achieve anything!" -Kyle, Lunar Silver Star Complete
#6
jesalvein remembers a different disc swap issue from this one (the one where games might not detect a disc change).
The reported issue should be pretty easy to fix, if I can reproduce it, so gimme a sec.

Edit:
The problem is that we don't run the whole game check routine on a disk swap, so no crc check nor Sony catalog number
checks are done. I'm not sure why that is, gonna ask around.
#7
Thanks for reporting, siferion.
It appears I forgot to notify the emu that we swapped the disk when doing so.
A fix is on trunk. Please report if it works for you Smile
#8
Works here Wink
[Image: newsig.jpg]
#9
Wonder if thatll help monster rancher Tongue2
[Image: ref-sig-anim.gif]

#10
(02-07-2014, 12:04 PM)rama Wrote: Thanks for reporting, siferion.
It appears I forgot to notify the emu that we swapped the disk when doing so.
A fix is on trunk. Please report if it works for you Smile

Yes that fixed it. Thanks for being so quick about it, figured it was a relatively easy fix but didn't expect it to get taken care of so fast.
"Through hard work and bad hygiene, I can achieve anything!" -Kyle, Lunar Silver Star Complete




Users browsing this thread: 1 Guest(s)