Retro gaming (and retro cheating) with The four crystals of Trazere

One of my favourite games during my teenage years was “The four crystals of Trazere” (aka “Legend”), a classic RPG by Mindscape Inc. Every now and then I like to setup some DOS emulator and waste my time playing this great game full of puzzles, tricks, magic and epicness. The problem is that, growing older, I’ve got much less free time than during my teenage years but, on the other hand, I’ve go a little bit more experience by my side… so, years ago, I decided to speed up the hardest part of the game using some self-made cheat/crack. Straight to the point: the hardest (and longest) part of the game consists in collecting “gold” to buy things such as runes, potions, weapons, health and even resurrection, hence I tried to crack the game so that I could rely on an infinte/maximum amount of gold.
When you start a new game you have “100 gold” for each of the four characters, for a total of “400 gold”; furthermore, anytime during the game, you can move all your gold to one of the characters and/or share it again in equal parts among the four characters.

So I thought to myself: what if I…

What you need:

Step 1 – Start and save a new game

Start a new game, move to the “Treyhadwyl” Castle where you can control your characters. Notice that each character has his own 100 pieces of gold:

Now move to the “inventory” page and save your game:

You can save up to 10 games using 10 different “slots” 0, 1, 2, 3, etc. Each slot corresponds to a file named LEGENDXX.SAV in your installation directory, where “XX” is the number of the slot.

Step 2 – Move all the gold and save a new game

Now go back to Treyhadwyl and move all the gold to your current character:

Once again save your game using a different slot/file.

Step 3 – Compare the 2 saved game with HxD

Start you hex editor and compare the 2 files. I used HxD as it’s portable and has a useful “File-compare” function:

Just at a first glance we can guess where the infos about gold are stored:

On the left: the first saved game where each character has 100 pieces of gold.
On the right: the second saved game where only the first character has 400 pieces of gold.
You can easily see that the offsets 46, C6, 146 and 1C6 of the first file have an hex value of “64”, which is “100” decimal (so we guess these are 100 pieces of gold).
On the second file the offsets C6, 146 and 1C6 are set to “00” (no gold), while the offset 46 is set to “90” hex which is “144” decimal: so we have a value of 144 but the game says we have 400 pieces of gold, where is the trick?
The answer is quite easy: on the second file at offset 47 you can see the hex value of “01”, so if you read the values of the offsets 46 and 47 from right to left you’ll get “01” and “90” hex, which is 400 in decimal.

Now we know the right offsets for each character:

Now that we know where and how the infos about gold are stored, we only need to modify the saved game. In my case I set to “FF” the first 3 offsets of each character like this:

I left the lasts offsets (49 – C9 – 149 – 1C9) to zero because the game seems unable to handle such amounts of gold. Anyway, setting “FF FF FF” you’ll have 16777215 pieces of gold for each character:

In the end, if you’re too lazy to follow all the steps above, then simply download this saved game and start to play with your bags full of gold.

Aren’t you impressed yet?
Well then take a look at this unformatted text file that will make your eyes bleed, which is a step by step guide to play the whole game, solve all the puzzles and never get stuck again.