View previous topic :: View next topic |
Author |
Message |
chase0 How do I cheat? Reputation: 0
Joined: 06 Oct 2016 Posts: 6
|
Posted: Sat Oct 08, 2016 11:40 am Post subject: [6.6] How exactly is `align` supposed to be used? |
|
|
This:
Code: | [ENABLE]
alloc(M,1024)
label(L)
M:
align #16
L:
[DISABLE]
dealloc(M) |
...bugs out: allocates the memory, but doesn't mark table's script entry as active, so it can't be deactivated.
Is this the right way to use it? Is there an example in some place that I'm missing?
|
|
Back to top |
|
|
Zanzer I post too much Reputation: 126
Joined: 09 Jun 2013 Posts: 3278
|
Posted: Sat Oct 08, 2016 11:48 am Post subject: |
|
|
Attach CE to the process first?
|
|
Back to top |
|
|
chase0 How do I cheat? Reputation: 0
Joined: 06 Oct 2016 Posts: 6
|
Posted: Sat Oct 08, 2016 11:56 am Post subject: |
|
|
Nice try. Now how about you try using that directive first.
|
|
Back to top |
|
|
Merlini Advanced Cheater Reputation: 2
Joined: 12 Jun 2016 Posts: 53
|
Posted: Sat Oct 08, 2016 12:34 pm Post subject: |
|
|
Test condition:
1 ) Open Notepad
2 ) Type StartHere
3 ) Open CE 6.6
4 ) Attach Notepad
5 ) Search String UTF-16 for StartHere
6 ) Open CE memory view at the address
7 ) Ctrl+A for auto assemble
8 ) AA code as in screenshot, replacing first address with StartHere address.
9 ) Execute
Seems like it's working exactly as it is supposed to.
I've actually been wanting for align functionality.
Thanks DB.
Description: |
|
Filesize: |
10.72 KB |
Viewed: |
9509 Time(s) |
|
|
|
Back to top |
|
|
chase0 How do I cheat? Reputation: 0
Joined: 06 Oct 2016 Posts: 6
|
Posted: Sat Oct 08, 2016 12:42 pm Post subject: |
|
|
It does work, in the sense that the alignment works (although it silently swallows specifying non-powers of 2 instead of generating an error). It just messes up table scripts, preventing them from getting marked as active.
|
|
Back to top |
|
|
Dark Byte Site Admin Reputation: 458
Joined: 09 May 2003 Posts: 25295 Location: The netherlands
|
Posted: Sat Oct 08, 2016 1:57 pm Post subject: |
|
|
if for some reason you want to align it on a non-power of 2 then sure. You can do that.
Also, align lets you specify a filler byte as 2nd parameter
e.g:
Code: |
00400500:
align 7 cc
|
will fill 00400500 to 00400505 with cc
and if you ask why, that's because 00400506=4195590 which is dividable by 7
edit: ah I see, the aa doesn't like it when it writes 0 bytes which it interprets as failure
It's fixed in this download https://github.com/cheat-engine/cheat-engine/releases/download/6.6/CheatEngine66.exe
(the main website will be updated once the mirror updates tomorrow)
_________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Like my help? Join me on Patreon so i can keep helping |
|
Back to top |
|
|
panraven Grandmaster Cheater Reputation: 55
Joined: 01 Oct 2008 Posts: 942
|
Posted: Sat Oct 08, 2016 2:53 pm Post subject: |
|
|
Dark Byte wrote: | ...
edit: ah I see, the aa doesn't like it when it writes 0 bytes which it interprets as failure
... |
hi, quote in lua AOBScan function
Code: |
alignmenttype is an integer:
0=No alignment check
1=Address must be dividable by alignmentparam
2=Address must end with alignmentparam
|
Can it be use the alignment type 2 ? may be by a special notation, eg.
Code: |
align x7 -- align to 400107,400117,etc.
align x00 -- align to 400100,400200,etc.
|
Also, mgr.inz.Player has made a registerAssembler ( http://forum.cheatengine.org/viewtopic.php?t=574426 ) include custom alignment, at that time, it has related issue that it emit full align bytes in case of zero bytes needed.
Can allow registerAssembler callback function emit zero bytes?
ADDED:
may also be use something like :
so that the padding bytes are using the set like mgr.inz.Player's .
Thank you~
_________________
- Retarded. |
|
Back to top |
|
|
Dark Byte Site Admin Reputation: 458
Joined: 09 May 2003 Posts: 25295 Location: The netherlands
|
Posted: Sat Oct 08, 2016 3:12 pm Post subject: |
|
|
Quote: |
align x7 -- align to 400107,400117,etc.
|
Code: |
align 10
db * * * * * * *
|
or if you don't mind the bytes being initialized to 0:
Code: |
align 10
resb 7 //7 is an decimal, not hex
|
Quote: |
align x00 -- align to 400100,400200,etc.
|
and the link I posted above may support 0 byte aa commands as well (untested)
_________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Like my help? Join me on Patreon so i can keep helping |
|
Back to top |
|
|
panraven Grandmaster Cheater Reputation: 55
Joined: 01 Oct 2008 Posts: 942
|
Posted: Sat Oct 08, 2016 3:35 pm Post subject: |
|
|
Thank you!
Not know resb can initialize bytes.
Someone (with decent English ) should put these tip & trick in Wiki !
bye~
_________________
- Retarded. |
|
Back to top |
|
|
chase0 How do I cheat? Reputation: 0
Joined: 06 Oct 2016 Posts: 6
|
Posted: Sun Oct 09, 2016 1:36 am Post subject: |
|
|
Dark Byte wrote: | if for some reason you want to align it on a non-power of 2 then sure. You can do that. |
No, I was just pointing out assemblers tend to treat that as an error.
Dark Byte wrote: | edit: ah I see, the aa doesn't like it when it writes 0 bytes which it interprets as failure |
Exactly, it's issue #512 on Mantis BT. And thanks.
panraven wrote: | Not know resb can initialize bytes. |
Well, to nitpick, `resb`, etc. shouldn't *initialize*, they reserve storage, leaving it *un*initialized.
|
|
Back to top |
|
|
|