This commit is contained in:
parent
caf9a2aab7
commit
8093266ec7
1 changed files with 7 additions and 5 deletions
12
rng.md
12
rng.md
|
@ -1,5 +1,10 @@
|
||||||
# info dump on the RNG in OoT and MM
|
# 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 function itself
|
||||||
|
|
||||||
the random number generator in both games is an LCG:
|
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
|
you can find the rng_value variable
|
||||||
by looking at the disassembly of the RNG function.
|
by looking at the disassembly of the RNG function.
|
||||||
note that there are a few different variations of the 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:
|
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
|
creating a new file will invoke the RNG
|
||||||
to determine the Bomber's Code, etc.
|
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,
|
although the GameCube versions don't have an N64 logo,
|
||||||
they still do similar initializations before the title screen is shown.
|
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
|
### emulators
|
||||||
|
|
||||||
as far as i know, the cycle counter in emulators
|
as far as i know, the cycle counter in emulators
|
||||||
|
|
Loading…
Add table
Reference in a new issue