Under the microscope: Warhammer: Shadow of the Horned Rat (PlayStation)
Rescuing PlayStation cheat codes from 30 years of obscurity
Most cheat sites have two or three codes listed for Warhammer: Shadow of the Horned Rat. They look something like this:
Unlimited magic: At the Caravan screen, move the cursor over the candle flame. Hold Select and then press Left, Up, Right, Down, L1, R1.
That is, you’re supposed to highlight a specific item on the Caravan screen and hold Select while putting in a particular button sequence.
How do these cheats work? I checked GameHacking.org, which lists an interesting Action Replay code that refers to eight different effects:

Hmm, are there button codes for each of these? I checked the game data, and found that there are – the game has at least six cheats that have been hiding for the last 30 years.
Technical details
The game doesn’t see things like candle flames, just grid coordinates. When you’re on the Caravan screen, moving the cursor changes these values in memory:
80071994: X coordinate80071998: Y coordinate
The function at 80020d00 reads these current cursor coordinates and checks to see whether they fall into one of 13 rectangles (which are defined by the array at 80072c64). I’ve marked the central points of each rectangle here:
The function at 80037518 uses these rectangle IDs to see if you’re highlighting the correct screen element before putting in a cheat code. That function refers to an array of structs at 800732a4 that define the cheat code parameters. The structs have this format:
2 bytes: The bits to set in the cheats field.
2 bytes: The rectangle that the cursor needs to be in.
20 bytes: An array of 2 byte bit masks representing the buttons for the code. The end of the code is signaled by
0xffff, or -1.
The function has logic that looks like this pseudo-Python, which I adapted from Ghidra’s decompilation:
if not holding_select:
return
for i in range(9):
cheat_info = all_cheat_info[i]
if caravan_cursor == cheat_info.cursor_target:
target_button = cheat_info.buttons[all_cheat_counters[i]]
if pressed_button != target_button:
continue
all_cheat_counters[i] += 1
if cheat_info.buttons[all_cheat_counters[i]] == -1:
if i == 8:
gold_crowns = 5000
else:
cheat_flags ^= cheat_info.flagsThe function first checks to see whether you’re holding down the Select button. If you are, it looks through the array of cheat structs. If the cursor is inside one of the cheat’s rectangles, then the function starts looking for that cheat’s button sequence. Once it’s been fully entered, an effect gets applied.
All but one of the cheats sets bits in the field mentioned from the Action Replay code above (actually it toggles them – putting the same code in twice undoes its effect). The odd one changes how many gold crowns are in your inventory.
With this understanding, we know everything we need to get the full set of cheats.
The full set of cheats
There are nine cheats in total. Enter them on the caravan screen while holding Select with the cursor positioned in the location indicated (see the picture with the centers of the rectangles above for more precision):
Three of these effects appear on CheatCC.com, but I think the rest are new!
Outro
Thanks for reading Rings of Saturn! I’ll be back with more articles on retro game reverse engineering soon. In the meantime, check out the archive for many more explorations of antique code.

Appendix
Cheat name | Location | Sequence (Enter while holding Select) |
|-----------------------------|-----------------------|----------------------------------------------------------------|
| What’s the Big Secret? | Book of Magic (02) | Triangle, X, Square, Circle |
| No Charge | Troop Roster (01) | Start, Circle, Triangle, X, Square, Left, Right |
| Hand of GOD | Skull (0B) | Left, Left, Right, Right, Up, Square, Square, Circle, Triangle |
| Gimme the Works | Bottom-left book (0c) | Left, Left, Right, Right, Up, Square, Square, Circle, Triangle |
| …and that’s magic | Candle flame (09) | Left, Up, Right, Down, L1, R1 |
| At the Movies: | Man’s nose (0A) | Square (x9) |
| Anytime, Anyplace, Anywhere | Training Ground (06) | R1, R1, L2, L2, X |
| Me no want fight | Select Mission (07) | Up, Down, Left, Right, Triangle, Triangle, Triangle |
| 5000 Gold Crowns | The gold crowns (08) | Square, Right, Up, X, R1, L2, Circle, Left, L2 |




