Qt/GCMemcardCreateNewDialog: Use zero values for formatting instead of accessing g_SRAM. #9021
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.
GUI code should not be directly accessing emulated hardware like this.
As for the CardFlashId value itself... frankly, I don't believe the value itself actually matters in the slightest. I've checked various dumped memory cards of mine and it looks like a completely random set of 12 bytes to me for them, while all my Dolphin-generated cards use either 12 zeros like what I'm using in this PR (which happens when you create a card before launching a game, as g_SRAM is zero-filled before first boot), or the ASCII
DOLPHINSLOTAas seen here. Gamecube software does not seem to care what it is -- it probably just matters that the serial in the header is correctly synced with the flash ID, which we ensure here when mounting a card and here when formatting a card.As a sidenote... am I right in assuming that this flash ID on real hardware is a separate piece of information provided by a memory card, disconnected from formatted header data? Cause we emulate it by just assuming the header block is always correct. Which is probably fine, but just wondering.