DSP: Make ARAM memory circular in Wii mode #6368
Closed
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.
Apparently ARAM is supposed to be circular, however, with the use of
Memory::Read_U8
which leads to aGetPointer
call later on will have invalid RAM address ranges returning nullptr in Wii mode:In sum, every GetPointer's MEM1 address located between REALRAM_SIZE and RAM_SIZE will return nullptr.
These are crashing Dolphin and despite them being invalid RAM addresses, they should be valid ARAM addresses. That's why the RAM pointer is used instead, just like the DSPHLE implementation.
This PR fixes the debugger's MemoryView crashing while looking at an address between REALRAM_SIZE and RAM_SIZE. It might also fix potential DSP related crashes.
Ready to be reviewed.