chant How do I cheat?
Reputation: 0
Joined: 28 Jan 2007 Posts: 1
|
Posted: Sun Jan 28, 2007 4:54 pm Post subject: Problem with an auto assembler script in a trainer |
|
|
I'm having problems getting an auto assembler script to work in a trainer. It works fine in my cheat table, but when I've created a trainer with it, activating the option does nothing. Checking the game with CE's memory viewer shows that the code was not injected. Here's the script:
| Code: |
[ENABLE]
alloc(newmem,2048) //2kb should be enough
label(returnhere)
label(originalcode)
label(exit)
angband.exe+65DAFB56:
jmp newmem
nop
nop
nop
nop
nop
returnhere:
newmem: //this is allocated memory, you have read,write,execute access
//place your code here
mov edx,eax
originalcode:
mov [esi+ebx],edx
or byte ptr [ecx+0000014c],10
exit:
jmp returnhere
[DISABLE]
dealloc(newmem)
angband.exe+65DAFB56:
mov [esi+ebx],edx
or byte ptr [ecx+0000014c],10
|
I can't imagine it's a configuration error, as I can't change any options when adding the script to the trainer. Just to be sure CE wasn't damaged or something, I downloaded the table from DarkByte's pinball trainer tutorial and made a trainer with it. That trainer worked, although oddly, the code browser didn't show the code being updated for it, either.
Originally I had the addresses listed directly, i.e. "angband.exe+65DAFB56" was "661AFB56" as the address never seemed to change, but that wasn't working so I changed it to the format DarkByte used, not that it helped.
Can anybody spot an obvious problem with the code? Again, it works great in the CE table as a toggleable option; it just doesn't work in the trainer. Is there some special way to add AA scripts to trainers? I just clicked "Add Entry"->Address Tab "Add"->Selected my AA script from the list, which switched the options to "Only freeze/unfreeze the address" and "Normal Freeze" and greyed everything else out. It added my script with an x under "Frozen". That is how it's supposed to be done, right?
Another question: is there a way to add basic assembly changes to a trainer? I wouldn't need the auto assembler script if I could just change the line above this code from "je 661fb68" to "jle 661fb68". I know I could set up two entries in a trainer and use them to change the value, but I'd prefer to have a single key that toggles the change.
|
|