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
[RFC] Basic GPT support #192
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Nintendont customizations have been retained.
This is currently limited, as it only checks up to the first four partitions in the GPT. In addition, partitions that have LBAs over the 32-bit limit will be skipped due to limitations elsewhere in libcustomfat and the USB/SD storage modules. bit_ops.h: Added a 64-bit byteswapped read, which is necessary due to the use of 64-bit values in GPT.
…t but it's almost always 2.
Basically the same code as in libcustomfat, so the same limitations. 32-bit sector count; only the first four partitions are checked. integer.h: Added 64-bit types. ff.h: Added 64-bit integer load/store macros.
Compiled with devkitPPC r27 and devkitARM r45.
Similar to kernel/ff.c. Makes it slightly easier to maintain the GPT-specific code.
Compiled with devkitPPC r27 and devkitARM r45.
Merged in latest changes from FIX94/Nintendont and recompiled loader.dol. (upstream commit 3228848) |
great stuff, thanks! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
During the discussion of NTFS support in Issue #38, @hito16 suggested adding support for GPT. After a few hours of work, I came up with this batch of commits that adds basic GPT support to both the loader and kernel.
Limitations:
816 TB for 4096-byte sector drives. I'll look into fixing this limit later.I tested this with a 4 GB SDHC card partitioned using GPT with a single FAT32 partition. Animal Crossing loaded and ran as expected, and Nintendont saved a virtual memory card in the right place.
I also rebased libcustomfat to 1.0.14. There's a few LFN fixes and small optimizations.