CJBok wrote: ↑Sun Jan 27, 2019 3:35 pm
The Game Duration time only increases during gameplay. Cutscenes and pause state are not added to the Game Duration time.
So when you are browsing through your inventory / map / files Game Duration time is still increasing.
Game Duration time is NOT stored in memory but is calculated by 3 values stored as microseconds in 8 byte.
8 Byte Current Time: Increases always!
8 Byte Start Time: Increases during cutscene unless cutscene is paused.
8 Byte Pause Time: Increases when game is in paused state even when cutscene is paused.
Game Duration Time in seconds = (Current Time - Start Time - Pause Time) / 1000000
Think I've explained this pretty much on Discord the last time I ripped apart the demo timer
Have it documented in x64dbg:
[Link]. Enjoy a nice read
Something tells me the same logic's been kept in the main game as well.
Code: Select all
000000014D6B2FD4 | 44:3877 54 | CMP BYTE PTR DS:[RDI+54],R14B | [app.ropeway.GameClock+54] == 1; 0 initially
In the
demo, flipping this BOOL to 0 will
freeze all timers: internal, savegame, etc. It will look as if you never played
L.E.1: Ah, so the code in the main game has slightly changed
Code: Select all
re2.exe+AD9D88E - 48 8D 04 2A - lea rax,[rdx+rbp]
re2.exe+AD9D892 - 48 89 41 18 - mov [rcx+18],rax
re2.exe+AD9D896 - 48 8B 43 50 - mov rax,[rbx+50]
re2.exe+AD9D89A - 4C 39 70 18 - cmp [rax+18],r14
re2.exe+AD9D89E - 0F85 B0020000 - jne re2.exe+AD9DB54 // (A)
re2.exe+AD9D8A4 - 44 38 77 50 - cmp [rdi+50],r14l // (B)
re2.exe+AD9D8A8 - 0F84 A6020000 - je re2.exe+AD9DB54
re2.exe+AD9D8AE - 48 8B 47 60 - mov rax,[rdi+60]
re2.exe+AD9D8B2 - 48 85 C0 - test rax,rax
In the demo, right between what you see as (A) and (B) up there, there was this:
Code: Select all
000000014D6B2FCA | 4C:3970 18 | CMP QWORD PTR DS:[RAX+18],R14 |
000000014D6B2FCE | 0F85 59030000 | JNE re2.14D6B332D |
000000014D6B2FD4 | 44:3877 54 | CMP BYTE PTR DS:[RDI+54],R14B | [app.ropeway.GameClock+54] == 1; 0 initially
000000014D6B2FD8 | 40:0F95D6 | SETNE SIL |
000000014D6B2FDC | 44:3877 50 | CMP BYTE PTR DS:[RDI+50],R14B | [app.ropeway.GameClock+50] == 1; 0 initially
000000014D6B2FE0 | 0F84 F8020000 | JE re2.14D6B32DE | if 0, taken
000000014D6B2FE6 | 48:8B47 60 | MOV RAX,QWORD PTR DS:[RDI+60] | [app.ropeway.GameClock+60] == app.ropeway.GameClock.GameSaveData
..
..
000000014D6B32DE | 40:84F6 | TEST SIL,SIL | also taken, when SIL == 0
000000014D6B32E1 | 74 4A | JE re2.14D6B332D |
..
..
000000014D6B332D | 48:8B7424 30 | MOV RSI,QWORD PTR SS:[RSP+30] | exit
000000014D6B3332 | 48:8B5C24 38 | MOV RBX,QWORD PTR SS:[RSP+38] |
000000014D6B3337 | 48:8B6C24 40 | MOV RBP,QWORD PTR SS:[RSP+40] |
000000014D6B333C | 48:8B7C24 48 | MOV RDI,QWORD PTR SS:[RSP+48] |
000000014D6B3341 | 48:83C4 20 | ADD RSP,20 |
000000014D6B3345 | 41:5E | POP R14 |
000000014D6B3347 | C3 | RET |
^ Lines 3 and 4
So Capcom removed that one check in the main game. Considering they're not checking
0x54 offset in
app.ropeway.GameClock, the timer will continue to do its calculations. Wanna patch it in? Sure thing
Posting code in a bit
L.E.2: No code posting; you can just flip the bool @ 0x50
Make it
0. There you go:
Code: Select all
re2.exe+AD9D8A4 - 44 38 77 50 - cmp [rdi+50],r14l <-- 0
re2.exe+AD9D8A8 - 0F84 A6020000 - je re2.exe+AD9DB54
re2.exe+AD9D8AE - 48 8B 47 60 - mov rax,[rdi+60]
P.S.: I've not checked Cielos' table yet to see what he's doing in there