| View previous topic :: View next topic |
| Author |
Message |
Rhagic Advanced Cheater
Reputation: 4
Joined: 23 Aug 2011 Posts: 94
|
Posted: Mon Feb 06, 2012 4:01 pm Post subject: Sub structures in Dissector? |
|
|
I'm using the dissector with great success to map out the unit structures in a game.
The unit inventory is 4 2-byte words. I can define this separately, and assign an offset in the Character structure to be a "InventoryItem", but it doesn't display in a meaningful way in the Character Structure, just 4 bytes hex.
I am I doing something wrong? Or is it not supposed to be able to expand the substructure items?
Many thanks
|
|
| Back to top |
|
 |
Dark Byte Site Admin
Reputation: 474
Joined: 09 May 2003 Posts: 25956 Location: The netherlands
|
Posted: Mon Feb 06, 2012 4:27 pm Post subject: |
|
|
Not really sure what you mean with substructures or what you're doing.
If you want 4 2 byte words you just add 4 times a 2 byte element at the required offset
Only if it is a pointer you can expand it
_________________
Tools give you results. Knowledge gives you control.
Like my help? Join me on Patreon so i can keep helping |
|
| Back to top |
|
 |
Rhagic Advanced Cheater
Reputation: 4
Joined: 23 Aug 2011 Posts: 94
|
Posted: Mon Feb 06, 2012 5:12 pm Post subject: |
|
|
I guess to rephrase my question...
In the structure dissector, under "Change Element", there's a drop down box that you define what the element should be, e.g. 2 Bytes, 2 Bytes Signed, etc.
At the end of this drop down box there are the named structures that you've defined.
What can you use these for?
|
|
| Back to top |
|
 |
Dark Byte Site Admin
Reputation: 474
Joined: 09 May 2003 Posts: 25956 Location: The netherlands
|
Posted: Mon Feb 06, 2012 5:21 pm Post subject: |
|
|
It should paste in the contents of the structure at the new position. so if the structre you've selected exist out of 2 byte elements, it 'should' add them there. But it might not be working. (and that function is gone for next ce version)
_________________
Tools give you results. Knowledge gives you control.
Like my help? Join me on Patreon so i can keep helping |
|
| Back to top |
|
 |
Rhagic Advanced Cheater
Reputation: 4
Joined: 23 Aug 2011 Posts: 94
|
Posted: Mon Feb 06, 2012 5:34 pm Post subject: |
|
|
Ah, interesting thank you. It doesn't seem to be working for me.
Is there somewhere you prefer bug submissions?
I think I came across a bug in the auto-assemble, I was trying to make an array of character pointers using:
mov [cArray+4*index], pointer
But it was only adding index to cArray, not doing the multiplication. I was able to achieve my desired result by doing a mul "manually".
|
|
| Back to top |
|
 |
Dark Byte Site Admin
Reputation: 474
Joined: 09 May 2003 Posts: 25956 Location: The netherlands
|
Posted: Mon Feb 06, 2012 5:59 pm Post subject: |
|
|
bugreports can be posted here: http://cheatengine.org/mantis/view_all_bug_page.php so I don't forget about them
also "mov [cArray+4*index], pointer" is invalid if you did it just like that
[cArray+4*index] : index MUST be a register. It may never be a value or address. And if it then doesn't do the multiplication there's something wrong with your cpu... (and if you just wanted the address, look up lea)
also:
| Code: |
alloc(cArray,8)
alloc(index,4)
alloc(pointer,4)
00400500:
mov [cArray+4*index], pointer
|
Will generate :"mov [00AA0020],0022000C"
when:
cArray=00220000
index=00220008
pointer=0022000C
00220000+4*00220008 =00220000+00880020 =00aa0020 (which seems to be correct)
_________________
Tools give you results. Knowledge gives you control.
Like my help? Join me on Patreon so i can keep helping |
|
| Back to top |
|
 |
|