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
[WIP] SD card adapter support #12680
Draft
Pokechu22
wants to merge
40
commits into
dolphin-emu:master
Choose a base branch
from
Pokechu22:sd-gecko
base: master
Could not load branches
Branch not found: {{ refName }}
Could not load tags
Nothing to show
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
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
Not for this PR, but useful for testing
This works, for getting it to detect an SD card, though it then needs to init it and that fails. But it's a start, even if it'll need to be thrown out when things get further along.
(actually like 15 minutes ago)
The CRC part still unnerves me
…ugh not enough to be useful)
Both of these are used by Pok�émon Channel. However, Pokémon Channel actually DOES care about CRCs, so... yay.
Libogc has a bit of a footgun, where __io_gcsda.isInserted() will initialize the card, but not the CRC tables; __io_gcsda.startup() needs to be called first.
No idea if this actually works
2 different CRC bugs, and also an OOB bug.
Libogc needs this now; I'm not sure what I changed from before that made it necessary.
Enough for libogc, but not enough for Channel...
This is enough for Pokémon Channel to save. Loading should also work, but I'm unable to test since memory cards are still broken...
Note that the default was AD16 before, and I've now changed it to None.
This doesn't work (changes aren't saved to disk), and I don't fully understand why...
Datel...
Dropped in b0f9bb9 - I should look at that for how to fix my own changes
The xor technique doesn't work well when 0 is a legal device, since CS not changing will return device 0, and then reset CS for that device. This broke memcards; they now work.
This is NOT needed to fix anything, but still seems like a good idea to me. Though getting a device based on CS still seems less than perfect (e.g. what does the hardware do if multiple chips are selected at the same time? Probably it doesn't handle it well, but it might still be worth emulating...)
There still probably needs to be another state for CMD0 or such, but that can be handled separately.
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.
This is a very old change which I'm just putting up here to make it easier to find. I haven't tested it in a long time.
The games that support this are Doubutsu no Mori e+ (a Japan-specific version of Animal Crossing), the Japanese release of Pokémon Channel, the Homebrew Channel, and Datel's SD Media Launcher/later Action Replay releases. At one point I did test all of these and I'm pretty sure they worked, but it's been a while.