Closed TotalCaesar659 closed 1 year ago
I think timestamps are only added while connected to psn on real hardware
I think timestamps are only added while connected to psn on real hardware
Well if that's the case they should still be logged to a separate file or something just for user convenience. As mentioned in the above apparent duplicate issue, some people may want to manually copy that data to original hardware which IS possible to do with timestamps via PS3TrophyIsGood. Another person also noted that the times ARE in fact being set already in the code, but for some reason default to 0.
As @MSuih suggested, there is already some code to write timestamps to trophies, but it's always filling it with "0".
https://github.com/RPCS3/rpcs3/issues/10254#issuecomment-835179669
About it, is there anyway to set internal RTC clock of RPCS3 (if it exists) to use the system clock? If so, RPCS3 could use that to fill the correct timestamps.
It's just a shame that between this and the missing header, it's so close, but otherwise generates a partially invalid file. I've also found that IMPORTING a real trophy list will actually be read initially, but entirely wiped the moment an in-game trophy trigger is hit. Not sure if it's related to this or the header, but it's still an issue.
@RipleyTom do you think RPCN can help here? Or is it something else as said in: https://github.com/RPCS3/rpcs3/issues/10254#issuecomment-835179669
Technically trophies are stored on PSN but it's not a functionality I plan to implement.
Thanks for the reply. @Megamouse do you think is possible to "fix" it locally (in the TODO left) or is still needed XMB?
What I've done is to modify sceNpTrophy.cpp - it's an ugly hack but it's working for me - definitely better than storing zeroes as these values.
Calculate timestamp like that:
auto now = std::chrono::system_clock::now();
u64 timestamp = std::chrono::duration_cast<std::chrono::microseconds>(now.time_since_epoch() + std::chrono::hours(24 * 719162)).count();
Trophy timestamps are in microseconds since 0001-01-01 AD - hence the calculation.
Then pass that to UnlockTrophy in same file where it's used instead of 0 as timestamp1 and timestamp2.
I could confirm in hex editor that these timestamps are now correct, but of course, this will not make them show up in RPCS3's trophy window - this would require further changes.
@RobbedColek can you compare the output of #13867 with your reference data?
@Megamouse - Sorry for late response, I rarely get on Github.
Took a brief look - the timestamp has to be also set for the first parameter timestamp1 for it to be 'properly' written to file.
So instead of:
ctxt->tropusr->UnlockTrophy(trophyId, 0, tick->tick)
You'll need:
ctxt->tropusr->UnlockTrophy(trophyId, tick->tick, tick->tick)
With that change, I've tested it quickly and everything seems to be working fine!
@RobbedColek it should be fine now in the PR. I only wondered if the values written to file match the values that you'd expect (microseconds since ...).
@Megamouse looks all fine to me, thank you for working on this!
Hello, could you add date/time of unlocking to Trophy Manager?