-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Change System Time #16444
Comments
Could also be useful for #15617 |
You can actually use the API to call
Also, a save state memorializes the timestamp. Another method is to start with "Break on load" enabled, and create a save state before starting CPU execution. Now everything will be constant from that save state and you can always load it for the same base time to be used (as well as randomness and anything else.) -[Unknown] |
You also want to set the time to a specific value before launching a game, otherwise rng will be out of sync eg when replaying a TAS. |
Well, if you create a save state / set the time literally 0 cycles into emulation, that is before starting the game. The way I run PPSSPP, I have to press the "unthrottle" (fast-forward) button or hit "Go" in the debugger after I load a game for it to actually start. Before pressing that, I can do or configure anything I want before the game starts. PPSSPP has supported this for years. I've always assumed that would be an obvious component of TAS, but I'm not personally that interested in TAS myself. -[Unknown] |
TAS stuff aside, I do think this is still important to add to the UI. There are absolutely games with events/special items tied to the system clock. Gurumin, for instance, has a bunch of these. Moreover, it's not inconceivable that a high enough clock value could just outright break some poorly coded games. It's a bit much to request the average user (especially on mobile devices even) enter a special debug mode or set their system clock to be able to get around this. |
I'm not necessarily disagreeing, although there's also a balance to the number of config settings we have. For example, there's some settings the PSP operating system lets you set and exposes to games: whether to use X/O as a confirm button, whether it's currently DST, date format, time format, etc. There have been pushes multiple times to remove these settings and people from time to time complain they don't work or need "fixing" because games often (but not always) don't respect them. A system time setting would be respected in all games, but there would be tricky things to changing it mid game. Currently, if you start a game, create a save state, and then load that save state a week later - time doesn't move forward. A save state is literally like you never stopped playing in the "emulated PSP world." But what happens if you changed the system time between those? Maybe even for another game, did you intend for it to cause this game to suddenly reject all your savedata? To give you an error message every time autosave occurs now, and mark saves as broken in memory so even changing system time back won't fix it (from this save state)? Sometimes to resolve these concerns we add an "ini only" setting, one that can be set via ini for more esoteric use cases. I don't think that'd be appropriate here, because we already have a way to do it at runtime - just not in the UI. Anyway, I personally think it'd be fine enough to add a setting which impacts the start time with the following constraints:
Also, it might be necessary to set the modification time of save files to the PSP time, which we don't currently do. Maybe that's already a separate problem, although it's probably confusing for a file manager to tell you a save file on your Android device was last modified in 2006. (I'll also note that something likely needs to be done about this before 2038, because I'm sure there are at least a few PSP games that'll have a Y2K38 problem.) -[Unknown] |
What should happen
We should be able to change the system time in the settings menu. Currently, it exclusively pulls from the host system time.
Who would this benefit
Some games may break in the future with different dates, some games have special events on specific times, etc. Windows, and quite a few pieces of software with timed licenses, are especially finnicky about changing the system date, so it would be very nice to be able to do so within the emulator itself.
I personally discovered this lack while hacking a PSP game and trying to take apart its save file (which has a bizarre timestamp method that is a massive pain to diagnose having to change the host system time every time I want to tweak something).
Platform (if relevant)
No response
Games this would be useful in
Any
Other emulators or software with a similar feature
No response
Checklist
The text was updated successfully, but these errors were encountered: