Project

General

Profile

Actions

Emulator Issues #12955

closed

Soft resetting (Ctrl+R) while having booted a game with patches resets the game without patches applied

Added by William278 almost 2 years ago. Updated almost 2 years ago.

Status:
Working as intended
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

When soft resetting a game (I.e pressing Ctrl+R) after having started the game with Riivolution patches, I’d expect the game to reset with those patches. The current behaviour (intentional?) seems to be to reset the game without patches applied.

It seems sensible to me that if I’m soft resetting in the emulator after having launched a game with patches that it would reset with those patches still applied.

Actions #1

Updated by leoetlino almost 2 years ago

  • Status changed from New to Working as intended

By Ctrl+R, I assume that you mean Emulation > Reset (note that Ctrl+R is not a built-in hotkey for resetting).

Resetting in this way basically just sends a signal to the emulated software, which is free to do whatever it wants as a response. Some games actually reload themselves, other games just go back to the title screen immediately (e.g. Twilight Princess).

In the former case, it would be difficult to detect when to re-patch the game, as Dolphin is never involved in the process of the game reloading itself (unlike at boot time).

And for the games that don't actually reload themselves, trying to patch them while they are still running and doing arbitrary things would be disastrous! The current behaviour (not forcibly reapplying patches on soft reset) seems to be the only sensible action.

Actions #2

Updated by AdmiralCurtiss almost 2 years ago

By 'patches', what patches exactly do you mean? If you're talking about memory patches, then yes, I would expect them to disappear if the game just completely resets itself. If you're patching the files on disc, that's a bit stranger. Can you be more specific what you're doing?

Actions #3

Updated by William278 almost 2 years ago

Hi, thanks for your questions and I apologize for not being specific enough in my original post.
I was specifically talking about the functionality that happens when you run Emulation --> Reset (which seems bound to Ctrl+R to me -- I don't remember binding this manually, though). As you've explained, it sounds like that's actually done by games.
The patching I was talking about was Riivolution ("memory patches"?); that is, the patches you apply with (right click game --> Start with Riivolution patches...). I noticed that when running Emulation --> Reset the patches were no longer applied, and this confused me since I figured that "resetting" would restart emulation to the state when I clicked "start" in the "Start game with Riivolution patches" menu.
So I suppose although my issue is technically working as intended - it's emulating the game's built in "reset" button - it still feels slightly off to me. As an end user, I feel like resetting should reset to the state I launched the game in (with Riivolution patches).
However, it does also make sense for the "reset" feature to emulate how the game is programmed to reset (in many cases, just back to the title, as you have said). I suppose it's also a convenience thing, would be nice for a way to quickly reset with those patches applied, for easy patch development.

Actions #4

Updated by pokechu22 almost 2 years ago

Dolphin's built-in resetting functionality has an option to apply the patch either on startup or on each frame (optionally comparing the existing contents of memory). I'd expect riivolution to have something similar on real hardware (or else for riivolution to detect when the reset button is pressed). I don't know how it actually works, though.

Actions #5

Updated by JMC4789 almost 2 years ago

I tried resetting a Newer Super Mario Bros. Wii on a Wii and it booted normal NSMBWii.

What you're asking for would be pretty hard to do outside of a game by game basis.

Actions #6

Updated by AdmiralCurtiss almost 2 years ago

pokechu22 wrote:

Dolphin's built-in resetting functionality has an option to apply the patch either on startup or on each frame (optionally comparing the existing contents of memory). I'd expect riivolution to have something similar on real hardware (or else for riivolution to detect when the reset button is pressed). I don't know how it actually works, though.

No, Riivolution does not have per-frame memory patches. You can only patch memory in a few very specific spots: Before an apploader stage runs (see Boot_BS2Emu.cpp line 154 CBoot::RunApploader()) and after the game is loaded into memory but before control is given to it (see Boot.cpp line 634 CBoot::BootUp()). If you want to do more than that you have to inject your own code (such as an ocarina/gecko code handler) with one of these patches that is then called by the game at some point during normal game execution.

If JMC's test is accurate and this is just how Riivolution behaves on hardware than there's not much we can do about the soft reset case. We could potentially add a hard reset feature that essentially chains a game shutdown into an immediate game re-boot, I guess?

Actions #7

Updated by William278 almost 2 years ago

I never realised that resetting Riivolution on hardware didn’t work.

We could potentially add a hard reset feature that essentially chains a game shutdown into an immediate game re-boot, I guess?

That’d be quite nice and would certainly solve my problem- an easy way to just hard reset (rather than the soft inbuilt reset) with Riivolution patches. Of course I recognise that burdening a busy project with our use case isn’t that helpful, but this seems like a good solution nonetheless.

Actions #8

Updated by Jonko almost 2 years ago

+1 for adding a hard reset feature.

Actions #9

Updated by AdmiralCurtiss almost 2 years ago

As a temporary solution, I recommend making a Preset of the patch and relaunching that instead of going through the right-click -> Launch with Patches dance every time.

Actions

Also available in: Atom PDF