the cutting room mirror

Treasure Master

This article has a talk page!
view on tcrf.net

This page contains notes for the game Treasure Master.

Second Prize Level Password Requirements#

To access the second prize level, you need a password which contains the 64-bit initial vector for the xor table generator, producing the 128-byte pseudo-random sequence to decrypt the main level handler routine.

The pseudo-random sequence is another protection feature, which performs some permutations to the initial vector each time you leave a particular area. The order you access areas makes sense: If you cheat and skip some levels, or jump straight to the end or play levels in a different order, the final permutation will be different, and the game will not be able to decrypt the secret level handler and play it.

Since the initial vector for the second prize level is not known, you can access the level only with hacking around the level index variable in RAM ($F3). Change it to any value between $14-$18 (value $19 also belongs to the second prize level, but switching to it causes the game to crash) while playing the first prize level to see at least some stages and enemies. To apply the changes, enter and leave the item screen. To refresh enemies, leave the current area. There is no proper item handling nor proper level transitions, so you can't actually play and finish it without additional hacking.

Secret Level Handler Bruteforcing#

The code for bruteforcing the initial vector can be found here. It performs all proper permutations to the initial vector and trying to decode the secret level handler. Unfortunately, bruteforcing of the first 32-bit of IV will take about 24 hours with the current algorithm, so it will take about 11 million years for the full 64-bit key.