PCSX2 / pcsx2

PCSX2 - The Playstation 2 Emulator
https://pcsx2.net
GNU General Public License v3.0
11.09k stars 1.56k forks source link

[BUG]: Need for Speed Undercover not loading save games properly unless they’re created within PCSX2 #9831

Open Sonygamer455 opened 11 months ago

Sonygamer455 commented 11 months ago

Describe the Bug

So what’s happening here is if I use MyMC 2.7 to import a save game for Undercover that was made on real hardware or downloaded from the internet, it will show up in-game as it should and even say it’s loaded successfully. However, upon looking around, none of my progress is there and it’s as if I didn’t even load a save game at all, even though I did and I know the save game is good. Doesn’t happen if I create a save game for it within PCSX2 itself though, it will load just fine in the emulator and it seemingly only accepts ones created from it. Strangely though, if I take the save I made on PCSX2 and try to load it on an actual PS2, it will do what I just mentioned, it won’t load my progress at all, even though it says it did.

Whatever is going on here appears to be related to PCSX2 itself and it doesn’t happen with any other game besides this one that I know of. And it’s not a new issue by any means, I don't know how long it's been around but it’s actually been present for years now and I am not the only one to encounter it either. Satan86 here on GitHub and a Youtuber named 379Felipe have also had this problem. The only clue I have is 379Felipe says he somehow got them to work a long time ago by setting the EE/IOP and VUs to a certain setting, though upon asking him yesterday, he sadly no longer remembers what he used and I cannot figure out what it is.

Edit: So after creating this thread, I tried creating a memory card folder on PCSX2, copied some saves from my PS2 to my USB drive using ULaunchElf, and then copied them into the memory card folder. Despite avoiding the use of 3rd party tools, verifying my saves work on my PS2 and copying them as is without changing the format in any way, PCSX2 still will not load them properly even though they show up and it says they loaded successfully. Again, it looks as if I didn't even load one, even though I did.

Similarly, I tried copying a save game I made in PCSX2 from the memory card folder to my PS2's memory card using ULaunchELF and loading it on my console and it did the exact same thing, even though it works without issue on PCSX2. And this shouldn't happen because I had tried these same exact methods on another game and had zero problems with it, yet Undercover refuses to cooperate.

Reproduction Steps

NOTICE: This portion of the OP has been updated since the thread was made to avoid the use of 3rd party tools and changing the saves format.

  1. For copying a save game from a PS2 memory card to PCSX2 Create a save game for NFS Undercover, and change something in-game so you'll know what to look for. Restart the console. verify the save game still works, then copy the save game to a USB drive with UlaunchELF. If you haven't already, create a memory card folder with PCSX2 and simply copy the save you obtained from the PS2 memory card to the folder. Boot NFS Undercover and load the save, look for whatever it was you changed when you made it. If it does what it's been doing for me, it will be as if you didn't even load a save game at all and none of the changes will be there, even though the game says it loaded it successfully.

  2. For copying a PCSX2 save to a PS2 memory card for an actual PS2. Create a save game for NFS Undercover in PCSX2 and do something in game so you know what to look for later. Restart the game and verify it still works, then copy the save game to a USB drive. Plug the drive into your PS2 and copy the save to a memory card using ULaunchELF. Load the save game in game and look for whatever changes you made earlier and see if they are there. Again, if it does what it's been doing to me, it will be as if you didn't even load a save game, even though the game says you did.

Expected Behavior

I expected PCSX2 to load my save game like every other game does and I also expected my PS2 to be able to load save games made with PCSX2, especially since it's worked with other games I've tried before.

PCSX2 Revision

v1.7.4939 (when this thread was created) v1.7.4943 (currently)

Operating System

Windows 10 (64bit)

CPU

Intel(R) Core(TM) i7-3740QM CPU @ 2.70GHz 2.70 GHz

GPU

NVIDIA Quadro K1000M

stenzek commented 11 months ago

How is a memory card created with third-party saves another utility not working a PCSX2 bug? You should ask the authors of those saves/utilities.

Also, why are you using DX11? Kepler supports Vulkan (but it might default to GL in PCSX2 because of the feature level), and DX11 won't render games correctly. Just use the default - this meme of users manually selecting DX11 is getting exhausting.

Sonygamer455 commented 11 months ago

How is a memory card created with third-party saves another utility not working a PCSX2 bug? You should ask the authors of those saves/utilities. Also, why are you using DX11? Kepler supports Vulkan (but it might default to GL in PCSX2 because of the feature level), and DX11 won't render games correctly. Just use the default - this meme of users manually selecting DX11 is getting exhausting.

