System RNG

From Final Fantasy VII Speedrun Wiki
Revision as of 06:03, 10 June 2024 by AceZephyr (talk | contribs) (1 revision imported: Import from old wiki)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

System RNG refers to the Random Number Generator provided to the game from an external source. These are analogous to each other, but have different implementations and subtle differences in use between platforms.

All implementations are a form of Linear Congruential Generator that returns an integer value uniformly distributed in the range [0, 32767], but they have different constants.

Implementations

PSX

PSX System RNG is provided by the PlayStation's BIOS. It is a Linear Congruential Generator with a multiplier of 0x41C64E6D (1103515245), an addend of 0x3039 (12345), and returns bits 30 through 16.

PC

PC System RNG is provided to the PC version of Final Fantasy VII by the compiler used to build the game. It is a Linear Congruential Generator with a multiplier of 0x343FD (214013), an addend of 0x269EC3 (2531011), and returns bits 30 through 16.

Uses

Seeding Battle RNG