Project

General

Profile

Actions

Emulator Issues #10737

closed

Feature Request: Access to a cache-less Recompiler or a workaround for real-time altered assembly code. (when cheats are enabled)

Added by retroben over 7 years ago. Updated about 7 years ago.

Status:
Invalid
Priority:
Normal
Assignee:
-
% Done:

0%

Operating system:
N/A
Issue type:
Bug
Milestone:
Regression:
No
Relates to usability:
No
Relates to performance:
No
Easy:
No
Relates to maintainability:
No
Regression start:
Fixed in:

Description

I know the idea of recompiler without cache is a ridiculous one,but having a workaround for assembly data in memory to respond in real-time would be helpful for finding cool and funny codes.
I have wanted something like this for the longest,the fact that even cached interpreter can't react to changed assembly code values is irritating.
With cache on interpreter it performs much faster than pure interpreter but slower than JIT recompiler for obvious reasons.
And we know recompiler is even more stubborn about changed assembly values.

Having a version without cache would likely be as slow or slower than cached interpreter but at least faster than pure interpreter single-digit fps rate.
The other idea would be an easy fix for access to real-time assembly modding while on recompiler with identical and could designed to only apply when cheats are enabled or a checkbox of its own to make it work.
In N64 emulation,Mupen has a method that responds to changed ASM and marks affected pages of cache as dirty then replaces them on a 4kb range to update the values,allowing real-time ASM changes to work much like an actual console would do,so if you used a code that modifies a specific animation and set button activators to it with multiple values,it would let you alter it in real-time without needing to rely on exploits like spamming save-states after changing the value.
Currently,in order to do this in real-time,I have to run the game at 8-10fps when on pure interpreter,but if there was a fix/workaround on recompiler,I could easily enjoy access to full 60fps speeds while altering ASM values to find out what they do and make fun codes in a much shorter time with less excessive save-state usage.

Examples; Wario World speeds-> recompiler=full 60fps easily | cached interpreter=slowdowns around 30-40fps or slower | pure interpreter=8-10fps usually,sometimes even slower

Someone please try to do something to make this possible to get rid of the headache of save-state spams just to check out modified ASM. (this would allow cheats to work exactly like they would on an actual console)
I posted a code for the game in an old topic of mine I repurposed so it could get some use instead of carelessly making a new topic.

Actions #1

Updated by JMC4789 over 7 years ago

Wouldn't Locking do this without us having to worry about maintaining another CPU backend?

Actions #2

Updated by retroben over 7 years ago

JMC4789 wrote:

Wouldn't Locking do this without us having to worry about maintaining another CPU backend?

"Locking"?

Isn't that more in relation to shader cache and EFB/XFB than it is to ram memory?
Or does it also refresh the memory cache on each alteration of just about anything?

Something similar to how Mupen64Plus' method works should be very possible,it should likely make all console Gecko/AR codes work on Dolphin as well if the problem ever related to memory cache being created before the codes could alter the original memory or any codes that alter ASM in real-time for varied results any time you want.

The source of the problem for Dolphin and other emulators for 3D consoles/portables on recompiler (and cached interpreter) is the cache not updating to freshly altered memory values (via small chunks to prevent major performance drops) that are made by button activators which change them for fun effects or customizations.
It could be an optional feature or combined with the cheats enabled tickbox function so that it doesn't get used when cheats are disabled anyway.
(patch codes don't have button activator access anyway so they wouldn't need the feature)
Though,this would make it act more like an actual console does when using button activator ASM mod codes.
Theoretically,Dolphin is less accurate when any Gecko/AR code a console can use doesn't work on Dolphin,it would be apples-to-pears with accurately emulating that memory corruption glitch crash showcased in one of the progress reports. I say apples-to-pears because cheats are contradictions to the game's original programming,because pears are similar instead of exact.

What did the old option "purge cache" do exactly? Would that of had an effect on codes that normally fail to update into the cached memory and allow the codes to then function immediately?
Hmm...there is "disable JIT cache" and "clear JIT cache" options,would one or both of those happen to potentially do what I seek in some manner? If so,this request would be moot point. I shall test it and see.

Actions #3

Updated by retroben over 7 years ago

This site's posting is still confusing. The "edit" button acts like making a reply.

Tried checking disabled JIT cache but now the game won't even boot. Darn. Curious as to why it don't boot.

Actions #4

Updated by retroben over 7 years ago

Even the game its meant for,Twilight Princess,doesn't boot if I check the "Disable JIT Cache" option,so something must either be broken or D3D11 doesn't like that option.
At one point the screen booted but the speed was 0.01fps and nothing was proceeding.

Running on Dolphin 5.0-4994 x64.

Actions #5

Updated by leoetlino about 7 years ago

  • Status changed from New to Invalid

JIT > Disable JIT Cache.

If that's not enough for you, there's the cached interpreter.

Actions

Also available in: Atom PDF