ps2homebrew / wLaunchELF

ELF loader and File browser for Sony PlayStation 2
Other
520 stars 52 forks source link

uLE WIP6 and newer don’t work with PSX Memory Cards #9

Closed ticky closed 7 years ago

ticky commented 7 years ago

As was reported in this PSX-scene thread, current versions of uLE (including 4.43a, though I have not built a HEAD build to check it hasn’t been fixed since!) don’t work with PSX memory cards or PocketStations, as of WIP6.

This is exhibited as PSX memory cards and PocketStations appearing to have 0 bytes of available space, and the memory card directory listing not being readable.

uLaunchELF v4.42d works as expected.

sp193 commented 7 years ago

I am unable to replicate this issue. However, I do not own any genuine PlayStation memory cards, but only one compatible.

uLaunchELF v4.42d was already using Jimmikaelkael's MCMAN+MCSERVE combination, which is why this is a little surprising. It could either be an existing problem that was unearthed by another change, or perhaps my changes (sign-mismatch & l-value assignment warning fixes) to MCMAN towards the end of 2016 caused it.

ticky commented 7 years ago

Hey there!

I just freshly downloaded v4.43a build 170621, tested two PlayStation 2 models (A PAL SCPH-50002 and an NTSC-U SCPH-79001, both booted via FreeMCBoot), and two cards which are to the best of my knowledge genuine (An SCPH-4000 PocketStation, and and SCPH-1040 Memory Card)

Both cards appeared in the Sony browser just fine, and both cards, on both consoles, appeared as 0 byte devices in v4.43a build 170621, but appear with their real contents and sizes in v4.42d.

If there’s anything I can do to help debug this with the hardware at my disposal (including donating a card, if necessary!) please let me know :)

sp193 commented 7 years ago

For whatever reason, it has (finally) bugged out for me and I think this is the problem.

sceMcInit from the old version of libmc will set a value of -217 to the "offset" field, which is checked on by the RPC server (MCSERV). If it is not set to -217, then it will disable support for PS memory cards (and access to PS memory cards will return error -51). As for why this didn't previously happen, I don't know... anyway, it looks wrong to compare -217 against 217. :D

Please try this file and let us know if it is working fine.

sp193 commented 7 years ago

Sorry, please use this file instead.

hurda commented 7 years ago

With that build the content of the ps1 mc and the correct free space is shown for me.

sp193 commented 7 years ago

That's great! Thanks for bringing this up.

ticky commented 7 years ago

Just tested and confirmed it fixes the issue for me!

Awesome catch, @sp193. Thanks for the update. 😊