RNG

From Final Fantasy Hacktics
Jump to: navigation, search

The "Random" Number Generator

RNG Location in ram: 0xA0009010

How to call the RNG routine: JAL 0x0002230C

r1, r2, and r3 will be overwritten in the process.

  • r3 : will become the 32bit random number based on the RNG's value.
  • r2 : will become the 16bit signed half-word based on the upper 16 bits of r3.
  • r1 : will become 0xA001000 because of the RNG word calling.