Well the memory card file itself was created with PCSX2, I just used MyMC to import the save game into it. Undercover is the only game to ever have an issue loading certain saves and seeing how my actual PS2 won't even read my save if it's made from PCSX2, that's what made me think it was PCSX2.

As for DX11, I didn't even know it was meme (I really didn't), I just used it because it's what always worked for me, OpenGL is much slower and I can't run Vulkan. I have tried default before posting and the issue still persists. I did not mean to pester you, I just thought I had an issue worth sharing.

stenzek commented 11 months ago

I've had plenty of instances where mymcplus corrupts saves I grabbed from gamefaqs etc. Not sure if the save or mymcplus was at fault, but there's clearly an issue here. When using card images (not folders), pcsx2 doesn't manipulate the filesystem in any way, just passes the writes through. There isn't much which can go wrong.

For the renderer, please just use the default (which is probably GL). It'll have correct rendering, unlike DX.

Sonygamer455 commented 11 months ago

I've had plenty of instances where mymcplus corrupts saves I grabbed from gamefaqs etc. Not sure if the save or mymcplus was at fault, but there's clearly an issue here. When using card images (not folders), pcsx2 doesn't manipulate the filesystem in any way, just passes the writes through. There isn't much which can go wrong.

I am commenting again because I have more to share about this and I still feel it's an emulation issue. I have 2 save games I downloaded from the internet and 2 others I made on my actual PS2 and I tested them all on my PS2 and they all work just fine. So I am pretty convinced theirs nothing wrong with any of them. Regarding MyMC, it’s worth noting I extracted my save for the game I made in PCSX2 with it, deleted it from PCSX2 and then imported it back in there with MyMC and it still worked like it should when I loaded it in-game on the emulator.

I thought about what you said about MyMC, so I decided to try a different approach, I converted my memory card file for PCSX2 to a folder using the option provided. (which I hadn’t tried before) I then copied those 4 saves I just mentioned from my memory card on my actual PS2 to a flash drive using ULaunchELF. Then I copied them to my memory card folder (without MyMC obviously) for PCSX2 and tried loading them with the emulator and sadly, it’s just like before. They all show up in game, say they loaded successfully, but then my progress is not there as if I didn’t even load a save game, even though they worked on my PS2 without issues.

Forgive me if this is a little outside the scope here, but I also did the vice versa of this by copying a save for this game I recently made in PCSX2 from my memory card folder to my flash drive. Then I copied it to my memory card on my PS2 using ULaunchELF (and yes I used MCPaste) and well, it did the same as above, even though it works just fine on PCSX2 itself.

Despite trying 2 different methods of importing saves, I for the life of me cannot get any saves for this game to work on PCSX2 unless they originated on the emulator itself and the fact my PS2 won’t properly load ones made with PCSX2 despite being in the appropriate format is also concerning. And again, it only happens with NFS Undercover for some reason and I feel like it shouldn’t because I tried the same methods with NFS Most Wanted and had no issues. I’ll be shocked if Undercover doesn’t do the same thing to you as it did with me.

For the renderer, please just use the default (which is probably GL). It'll have correct rendering, unlike DX.

It’s OpenGL for me. It runs a lot slower on my computer, but I used it in these just as you suggested.

Something I should have noted earlier is I do not use PCSX2 very often and when I do it’s just for some tinkering here and there and not much else, so I am not overly familiar with it. In fact, I didn’t start using the recent nightly builds until about a week or 2 ago, which was why I only recently learned of the memory card folder stuff I mentioned earlier.

RedPanda4552 commented 11 months ago

Create a new save file on the PS2, and create a new save file on PCSX2 using a folder memcard. If the game asks you to name your "profile" or whatever, use the same name. Do the exact same things in both, make sure the save files are effectively identical. Zip up the save folders, upload them here, and I will check for diffs. My hunch is this is a similar case to GT4 replays where they are not transferable due to CPU emulation being slightly different to the real thing.

Sonygamer455 commented 11 months ago

Create a new save file on the PS2, and create a new save file on PCSX2 using a folder memcard. If the game asks you to name your "profile" or whatever, use the same name. Do the exact same things in both, make sure the save files are effectively identical. Zip up the save folders, upload them here, and I will check for diffs. My hunch is this is a similar case to GT4 replays where they are not transferable due to CPU emulation being slightly different to the real thing.

