Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save Erquint/eaadb3a55b24f377165a0e3c22225a84 to your computer and use it in GitHub Desktop.
Save Erquint/eaadb3a55b24f377165a0e3c22225a84 to your computer and use it in GitHub Desktop.

Direct RNG manipulation for D-District Prison Triple Triad rewards

Version 1.0
2017-08-29 UTC+3

Author

Tested and written by Murad "Gness Erquint" Beybalaev.
"Gnessim" on GameFAQs for some long-forgotten inexplicable reason...
[email protected]

Attribution

Creation of this guide was made possible due to GameFAQs members ForteGSOmega and Kazuhira07 dabbling into the closely adjacent topic and discovering the RNG output variable location. Reading upon their experimentation with it encouraged me to go through the hassle of testing and writing this guide.

Conditions

Testing was done on a copy of SLUS_00908 loaded into a PCSXR v1.9.94.0 emulator compiled for Windows.
https://psxdatacenter.com/games/U/F/SLUS-00892.html
I have no idea where I got the v1.9.94.0 version for Windows from, might it be a versioning error on the developer's part.
https://pcsxr.codeplex.com/
Use the Wayback Machine if the above links expire — Codeplex is shutting down in 2017.
http://web.archive.org/

Purpose

Eliminating the influence of the random number generator(RNG) on prizes won for beating the two Triple Triad players in the unrevisitable D-District Prison sequence of the game by means of constructing GameShark-compatible instructions to be executed by the device/emulator.

Instructions

The current RNG output is stored in a 4-byte(32-bit) variable at the address 8562D4 of user memory segment.
Any of the the following codes will instruct a GameShark-type engine to constantly write over that variable with the specified xx value, effectively freezing it.

Code Notes
008562D4 00xx 4-byte operation. Only supported on certain devices/emulators.
808562D4 00xx
808562D6 0000
2-byte operations. Preferred for compatibility and brevity.
308562D4 00xx
308562D5 0000
308562D6 0000
308562D7 0000
1-byte operations. Excessive but works just as well.

Substitute the xx value with one from the table to get according rewards from the respective players.

xx 500g Player on Floor 5 200g Player on Floor 11 Notes
01 Potion Potion Substitute for one-time reward.
06 Eye Drops Eye Drops
03 Remedy Remedy
08 Gysahl Greens Hi-Potion+
3C Flare Stone Holy Stone
31 Mega-Phoenix Mega-Potion
26 Phoenix Pinion Rosetta Stone
00 Luck Up HP Up One-time reward.

Disable/remove the code to make the game randomized again starting with the next RNG output — no long-lasting effects.

Example

Add and enable the following code.

808562D4 0026
808562D6 0000

Now every time you win a Triple Triad game against the 500g player in the cell on floor 5 — you'll win a Phoenix Pinion, or a Rosetta stone from the 200g player on the 11th floor.

Legal

Any use, redistribution or adaptation of this work is permitted under the terms of attribution.
All trademarks and copyrights contained in this document are owned by their respective trademark and copyright holders.
© 2017 Мурад Бейбалаев

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment