Desktop HackerFoundation RISCWorld 4. Putting the cheats into action.Once you have found an address, whether it's the address of a variable like lives or an instruction in the game code, you have to alter it to actually cheat. You can alter it directly using Desktop Hacker's altering features, or build the details into a cheat module which you can save and distribute freely. Cheat modules can perform quite complicated alterations in one keypress. To alter the value of an address's contents, click Select on the address in the disassembler (in the left bit, not on the disassembled instruction). The value in the box is the contents of the address in hexadecimal; if you want to know the hex version of a decimal value, go into BASIC and type PRINT ~number, where number is the decimal version. Type the hex value and click on 'OK' to make the alteration. 4.2. Making a cheat module. To create a cheat module, you must load the CheatMod application. The editor window automatically appears. First, fill in the name of the game, your name, and any other help text that might be necessary to describe how to use the cheat. If this string is particularly large, or there are a lot of cheats in the module, set the 'Clear screen' option, so that some of the information doesn't scroll off the window when the cheat module is run. Next, fill in a check string and address. When any of the cheats in the cheat module are used, this address is checked. If it does not contain the text you type, the cheat is not activated. This protects programs other than the game from being hacked accidentally, and is a good idea to prevent them from crashing, but is not compulsory. A good way to find a check string is to search for the name of the game using Desktop Hacker's text search [3.3], then put one of the addresses into CheatMod. Now add the cheats. Each cheat is activated by holding down Alt and pressing a key. Click Menu on the editor window, and choose Add key. Put the key that activates the cheat at the top, and give the cheat a name, so that the user can see what it does. Each key may activate many effects, each of which alters one or many addresses in a fixed way. To add a new effect, click Menu on the Key editor window, and choose 'Add effect'. The Effect editor window appears. Choose whether to use bytes or words (use whatever you used when searching), type a value (selecting the hex icon to the left of the value if it is in hex), and what action to use: 'Load' simply puts the value you specify into the address(es); 'Add' and 'Subtract' increase and decrease the contents of the address(es) by the amount you specify; Or, And and Eor are bitwise logical operations, and are unlikely to be useful except for altering instructions. Then add the address or addresses, one by one, that are to be affected. Click Menu on the Effect editor window, move over the Add address item, and type the address. To see some examples of programming cheat modules, drag one from the cheat modules archive (the latest version of which is available from www.doggysoft.co.uk/cheat.html) to !CheatMod. You can also import CheatMods made by old copies of The Hacker. If you do make any CheatMods of new cheats, please send them to us to include in the collection! 4.3. Using a cheat module. Double-click on it. Note down the key combinations it tells you, and press them to activate the built-in cheats. Some old and manky games disable cheat modules by performing a *RMClear command to gain memory. You can stop them doing this by pressing F12 and entering something like: Set Alias$RMClear Set dHacker$RMClear Stopped. If the !dHacker application has been 'seen' by the filer, this is done automatically. 4.4. Altering instructions. This version of Desktop Hacker has a built-in assembler to allow you to alter instructions. Click Select on the disassembler window in the same way as for altering words, but on the right-hand side of the window where the disassembled instructions go. Alter the instruction in the window that appears and click 'OK' to make the change. Note that simply clicking 'OK' without changing the instruction may change the word at that address, because more than one word can disassemble to the same instruction. This is not a problem as long as you stick to assembling real code. The assembler is slightly more primitive than the disassembler, and does not support the new instructions introduced in the ARM3 and later. (These are rarely used under RISC OS.) Neither does it support AdrL instructions, which take up two words. But other than that it's okay really. 4.5. Altering registers. The register values shown in the 'Task stopped' window can be altered. The registers are set from this window when the game is continued. In the case of a SWI trap, the trap occurs after the SWI has been executed, so you can alter the registers returned from the SWI. It is also possible to alter the PC value to make the game continue from a completely different place. You can even change all the registers and the PC to jump to another subroutine somewhere. But be careful with the status flags in the PSR; the program could get confused if you accidentally turn the interrupt disable flags on or put the PC into supervisor mode. Foundation RISCWorld |