iirc the console version relied on codes printed in gaming magazines. With the Amiga version it was easy really. You would start a game with say 5 lives. Freeze then type a command into the AR that said how many memory locations hold the value of 5. You would probably get a list of about 40,000 locations. you then un-freeze, lose a life and then re-freeze. You enter another command that says out of the 40,000 locations, how many have changed from 5 to 4. This would usually narrow it down to a couple of hundred. you just kept going like this and would usually find it within 3 or 4 steps. then you either lock it or set it to whatever you want as often as you want. You could use it for anythng. lives, ammo, score, money.
I remember cheating with the score on Jimmy Whites Wirlwind Snooker. The summary for the game was "mame beats jimmy with a
suspiciously good 2000 to 147"

which is possible via fouls if you think about it