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

Apply a hack to simulate USB created files #9799

Merged
merged 1 commit into from
Jun 13, 2017

Conversation

unknownbrackets
Copy link
Collaborator

Fixes #9794. Some homebrew accidentally depend on a PSP firmware bug. It happens to be the same flaw Windows 98 has, for exactly the same reason.

Since I was moving it away from affecting case-sensitive ISO filesystems, I tested quickly to verify it's the same Windows 98 bug (as described in #9793) and made it follow the basename/extension logic correctly. I could see some homebrew also mishandling "data.BIN" (which NT/XP/7/8/10/etc. would write as "DATA.BIN + lowercase basename flag".)

Note that the PSP also doesn't write this flag. The danger here would be:

  1. A game writes save data with a lowercase filename, i.e. "data.bin".
  2. The game then reads back the directory listing immediately.
  3. The game expects to see "data.bin" (as it would on a real PSP) instead of "DATA.BIN".

But note that the savedata code skips files that are not all uppercase in FILES, and almost all games write uppercase. So hopefully the above scenario is very unlikely.

Otherwise we'd have to track lowercase filenames written since game start, or something. Or just only apply this hack when running homebrew.

-[Unknown]

Fixes hrydgard#9794.  Some homebrew accidentally depend on this PSP firmware bug.
@BenMcLean
Copy link

Thanks for making this.

@hrydgard hrydgard merged commit dd23588 into hrydgard:master Jun 13, 2017
@unknownbrackets unknownbrackets deleted the case-hack branch June 14, 2017 00:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants