FishamanP made this for me a while back while he looked at the game.
RNG Location
0204B164/4 - lo 32
0204B168/4 - hi 32
RNG Equation
(input * 0x5d588b656c078965) + 0x269ec3
02051B58/2 - Touch X coordinate [2nd and 3rd nibble]
02051B5A/2 - Touch Y coordinate [2nd and 3rd nibble]
0204E2BE/1 - Link's X position [minimap coord?]
027E0988/2 - Link's X subpixels
0231F944/2 - Link's X velocity
0204E2BC/1 - Link's Z position [minimap coord?]
027E05E0/2 - Link's Z subpixels
027E05F8/2 - Link's Z velocity
02277C4C/1 - Remaining health (1/4 hearts)
02277C4D/1 - Max health (1/4 hearts)
30 frames/sec
60 VIs/sec
Don't confuse these or I will slap you.
Spirit Tracks lags an extra VI every 10 VIs or so. [TODO: confirm with TAS settings on]
Link's velocity is added to his subpixels every frame. Link's normal running speed appears to cap at ~696, strangely lower when touching the very corners of the screen. However, it looks like you can gain a few extra subpixels per second with certain diagonal angles. Use the Pythagorean Theorem, kids!
Strange note: Link's Z velocity does not seem to increase when rolling on that axis. Might have wrong address? But values otherwise match X velocity so idk... [speed cap instead of velocity?]
TODO: find optimal touchscreen coordinates for max speed