RNG

From Final Fantasy Hacktics Wiki
Revision as of 20:41, 12 December 2010 by 72.12.102.3 (talk) (Created page with "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...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to 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.