Emulator Issues #8068
openInvalidate JIT blocks that are modified by cheats
0%
Description
Game Name?
All Games (tested with The Legend of Zelda: The Wind Waker)
Game ID?
GLZJ01
What's the problem? Describe what went wrong in few words.
JIT Blocks are usually not invalidated if they are changed by cheats, so cheats that modify already recompiled code won't work at all.
What did you expect to happen instead?
The cheats should invalidate JIT blocks that are modified by the cheats.
What steps will reproduce the problem?
- Write a simple cheat that modifies parts of the game loop based on some condition (controller input)
- Use the cheat to conditionally modify the game loop
Dolphin 3.5 and 3.5-367 are old versions of Dolphin that have
known issues and bugs, so don't report issues about them and test the
latest Dolphin version first.
Which versions of Dolphin did you test on?
4.0-4418
Does using an older version of Dolphin solve your issue? If yes, which
versions of Dolphin used to work?
I don't think so
What are your PC specifications? (including, but not limited to: Operating
System, CPU and GPU)
Shouldn't matter
Is there any other relevant information? (e.g. logs, screenshots,
configuration files)
No
Updated by magumagu9 almost 10 years ago
- Status changed from New to Accepted
- Easy set to Yes
It would be nice if you could provide an example cheat which demonstrates this issue.
This is probably a good first patch for someone looking to help improve Dolphin. The relevant code is in PatchEngine.cpp and ActionReplay.cpp; the code needs to call JitInterface::InvalidateICache whenever it writes to memory.
Updated by benrain almost 10 years ago
Hi, I've been looking to get helping out Dolphin for awhile now.
I'll go ahead and give this a look. I have a local dump of the game I can use.
Reproducible steps would be appreciated but I can go ahead and get started.
Updated by dantarion almost 10 years ago
I believe this may fix Project M as well.
Updated by benrain almost 10 years ago
I wrote the expected code yesterday for both scenarios; but I am still awaiting some reproducible steps. Not sure how to write or where to obtain cheats to test with.
Updated by CryZe92 almost 10 years ago
This one is one of them for Wind Waker NTSC-U (GZLE01)
hold A to walk through walls/sail through islands [wiiztec]
040A38D0 4BFFF86D
040A38E8 4BFFD9BD
283ED84A FEFF0100
040A38D0 60000000
040A38E8 60000000
E0000000 80008000
the 04 codes write into code area, so the cheat restores the original code in the first two lines and then conditionally overwrites it with NOPs in the fourth and fifth line.
Updated by JMC4789 almost 10 years ago
I have Project M to test if you do come up with a patch. Thanks.
Updated by magumagu9 almost 10 years ago
To clarify, this issue is about ActionReplay etc. codes... patched ISOs with invalidation issues are issue 7288.
Updated by benrain almost 10 years ago
Sorry for the lack of update; I was able to put forth the proposed solution invalidating the ICache; did not have any luck with it.
Updated by dantarion almost 10 years ago
The hilarious thing is that this code is made by the same person that made the codes in Project M that don't work in Dolphin! Ill take a stab at this this weekend
Updated by JMC4789 over 9 years ago
Anythign come of this? It sucks that Project M's codes don't work either, but at least we could fix our loader for people using Action Replay/Gecko Codes through dolphin.
Updated by CryZe92 over 9 years ago
I got it to somewhat work, but there's still a slight delay :(
It looks like Invalidating the ICache only actually forces it to recompile every ~5 seconds. Any ideas?