Open Serah64 opened 3 years ago
If you're replacing actual instructions, you need to be careful with Dolphin's JIT and instruction cache!
Sadly, the only way I know of doing this is having the game itself call icbi
, so I imagine you'll need to do some dol patching. This is what I do for the multiworld things in Randovania.
Gotcha! Are there functions that allow me to do this in DME, and if so, where can I read about them / could you provide an example?
Thanks so much for the hasty response! :)
No, DME handles just changing the game's memory in runtime.
Randovania itself has a big framework for patching a gamecube dol file, including patching a function so it can run code written via remotely via DME or a Nintendont fork. While I plan to split of part of that into it's own repository, that's not where it is right now :)
Ah, if you do use Randovania's code, be mindful of the different license.
Understood!
Thanks so much for the help. Yes, I'll be sure to read the license and follow whatever guidelines are necessary.
I'm working on a program that has not been made open-source (as of yet anyways) which will be very similar to Crowd Control, but with a much bigger scope for customization, catalog, and options for Twitch Chat to play with in-game.
We've made an enormous amount of progress so far in Dolphin. DME has been extraordinarily helpful in all of this!
So, there's another solution to the issue I initially commented on, it's related to the JIT Cache refreshing. It doesn't happen automatically when memory is written through DME. Is there a command to do it?
Thanks!
That is precisely what I said in my first reply.
I see that, but that's through patching the game. Since Dolphin natively has an option to manually clear the cache while the game is running, I was wondering if there was an object to do it through a terminal. (Currently using py-DME as a library rather than in its application form, using ipython in powershell)
That's the only way I know.
Triggering a JIT cache clear involves some form of RPC with Dolphin, which there isn't afaik.
Hey there,
Certain memory addresses and consecutive byte-sized addresses that all serve only one purpose in various games don't seem to create the desired effect.
For example, writing 0x3BE00001 to 0x80269F50 in Super Mario Sunshine is supposed to change which Alt. Nozzle Mario has on from the normal Hover Nozzle to the Rocket Nozzle. By writing to the respective memory addresses with DME, it doesn't change anything. However, if I use Dolphin's built-in memory editor and right-click the address to "Replace Instruction", it works every time.
Additionally, I have confirmed that my instance of DME is hooked and I have even read the values of the addresses after writing to them, and it appears as though they are in fact writing the correct values to the correct addresses, but still it does not appear to work unless I use the "Replace Instruction" feature mentioned above.
If I'm missing a key function that I'm supposed to use, do let me know what it is!
(PS: Am running ipython in Windows Powershell, DME imported and using the write_byte and read_byte functions there to test memory addresses. Also have a custom write_bytes function for the case of writing across multiple addresses. Thanks!)