Conversation
|
Also should note that I didn't implement a saving thread for the first cut to keep things simple, and plan to add that in a follow-up change. |
|
The biggest annoyance here was dealing with the byteswapping in OSPfsState. The third field is a halfword immediately followed by two char arrays (ext_name, game_name). Because the base type is char, there is no padding inserted and all remaining fields start on a non-word aligned address. The resulting layout is a complete mess with multiple interleaved fields -- ext_name is split into two fields, and game_name is split into three. I just gave up and did a byteswapped copy of bytes 10-30 in @Mr-Wiseguy let me know if you think there's a better way to handle unfortunate cases like this Verified that Quest 64 works with the game_name hack removed, and also verified Superman 64 saving works. |
|
Also, like @sonicdcer's original implementation this makes no attempt at implementing the "real" PFS filesystem. I'm not sure there's a good reason to do so (portability with emulators?), but curious if anyone thinks that's worth pursuing. |
This includes changes from PR #137 and PR #138.
Those should probably be reviewed first, then I can merge those PRs and simplify this one.