Advertisement
DeathBasket

MM postman timer

Nov 14th, 2015
908
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.60 KB | None | 0 0
  1. Memory addresses:
  2. US version
  3. int64 time_now = 0x80090420()
  4. 0x801F3454 int32 postman_timer
  5. 0x801F34C0 int64 start_time
  6.  
  7. JP 1.1 version
  8. int64 time_now = 0x80091320()
  9. 0x801F37AC int32 postman_timer
  10. 0x801F3818 int64 start_time
  11.  
  12. time_now is the return value of a function. It will be similar to the number held by COP0 register "Count" (which updates for every instruction executed), but is extended to 64 bits for greater range.
  13. postman_timer usually updates every visual frame but will also be updated for the input frame you end the minigame on.
  14. start_time is the value returned by the same function used to get time_now but on the frame the minigame is started.
  15.  
  16. These addresses also hold the current time (64 bits) but are only updated at 60Hz and won't be accurate:
  17. 0x8009E5B0 US
  18. 0x800A00F0 JP 1.1
  19.  
  20. maths:
  21. postman_timer = (((time_now - start_time)*64)/3000)/10000 = (time_now - start_time)/468750
  22.  
  23. What is significant about that number? Well, 468750*2 = 937500 and N64's clock speed is 93750000Hz.
  24. The timer is independent of the frame/input rate. 10.00 could possibly get skipped due to the game running faster or slower than usual. Also, because this is integer division, the range for hitting 10.00 is between 10.00 and 10.009999... (no rounding happens). Since an input frame is about 0.0167s, if the timer happens to hit somewhere between 9.9933 and 10.00, 10.00 will be skipped and the next input frame will be 10.01. This might be what is happening on VC a lot of the time. This doesn't matter on any versions except JP 1.0/1.1 because the rest will set the timer to 10.00 if you got close enough anyway.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement