Report up to 9GB free on the memory stick.

This works around a bug in a Harry Potter game that happens on real
hardware.  Thanks to gdmk02 for a lot of testing.

Unfortunately, it'll still fail with certain amounts of free space, but it
does this on a real PSP also.
This commit is contained in:
Unknown W. Brackets 2015-01-05 22:37:40 -08:00
parent f1964dc98f
commit c4c581000f

View File

@ -55,5 +55,8 @@ void MemoryStick_Init()
{
memStickState = PSP_MEMORYSTICK_STATE_DRIVER_READY;
memStickFatState = PSP_FAT_MEMORYSTICK_STATE_ASSIGNED;
memStickSize = 8ULL * 1024 * 1024 * 1024; // 8GB
// Harry Potter and the Goblet of Fire has a bug where it can't handle certain amounts
// of free space due to incorrect 32-bit math.
// We use 9GB here, which does not trigger the bug, as a cap for the max free space.
memStickSize = 9ULL * 1024 * 1024 * 1024; // 9GB
}