Alright, here it is! NFS Undercover Saves.zip I did exactly as you asked, I created 2 identical names save games, and did the same things for each. What I did in both was I turned down the sound effects, saved and I did nothing else. It should look like this: Need for Speed - Undercover_SLUS-21801_20230823193449 I sincerely hope what you're saying is true, this issue has been a thorn in my side for years now and I hope it can be fixed. Do remember what I said about how that Youtuber somehow got it to work once by fiddling with EE/IOP and VUs. Hope this helps!

RedPanda4552 commented 11 months ago

A number of diffs popped up, most notably a roughly 48 byte section towards the front of the file is completely different. Scattered throughout the rest of the file is just various numbers being changed by one. I would expect maybe some minor changes but the large section changing suggests to me this is a GT4-esque problem, and not one that will be simply walked around. Sorry.

Sonygamer455 commented 11 months ago

A number of diffs popped up, most notably a roughly 48 byte section towards the front of the file is completely different. Scattered throughout the rest of the file is just various numbers being changed by one. I would expect maybe some minor changes but the large section changing suggests to me this is a GT4-esque problem, and not one that will be simply walked around. Sorry.

Well for the record, I double-checked and the saves are the same in terms of how they look in the game just as I described earlier. I get what you're saying though, I looked at them in HxD after reading your comment and you're right. Thank you very much for taking the time to look at it and providing some clues on what could be going on. I hate theirs no immediate solution to this, but hopefully now something can be done about it later if possible.

I think this thread needs to be reopened since it appears to be an emulation issue.

Sonygamer455 commented 11 months ago

Alright, I updated the OP to account for the other tests I did after creating this thread and I changed the reproduction steps.

@stenzek I hate to ask, but can you please reopen this thread? I understand why you closed it since I was using a 3rd party tool - that’s not entirely flawless - to transfer save games downloaded from the internet, that could have been corrupted beforehand. However, I don’t know if you have seen what I’ve posted since your last reply, but I tried transferring some saves (that I know work) from my PS2’s memory card to a memory card folder on PCSX2 without any 3rd party tools and I still encountered the same issue I had before. The same could be said for copying saves created in the emulator from PCSX2’s memory card folder to my actual PS2’s memory card. If it’s not an emulation problem, I honestly don’t know what it is.

stenzek commented 11 months ago

If I remember correctly, one of our testers checked this and couldn't reproduce the issue.

Sonygamer455 commented 11 months ago

I know who you’re referring to and yeah he said that at first, but upon further inspection he realized it had happened to him too. (I was just talking to him on Discord earlier)

DigitalMajestic commented 11 months ago

This can be reopened as I've verified the issue. I don't know what causes it, but saves can't really be copied between emulator and console (they can be copied but they'll be missing some information). In addition, identical saves created on console and emulator hash differently (as Pan noted above there are minor differences).

RedPanda4552 commented 11 months ago

Found some interesting behavior when tearing open some user provided files.

The user was simply checking if volume settings are retained. They changed the volume from 100% to 90%, which yielded one byte change. It appears this section is storing literal C strings for values. image image

The only other diff is what seems to be checksums in a header. It is possible the volume level could be a float hiding among these numbers, but it is unclear and still seems like a series of checksums. image

When comparing a PS2 generated save to a PCSX2 generated save with the same volume level, the diffs include the same "header" bytes, plus a series of random bytes scattered throughout the file are incremented by one on the PCSX2 save.

This smells strongly of a core issue. The last thing to check would be what exact bytes change in the "header", and if one of them can be pinned to "volume". If so, then we could go back to the PCSX2 save file and look at what is in that location, and see if there is any FPU inaccuracy. If not, then its probably a dead end. In any case, this seems like one of those "if it will be fixed, it will be a convenient accident" problems. BASLUS-21801-ANAME.zip

fndrsm commented 10 months ago

Hi, newbie here, just started use PCSX to play NFS Undercover - SLUS 218.01. Actually i tried to play the game on my laptop since 2 months ago, but everytime I transfer the Save Game from my PS2 memory card. The progress does not come with it. I used Save Game file from the internet, and play New Career and finished the game.

But when i tried to transfer the exact same Save Game using the VMC from OPL it just not carried my Save Game state. I tried the folder from memory card also and import it using mymc 2.6.

But it still the progress state from the downloaded Save Game file. There is no Resume Career.

I think what i experienced is the same like "Step to reproduce" number 1 from the OP. But in my case, i finished the game progress.

Don't know, if i did wrong or the Save Game cannot be written and stick to the console. Thanks for the help.

Screenshot from PCSX (MemoryCard attached - The same VMC from OPL) image

Pictures from my PS2 (VMC attached - The same VMC with the PCSX) 20230924_174203 20230924_174410