Replace MemoryCard251 setting with generic MemoryCardSize #9756
+48
−23
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.
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).