Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- About the MM JP Postman
- Some terminology used in this explanation:
- N64 Counter: The COUNT register is the n64's COP0, this is incremented every other instruction the CPU executes 46875000/sec
- Wii Timebase: Similar to the N64 Counter, this is System Bus / 4, Or CPU Speed / 12 729000000 / 12 = 60750000
- For a bit more information on how the postman calculates the time, see https://pastebin.com/WDhtFM3K
- Wii VC will emulate the N64's counter register as close as it can based off it's own timebase.
- The way VC emulates the N64's counter is:
- int64 previousTimebase
- int64 timebaseNow = __builtin_ppc_get_timebase();
- int64 numTimbebaseTicks = previousTimebase - timebaseNow + numTimbebaseTicks
- int64 n64Counter = numTimbebaseTicks * 77 / 100
- previousTimebase = timebaseNow
- This effectively makes The N64 Count Clock 60750000 * 77 / 100 = 46777500. This is close the the real n64 cpu count clock of 46875000, but it is not exact.
- Taken from DeathBasket's pastebin, the calculation to get the postman's timer is
- postman_timer = (((time_now - start_time)*64)/3000)/10000 = (time_now - start_time)/468750
- Because the n64 and the wii are running at the same input frame rate, but not the same counter clocks, the integer division (time_now - start_time) and 468750 will cause VC to provide unintentional results.
- On n64 the difference between time_now and start_time should be pretty close to 468750000 (600 * 46875000), it will most likely not be this, but close enough that the postman_timer will always be 1000.
- On VC because of the slower emulated clock rate, 601.26 input frames are needed to get to 468750000
Advertisement
Add Comment
Please, Sign In to add comment