How to make a off cheat for ASM cheats

TomSwitch

Well-Known Member
OP
Member
Joined
Jan 10, 2019
Messages
1,701
Trophies
1
Age
42
XP
5,315
Country
United States
What the CheatVM does when a cheat is turned on is it periodically hacked the game memory space.
There are two kinds of hack.
1. Game memory hack which modifies a memory that the game code use.
2. Code memory hack which modifies the game code. This is also called ASM hack.

Game memory is frequently updated by the game. So when the cheat is turn off the behavior of the game will revert to normal.

Code memory is only updated when the game starts. So when the cheat is turn off the behavior of the game won't change until the game is restarted.
Because of this property ASM hack requires a off code which restore the code memory to original.

If a off code is not provided by the author of the cheats you can make one yourself.

Take for example
[code on]
040C0000 03FB406C B900111F
[code OFF]
040C0000 03FB406C BD401100

code type 0 (code that has the first digit 0) does a direct (the memory address is provided in the instruction) hack to memory.
In the example above main+0x03FB406C is the address and 0xB900111F is the content written.
To reverse the effect of the hack you just need to restore the original content.

Here is how you can use edizon se to make a cheat that restore (turn off) a single line ASM cheat:
1. Launch the game with the cheats turned off. It must be off or the original won't be available.
2. Place the cursor on the cheat and press L (toggle) if necessary to make the right panel bookmark.
3. Press + to add the cheat to bookmark.
4. Move the cursor to the bookmark just created. Edit the label(+). Press ZL+A to make this a cheat code. Now you have a off code for this ASM cheat.

For multi line cheats look at the address field of the line (second group of 8 digits, 03FB406C in the example above). Look for the smallest number. Take the line and make a single line cheat. If all the other lines have much bigger number you only need this one line. If there are some lines that has similar number you also copy those lines and make single line cheats.
Use the method in describe above to make the off cheat for each line you copied. You will need all of them for the complete restore. You can edit the cheat code with a text editor to combine them into one cheat.
 
Last edited by TomSwitch,
  • Like
Reactions: crazy_p

FAST6191

Techromancer
Editorial Team
Joined
Nov 21, 2005
Messages
34,318
Trophies
2
Website
trastindustries.com
XP
23,399
Country
United Kingdom
I am not sure I favour ASM cheats as a term here, and not particularly sure I have seen in too many places before*. 99% of the time I imagine you will be altering opcodes but there is enough data buried in binaries that is useful to edit that... it seems imprecise.
Also if being a complete pedant there is also save editing.

*whether the older and even less descriptive distinction between game genie (the ASM codes in this example) and action replay/gameshark/codebreaker/goldfinger/pelican...

Also "So when the cheat is turn off the behavior of the game will revert to normal."
Is great for a lot of things but even not going into stats hacks then infinite ammo to complete a given section might still mean I end up with 999 reserve ammo after it is done.
Mind you a reversion cheat would work in much the same way as the baseline, maybe with the creation of a store of the base level before the cheat is activated if you wanted to get fancier (though for stats that might be harder if you turn it off 3 levels later).

I should also note any unusual stats created during that time might still worm their way onto online servers if banning is a concern.
 

TomSwitch

Well-Known Member
OP
Member
Joined
Jan 10, 2019
Messages
1,701
Trophies
1
Age
42
XP
5,315
Country
United States
I am not sure I favour ASM cheats as a term here, and not particularly sure I have seen in too many places before*. 99% of the time I imagine you will be altering opcodes but there is enough data buried in binaries that is useful to edit that... it seems imprecise.
Also if being a complete pedant there is also save editing.

*whether the older and even less descriptive distinction between game genie (the ASM codes in this example) and action replay/gameshark/codebreaker/goldfinger/pelican...

Also "So when the cheat is turn off the behavior of the game will revert to normal."
Is great for a lot of things but even not going into stats hacks then infinite ammo to complete a given section might still mean I end up with 999 reserve ammo after it is done.
Mind you a reversion cheat would work in much the same way as the baseline, maybe with the creation of a store of the base level before the cheat is activated if you wanted to get fancier (though for stats that might be harder if you turn it off 3 levels later).

I should also note any unusual stats created during that time might still worm their way onto online servers if banning is a concern.
I didn't expect what I wrote here to get a scholastic examination.

ASM is what people quite often use to describe cheats that alter code. I would say I wouldn't have chosen it if I were to coin it. It is a term often used in the cheat code circle I am in and no reason to coin a new term if one already exist and kind of get the job done.

Normally things like coins you will get to keep once you hack it. Again I don't strife to be that accurate and comprehensive in describing memory hack.

The only aim for this post is to help those people who are otherwise frustrated or bewildered that ASM cheats don't behave like memory cheats.
 

Group statistics

Members:
49
Threads:
19
Messages:
47