-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Panic if game does an invalid memory access. #991
Conversation
{ | ||
PanicAlertT("Invalid Read at 0x%08x, PC = 0x%08x ", em_address, PC); | ||
|
||
} | ||
} |
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
Previously, if a gamecube game wrote to an EXRAM address, dolphin would segfault.
Previously it would fall through to the mmu code path, and raise a dsi exception, which it would never check for, so it would continue executing code silently.
f696eb5
to
1963717
Compare
Those issues are fixed. |
Looks good to me |
@@ -135,6 +136,10 @@ inline void ReadFromHardware(T &_var, const u32 em_address, const u32 effective_ | |||
_var = bswap((*(const T*)&m_pRAM[tlb_addr & RAM_MASK])); | |||
} | |||
} | |||
else | |||
{ | |||
PanicAlertT("Invalid Read at 0x%08x, PC = 0x%08x ", em_address, PC); |
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
Why is the mmu path hiding errors? Sounds like that's what needs to be fixed rather than panicking. Throwing a DSI/ISI might be expected behaviour ala Clone Wars. |
DSI are signaled by setting an exception flag in PPCState. In order to actually call the exception handler, the jit has to add a cmp/branch after every memory load/store to check if the exception flag has been set, and then generate exception exit code to clean up all the registers and jump to the dispatcher. This gets very expensive, so it is currently only implemented when you check the enable mmu box. Most games never implement a meaningful DSI handler, so a DSI is game over, stack trace. |
Besides, isn't Clone Wars an MMU game. |
Panic if game does an invalid memory access.
Now mmu is needed with fzero, plus single core for stability, couldn't get any worse really for that game. |
This kind of goes for what @tueidj said, that F-Zero GX should need full MMU. |
It still needs single core for stability and a projection hack for the videos... It is messed up in master... |
Oh yeah, the Sonic Unleashed Hack needs to be fixed in both backends, and @comex still broke syncGPU. But, we should /try/ to get this working with MMU Speedhack again. If it was possible before, it should be more possible now if what I'm thinking is true. |
Probably want to also recheck https://code.google.com/p/dolphin-emu/issues/detail?id=7298 against this commit. |
This will make it easier to track down bugs. Previously non-mmu games would fall through to the mmu code path which would kindly hide the error.