This commit is contained in:
Connor 2017-04-25 11:52:21 -07:00 committed by GitHub
parent caf9a2aab7
commit 8093266ec7

12
rng.md
View File

@ -1,5 +1,10 @@
# info dump on the RNG in OoT and MM
if you find any discrepancies, please
leave a comment or tweet at [@antiformant][twitter].
[twitter]: https://twitter.com/antiformant
## the function itself
the random number generator in both games is an LCG:
@ -23,7 +28,7 @@ for F35F in RAM. you should see a 660D nearby, usually a bit before.
you can find the rng_value variable
by looking at the disassembly of the RNG function.
note that there are a few different variations of the function
that are not commonly invoked. you can find these the same way.
that are not commonly invoked; you can find these the same way.
here are some known addresses:
@ -54,14 +59,11 @@ to clarify what a "new scene" being loaded is:
creating a new file will invoke the RNG
to determine the Bomber's Code, etc.
this does not apply to OoT.
obviously, this does not apply to OoT.
although the GameCube versions don't have an N64 logo,
they still do similar initializations before the title screen is shown.
i might be missing some details here, as i haven't searched exhaustively.
leave a comment or tweet at @antiformant if you know anything.
### emulators
as far as i know, the cycle counter in emulators