hrydgard / ppsspp

A PSP emulator for Android, Windows, Mac and Linux, written in C++. Want to contribute? Join us on Discord at https://discord.gg/5NJB6dD or just send pull requests / issues. For discussion use the forums at forums.ppsspp.org.
https://www.ppsspp.org
Other
11.02k stars 2.15k forks source link

Harvest Moon: Hero of Leaf Valley: Wrong in-game date on native save file #18687

Closed justafella closed 1 day ago

justafella commented 8 months ago

Game or games this happens in

ULUS-10458 - Harvest Moon Hero of Leaf Valley

What area of the game / PPSSPP

Save file data shows in-game date of the very first time it was saved in that slot.

Native save info: Screenshot_2024-01-13-12-37-08-452_org ppsspp ppsspp

Save state info: Screenshot_2024-01-13-12-37-14-735_org ppsspp ppsspp

Native save file for testing: ULUS10458_SUGARMIN_0001.zip

Native save loads correctly on Year 1 Summer 7, but still show Year 1 Spring 21 on save file manager

What should happen

Should show actual date on save file manager

Logs

No response

Platform

Android

Mobile device model or graphics card (GPU)

Redmi 9 (lancelot)

PPSSPP version affected

latest git

Last working version

No response

Graphics backend (3D API)

Vulkan

Checklist

anr2me commented 8 months ago

This is probably why when using Savestates some games might think that the Save data got corrupted

justafella commented 8 months ago

This is probably why when using Savestates some games might think that the Save data got corrupted

Just to make things clear (for I read your edits for this answer), the issue here is, although I am already on Summer 7 (the date inside gameplay, as you save before going to sleep), and although it loads correctly on Summer 7, the PPSSPP save file manager shows it as a save from Spring 21.

I tested the native save data on the Play Store release version and it showed the correct in-game date after saving (Year 1 Summer 11, in this case, as I kept playing).

On latest git, it updates the in-game info on the date ONLY if I save into a new slot (and then this new save will show this date without changing).

hrydgard commented 8 months ago

Hm, it might be some issue with savegame metadata that we don't handle correctly when overwriting existing saves. Should be investigated, tagging for 1.18. Fortunately this doesn't seem to affect gameplay so not super urgent.

hrydgard commented 2 days ago

This was caused by https://github.com/hrydgard/ppsspp/commit/652498e995a , part of #18430, an attempt by @Kethen to avoid overwriting PARAM.SFO with null data in ModNation Racers.

In this case, we do get valid data, so we should write PARAM.SFO. I'll try to come up with something better...