TASEmulators / BizHawk

BizHawk is a multi-system emulator written in C#. BizHawk provides nice features for casual gamers such as full screen, and joypad support in addition to full rerecording and debugging tools for all system cores.
http://tasvideos.org/BizHawk.html
Other
2.2k stars 385 forks source link

[Request] [melonDS] : fixed RTC + clock changeable in game #1908

Closed Real96 closed 3 years ago

Real96 commented 4 years ago

The option to fix RTC + allowing to change the emu clock while playing are useful for Rng purpose

SuuperW commented 4 years ago

I'm not sure what you mean. The RTC's time at boot is a sync setting, and the time can also be changed from the firmware menu in the same way as a real DS. This does not update your sync settings, though.

As of commit ebc49db, there is now a power button. This allows for rebooting the game without re-applying the time at boot sync setting. Does this solve your issue?

Real96 commented 4 years ago

Well, like have an option to fix the time during all the emulation and also the ability to change it during emulation. Desmume actually let do this, cause it depends on system time. So maybe having this as option can be great in bizhawk for Rng purpose.

SuuperW commented 4 years ago

It sounds like you want a cheat; something that isn't possible on a physical DS. This is probably best done as a Lua script (not possible at the moment), although I don't really understand what advantage this has over hacking the game's RNG values directly (which is currently possible).

Real96 commented 4 years ago

There are games like Pokémon HeartGold or Pokémon Black, in which timing is the main factor for Rng Seed generation

RetroEdit commented 4 years ago

For clarification: could RTC manipulation mid-game be a feasible method of play on a real unmodded DS (e.g. power-cycling and simultaneously modifying RTC, or something of the like)? If so, I think this should be addressed. If not, I'm inclined to think this becomes a form of hardware manipulation, and the emulator itself is not directly responsible for implementing behavior that could not occur on a real console because there's no way to compare to real console in that case, and it would also probably complicate the movie format unnecessarily.

SuuperW commented 4 years ago

There are games like Pokémon HeartGold or Pokémon Black, in which timing is the main factor for Rng Seed generation

I understand that, but is there any non-cheating purpose for doing this? And if not, why not hack the RNG seed directly?

Real96 commented 4 years ago

I'm thinking about this situation on a real console: if i turn on the DS and start a game, then put the console in stand-by by closing it (with game still in execution), leave it for a while in stand-by and then re-open it, would the time change? Won't it be the same situation?

SuuperW commented 4 years ago

I believe the time would change while the lid is closed, and MelonDS already emulates the lid.

Real96 commented 4 years ago

So, will changing time from settings during emulation be the same as using a cheat?

RetroEdit commented 4 years ago

I'm thinking about this situation on a real console: if i turn on the DS and start a game, then put the console in stand-by by closing it (with game still in execution), leave it for a while in stand-by and then re-open it, would the time change?

In that case, the time would change, but in proportion to the amount of time the lid is closed.

And by having the sync-setting is equivalent to choosing to play a game in real-time starting at a specific time for RNG manipulation.

But arbitrarily changing the RTC time mid-game? I'm skeptical about this being implemented unless there's a comparable method of accomplishing this on real console without directly modifying hardware. I would consider doing so a "cheat" of sorts if there's no comparable method for doing so on an actual console.

Real96 commented 4 years ago

Anyway, i was thinking: neither saving a state and loading it back again is possible on a physical ds. Many things implemented in an emulator, aren't possible on a physical console. So i think that adding this can be useful. Leaving the choise to fix it during all emulation, fix just the starting time (as it is right now) or change it during emulation. Instead of using a cheat

vadosnaprimer commented 4 years ago

Savestates don't affect how your movie is played back and don't compromise accuracy of emulation. You don't "emulate" savestates. It only makes sense to emulate whatever the hardware can do. For example, GBA games can be started out with dead battery, resulting in no RTC at all in games that are meant to have it.

Real96 commented 4 years ago

But at least, can system time be used?

SuuperW commented 4 years ago

MelonDS by default uses the system time. I made BizHawk default it to emulated time instead, because using system time breaks determinism. Idk if it's a good idea to add a feature to make it non-deterministic, and I also don't know how BizHawk handles that.

If you really want system time (and don't want to use the official version of MelonDS), manually modifying your config file so that TimeAtBoot is 0 would probably work. But for now I do not plan on adding this feature, and would recommend you use cheats instead.

Real96 commented 4 years ago

"TimeAtBoot": 0 worked great for system timing

Liger0 commented 4 years ago

MelonDS by default uses the system time. I made BizHawk default it to emulated time instead, because using system time breaks determinism.

That's totally understandable, but that brings me some questions.

Does the time get restored when loading a save state? Basically does the save state also save the time it was done? Does pausing the emulation block the time advancement? Do speed up also speed up the time clock equally?

Real96 commented 4 years ago

MelonDS by default uses the system time. I made BizHawk default it to emulated time instead, because using system time breaks determinism.

That's totally understandable, but that brings me some questions.

Does the time get restored when loading a save state? Basically does the save state also save the time it was done? Does pausing the emulation block the time advancement? Do speed up also speed up the time clock equally?

Yes to all of them. I tested it

Real96 commented 3 years ago

Closing this cause i tested many things and i think that the time is managed in a fantastic way