melonDS-emu / melonDS

DS emulator, sorta
https://melonds.kuribo64.net
GNU General Public License v3.0
3.28k stars 543 forks source link

[feature request] The ability to change the DS clock #208

Closed ghost closed 1 year ago

ghost commented 7 years ago

In Castlevania Portrait of Ruin, one of the side quests involves talking to a character at a certain time.

Rather than have to wait hours in real time, I'd like the ability to change the clock.

Karthik99999 commented 7 years ago

just change the time on your actual computer or boot the ds menu and change the time there

Brian151 commented 7 years ago

funny, i don't think i've ever booted the DS menu. never had a reason to do so. Still don't. I just find this issue interesting.

mariomadproductions commented 6 years ago

There are also programs that can trick an exe into thinking the time is different.

Zettymaster commented 5 years ago

to extend on this, maybe we can add an offset to real time, specifying the days, hours and secs for convenience, no user wants to look up unix time.

Seltyk commented 4 years ago

I like Zettymaster's idea but I feel it'd be a lot easier to just have a tickbox for "override system time" and then provide a date/time. Under the hood perhaps that'd be implemented as a Unix time offset, though. Whether that time would update naturally during emulation or be artificially locked is the question this solution poses, though it remains OS-agnostic.

v-fox commented 1 year ago

The settings in DS menu are ignored and system time is forced. But in Linux libfaketime can be used to imitate arbitrary time. I completed that annoying PoR quest by starting emulator with faketime -m '00:00:00' melonDS, loading, getting completion, saving and restarting normally.

But then melon decided to rename my save-file with a suffix for some reason and neither non-numbered, numbered save-state and suffixed save-state saves-files had picked up the change. I have "separate save-files" enabled. I don't know if it always like that or with this option but melon creates save-file per save-state and only uses it if save-state successfully loaded. I saved to save-state 1's save and save-stated to make sure that it applied but neither non-state/non-numbered nor save-state 1 had quest completed. Until I manually renamed save-state's save-file into non-numbered one and loaded without restoring save-state.

So, either I heavily mixed up my save-files or melon got angry at time change and decided to "fix" that by somehow forcing old save-file to retain. Maybe by ignoring numbered save-state's save-file and silently loading non-numbered one or something.

Basically, expect it to mess with saves when you do that trick.

nadiaholmquist commented 1 year ago

That happened because you have separate save files enabled, turn that option off if you don't want it to do this.

v-fox commented 1 year ago

That happened because you have separate save files enabled, turn that option off if you don't want it to do this.

To do what ? What if it just corrupts the only file, like with #1230 ? Pretty sure, putting suffixes (NOT .ml* ones but ones at the very end) and suddenly ignoring changes isn't part of an option. It seems like there is some automated recovery logic and it may be triggered regardless of that option. I also suspect, judging by file time-stamps, that it re-saves files on save-state load and if it crashes during save-state load then it's a gamble on what corrupts the save: crash, re-save or recovery.

Arisotura commented 1 year ago

done