Fix ARAM detection for GC games on Linux - #280
Conversation
|
It seems the branch currently includes the changes in #279. Could we leave in this branch only the changes for the ARAM so that they can be looked at in isolation? (I'd like to focus on this change before we discuss brining the config back.) |
Fixed ARAM detection for GameCube games (Dolphin uses an anonymous private memory map for this unlike for Wii where it is in ExRAM which is in a shared memory map). Linux only for now. I don't have a Windows nor a Mac machine to write the necessary changes for thos platforms.
ee91c38 to
b79277a
Compare
|
Done. The commits are isolated per PR. |
|
How could I verify that the change is working? Is there any particular game that is needed? |
|
Metroid Prime and Metroid Prime 2: Echoes are games that I know make use of ARAM for streaming data from PAK files. This is what I primarily tested with but I also tested this among my game library such as Paper Mario TTYD. ARAM should be allocated by Dolphin regardless if the game makes actual use of it. But games that do at least initialize ARAM usually have As for verifying if its working, the "Go To ARAM" button should be clickable and of course youd see |
|
I have been able to verify that, indeed, currently ARAM shown by DME does not match the buffer exported via Export > Dump ExRAM in Dolphin. So, there is definitely something to address here. (I haven't checked if this broke with my recent changes in #264, but very likely.)
I remember asking about the |
| if (systemInfo.isDiscMagicWordGCKnown() && systemInfo.isBootCodeKnown() && | ||
| size == dolphinOSGlobals.getARAMSize()) |
There was a problem hiding this comment.
Isn't this equivalent to:
| if (systemInfo.isDiscMagicWordGCKnown() && systemInfo.isBootCodeKnown() && | |
| size == dolphinOSGlobals.getARAMSize()) | |
| if (size == m_ARAMSize) |
m_ARAMSize would only be greater than zero if a GC game has been detected; no need to check the magic numbers again.
We should probably add if (!size) continue; to discard empty segments (although I'm not sure if they can realistically appear).
There was a problem hiding this comment.
On a side note, I was under the impression that the size of the memory map for the ARAM memory would not necessarily match the ARAM size that Dolphin reports (i.e. m_ARAMSize), but a greater buffer (the next power of 2).
| (offset & 0x00040000) == 0x00040000) | ||
| { | ||
| m_emuARAMAdressStart = firstAddress; | ||
| m_ARAMAccessible = true; |
There was a problem hiding this comment.
There is something around here that doesn't sound right to me. As far as I know, m_ARAMAccessible should never end up being true for Wii games. So, the inline comment above doesn't align to what I thought I knew.
For Wii games, there will be MEM1 and MEM2 (ExRAM), but no ARAM.
So, either the block is no longer needed, or the inline comment is not accurate. (I think it's the former.)
|
Is this abandoned? |
Fixed ARAM detection for GameCube games (Dolphin uses an anonymous private memory map for this unlike for Wii where it is in ExRAM which is in a shared memory map). Linux only for now. I don't have a Windows nor a Mac machine to write the necessary changes for thos platforms.
Dolphin gives a private anonymous memory map for ARAM for GameCube games (not shared memory unlike GameCube games in Wii mode). This fixes ARAM detection by including anonymous private memory maps and checking its size and a common signature I saw across many games' ARAM dumps. This was the best solution I found with this problem as Dolphin intends for ARAM to only be accessed by its DSPManager interface which makes things difficult for ie. DME as an external tool not part of/compiled with Dolphin.
Further more, the ARAM detection being fixed only for Linux is because I do not have the necessary resources nor know-how to write this fix for Windows and Mac. I also lack machines with these operating systems. I am sure there can be similar approaches done on Windows and Mac but I cannot write for these.
See: