Ogre Battle: MotBQ – RNG Research

I recently started doing deep dives into all versions of the games, initially focusing on differences, but my goal is to gain a complete understanding of RNG across all versions.

Currently I’m working on: Mapping initial Tarot RNG

DONE – Preliminary search for time counters.
DONE – Found Tarot locations in Memory for ALL versions.
DONE – Find Leader Name Memory locations.
NEXT – Scripting a bot to play through and find all possible card sets per version.

I’ll update this with information as I confirm more. For now, the high level stuff is:

SNES USA and JPN

Both versions use a 256 counter for initial card RNG. @Dragondarch ‘s RNG manipulations for the name “!” will work well on all original versions of SNES. The documented card sets may be off by a single digit compared to hardware perhaps due to recent accuracy improvements in emulation or issues with the BSNES core in recent bizhawk versions that make replicating accurate to hardware results impossible, but in practice it doesn’t change how anything works. I’ll probably need to test with save states on real hardware to figure what the discrepancy really is with the SD2SNES, assuming I can get save states working on my older model.

Time Counter stored at WRAM:
0x51

Tarot Cards stored at WRAM:
0xDBE – 0xDCC

Leader name stored at WRAM:
0x7A4 – 0x7AB
0x87B – 0x882

Nintendo Power Kiosk version

Nintendo Power SNES ROM uses a 256 counter for initial card RNG but has a vastly different algorithm that seems very similar to the PSX version. Current Manipulations for “!” do not work. 0x52 is a secondary time counter that resets to 0 once it gets to FF (255). Not quite PSX, but close. Hopefully scripting the card RNG will illuminate just how close it is.

Time Counter stored at WRAM:
0x51

Secondary Time Counter stored at WRAM:
0x52

Tarot Cards stored at WRAM:
0xDBE – 0xDCC

Leader name stored at WRAM:
0x7A4 – 0x7AB
0x87B – 0x882

PS1

Seem to have RNG based on program start – there is a main counter that counts up indefinitely and initial card RNG seems entirely based on it. That appears to be a full 32bit counter and does reset to 0 once it reaches the limit. There are semi frequent areas of lag frames on PS1. This essentially means that there are small 2 to 4 frame windows where it’s very likely you will get a specific set of cards, but the card sets are based solely on the timer and algorithm and the periods of lag being inconsistent can make things tricky. There is also a 0 to 64 counter I’m aware of that doesn’t seem involved in card RNG, but may have a role in other types of RNG.

Tarot Cards stored at PSX MainRAM:
1C6B85 – 1C6B93

Leader name stored at PSX MainRAM:
1C6C14 – 1C6C1B

Time Counters stored at PSX MainRAM:
00E20C
13C910
13C8FC
135104
14188C

Unknow why there’s so many on slightly different offsets/starting positions.

Saturn

Seems to have RNG based on program start – there is a main counter that counts up indefinitely and initial card RNG seems entirely based on it. That appears to be a full 32bit counter and could take over a year to figure out if there’s any interesting effects if it maxes out. Tarot cards are stored odd/even in the address range – only version that does this.

Time Counter stored at SAT work ram high:
0F9670

Secondary Time Counter stored at SAT work ram high:
0F9671

Another time counter (Realtime) stored at SAT work ram high:
0C63F8

Tarot Cards stored at SAT work ram high:
0CD46C – 0CD479

Slot 01 = 0CD46D
Slot 02 = 0CD46C
Slot 03 = 0CD46F
Slot 04 = 0CD46E
Slot 05 = 0CD471
Slot 06 = 0CD470
Slot 07 = 0CD473
Slot 08 = 0CD472
Slot 09 = 0CD475
Slot 10 = 0CD474
Slot 11 = 0CD477
Slot 12 = 0CD476
Slot 13 = 0CD479
Slot 14 = 0CD478

No idea why Saturn does this. Cards are reordered shortly after final pick too.

Leader Name stored at SAT work ram high:
0F9674 – 0F967B

Same odd/even storage pattern.