Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Io: Account for free space on the host device #13560

Merged
merged 2 commits into from
Oct 20, 2020

Conversation

unknownbrackets
Copy link
Collaborator

See #13520. If there's less free space on the actual device, return that instead of simulated free space based on usage. This will tell games about the space problems properly.

Also changed the comment slightly - I'm pretty sure they released 2 GB memory sticks before that Harry Potter game was released. I don't think it was an imagination problem, just a testing problem.

-[Unknown]

@unknownbrackets unknownbrackets added this to the v1.11.0 milestone Oct 19, 2020
@shenweip
Copy link
Contributor

Oh,thanks. But this will potentially break #12761 again.
For example, if the realFreeSpace is smaller than simulatedFreeSpace, usually will get different value in the two free space check on Android, even if the contents of the memory stick have not changed.

@unknownbrackets
Copy link
Collaborator Author

How long does it need to be static? If we keep the free space constant from game start, but don't maintain it between save states, would that probably work?

Free space should take into account sector size, ideally. The byte sum of files definitely isn't what free space is reduced by on a real PSP - it uses FAT, so files are allocated in chunks of sectors.

-[Unknown]

@shenweip
Copy link
Contributor

shenweip commented Oct 19, 2020

If don't maintain it between save states, I think it might not work between save states. But I think it's hard to avoid this, because even if we use simulated freespace, we can't guarantee that users won't change the content of savedata between save states.

Keeping the free space constant from game start and do maintain it between save states might work, but I worry that still report that disc is free even if the disc is full.

@unknownbrackets
Copy link
Collaborator Author

I wonder if it's better to have a game id check then, as much as I hate them... I think it's important to report low free space when we can.

Maybe it'd be good to check how this game responds to the memory stick events of removal and reinsertion. Maybe we could act like the card was reinserted when a major space change occurs. But I think some PSP games just kicked you out if you did that, or didn't let you save again...

-[Unknown]

@hrydgard
Copy link
Owner

Fixing game bugs/misbehaviors like this is definitely fair game for compat.ini checks...

@hrydgard hrydgard added the Saving issue Prevents or obstructs saving game (not save states.) label Oct 19, 2020
@shenweip
Copy link
Contributor

shenweip commented Oct 19, 2020

I'm fine with a compat.ini check, maybe this case is uncommon(I hope so, I don't hope we have to maintain a long list for this).

This seems to be necessary for Assassin's Creed.  See hrydgard#12761.
@unknownbrackets
Copy link
Collaborator Author

I don't think I have this game, but does that work? Not really tested.

-[Unknown]

@shenweip
Copy link
Contributor

shenweip commented Oct 20, 2020

Tested simply on Android, works.

@hrydgard hrydgard merged commit dc0e9bf into hrydgard:master Oct 20, 2020
@unknownbrackets unknownbrackets deleted the free-space branch October 20, 2020 13:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Saving issue Prevents or obstructs saving game (not save states.)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants