Skip to content
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

Replace MemoryCard251 setting with generic MemoryCardSize #9756

Merged
merged 2 commits into from Jun 13, 2021

Conversation

Techjar
Copy link
Contributor

@Techjar Techjar commented May 27, 2021

This allows for a broader range of game-specific memory card sizes to be configured. Needed for Japanese version of Pokémon Box: Ruby & Sapphire, as that game requires a 59 block memory card.

Fixes https://bugs.dolphin-emu.org/issues/12185

The value follows a power of two scale, with 4 Mbit (59 blocks) as the base, so the sizes are as follows:
0 = 4 Mbit (59 blocks)
1 = 8 Mbit (123 blocks)
2 = 16 Mbit (251 blocks)
3 = 32 Mbit (507 blocks)
4 = 64 Mbit (1019 blocks)

Any value outside this range of 0-4 is simply ignored. 5 is technically valid, but we don't handle it specially as it would just be the default/maximum memory card size of 128 Mbit (2043 blocks).

This allows for a broader range of game-specific memory card sizes to
be configured.
@Rumi-Larry
Copy link

I do wonder if it would be possible to write some patches for the games to work with larger memory cards.
I would name the setting "MaximumMemoryCardSize" or "RequiredMemoryCardSize"

Copy link
Member

@leoetlino leoetlino left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The path manip should probably be refactored, but the logic was already duplicated prior to this PR and this can be cleaned up in a follow-up PR. LGTM

@leoetlino leoetlino merged commit d536a50 into dolphin-emu:master Jun 13, 2021
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
5 participants