Calormen website provides an online Applesoft BASIC emulator, developed in javascript. You can enter or upload your code into the emulator and run it immediately, without having an emulator installed on your PC. You can also find on the website numerous examples of source code in Applesoft BASIC, such as games and graphic demos.
Among these programs, I’ ve found a text adventure game called Tays House Adventure developed by Floyd McWilliams. The aim is to find treasures while avoiding traps in the house of your obviously mad Uncle Tays. Nothing very original, but what caught my attention was the way how the BASIC program was written; all character strings are encrypted, to avoid a hacker/player inspecting the source code to crack the game. For example :
300 DATA "7UVYAO5", "2UQWVJ3", "2GCUV1", "7DLZA3", "9DY5", "5ITBS2", "6T8", "2U3", "2G9", "2Y7", "8C5", "8L8"
305 DATA "2K3", "1JOWFOUPSZ8", "1TDPSF0", "8RCUX6", "3KHOS7"
310 DATA "4XEOI3", "7KYVW9", "6RUUQ9", "3UHDG4", "9NGJVRWN9", "5ZSQTHP0", "9NJC8", "6YVOT4"
So I wrote a program in Python that decrypts all character strings and returns a BASIC program where everything is readable. The aim is to obtain an Applesoft BASIC program with no encrypted data.
Continuer la lecture de « Tays house adventure deciphered »