adahwa.blogg.se

Wii n64 emulator
Wii n64 emulator













Once it passes y=-2048, the platform halves in rising speed: ~6.5403 units/h. So doing the math, 127/128*1/4096units*30frames*60seconds*60minutes, we get that the platform drifts by ~13.0806 units/h. This is known as Wii VC platform drift.įrom its starting position of y=-3065 until it reaches y=-2048, this platform rises 254 times by 1/4096th of a unit for each 256 frame cycle, 127 times as it goes up, 127 times as it goes down (at the peak and bottom of the oscillation cycle, the platform stays still so no rounding occurs). On the Wii VC, however, the error always accumulates in the same direction (upward if the platform is below y = 0, and downward if the platform is above y = 0), and so the platform slowly drifts in the vertical direction. Even though each double to single conversion produces a small amount of error, this error balances out over the course of the platform's cycle. Using the N64's rounding mode, the y variable, which represents the platform's height, will repeatedly return to its original value and continue oscillating with fixed maximum height. The example given above is taken from the code controlling the oscillation of the platforms at the beginning of Bowser in the Fire Sea. For this reason, TASes produced for one of these platforms cannot generally be played back on the other without desync.

wii n64 emulator

Examples such as this one arise in many places in the game's source code, and over time they result in large discrepancies between the N64 and Wii VC versions of the game. This causes the expression to evaluate to a double, which is then converted to a float before being stored in y. However, in C, the numeric literal 0.58 is a double since it lacks a trailing f, as in 0.58f. In the above code sample, y and sins(t) are both single precision floats.















Wii n64 emulator