Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


[Question] About allocating bytes

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine
View previous topic :: View next topic  
Author Message
Nuclear898
Grandmaster Cheater Supreme
Reputation: 0

Joined: 04 Jun 2006
Posts: 1597
Location: The Netherlands

PostPosted: Tue Jun 05, 2007 5:52 am    Post subject: [Question] About allocating bytes Reply with quote

How do you know if you should allocate bytes for a labeled handle in a script, and how do you know how many bytes you need?

help is much appreciated Very Happy
Back to top
View user's profile Send private message
brycez0rz
Grandmaster Cheater
Reputation: 1

Joined: 01 Feb 2007
Posts: 910
Location: 14/f/ca

PostPosted: Tue Jun 05, 2007 6:00 am    Post subject: Reply with quote

Don't know about the labelling thing, but allocate like 2 bytes per opcode? (I think, cause opcodes are made up of 2 hexadecimal characters, and they're worth one byte each, it works for me anyway.. o.o)
Back to top
View user's profile Send private message
Symbol
I'm a spammer
Reputation: 0

Joined: 18 Apr 2007
Posts: 5094
Location: Israel.

PostPosted: Tue Jun 05, 2007 6:10 am    Post subject: Reply with quote

pretty much that way...
but u can always allocate 2k bytes it will always be enough =D
i guess for like 2 lines u need like 4 bytes but for like pap/za vac ull need about 500 maybe less anyway as long the script is longer ull need mroe bytes...
if all u do is cmp and jmping so ull need only 4-12 bytes but u can also put 4k bytes =)
Back to top
View user's profile Send private message
brycez0rz
Grandmaster Cheater
Reputation: 1

Joined: 01 Feb 2007
Posts: 910
Location: 14/f/ca

PostPosted: Tue Jun 05, 2007 6:15 am    Post subject: Reply with quote

Symbol wrote:
pretty much that way...
but u can always allocate 2k bytes it will always be enough =D
i guess for like 2 lines u need like 4 bytes but for like pap/za vac ull need about 500 maybe less anyway as long the script is longer ull need mroe bytes...
if all u do is cmp and jmping so ull need only 4-12 bytes but u can also put 4k bytes =)


The inhumanity of allocating 4k bytes for comparing and jumping! D:
Back to top
View user's profile Send private message
Nuclear898
Grandmaster Cheater Supreme
Reputation: 0

Joined: 04 Jun 2006
Posts: 1597
Location: The Netherlands

PostPosted: Tue Jun 05, 2007 7:35 am    Post subject: Reply with quote

wouldnt that make it really slow somehow?
Back to top
View user's profile Send private message
Labyrnth
Moderator
Reputation: 10

Joined: 28 Nov 2006
Posts: 6300

PostPosted: Tue Jun 05, 2007 5:01 pm    Post subject: Reply with quote

I like using 256, that should be plenty for what you want to inject.
and you dont want to use alloc if you are going to use the script for a trainer.

If it is for AA script i would just use the defaulted alloc size , you will be good with it.
Back to top
View user's profile Send private message
sponge
I'm a spammer
Reputation: 1

Joined: 07 Nov 2006
Posts: 6009

PostPosted: Tue Jun 05, 2007 5:32 pm    Post subject: Reply with quote

wrong some mnemonics actually take up up to 6 bytes or maybe more... 2 bytes is barely enough... first allocate over and then count the bytes at the allocated area.
_________________
Back to top
View user's profile Send private message
Labyrnth
Moderator
Reputation: 10

Joined: 28 Nov 2006
Posts: 6300

PostPosted: Tue Jun 05, 2007 5:58 pm    Post subject: Reply with quote

sponge wrote:
wrong some mnemonics actually take up up to 6 bytes or maybe more... 2 bytes is barely enough... first allocate over and then count the bytes at the allocated area.


They said 2k in bytes not 2 bytes Smile
Back to top
View user's profile Send private message
sponge
I'm a spammer
Reputation: 1

Joined: 07 Nov 2006
Posts: 6009

PostPosted: Tue Jun 05, 2007 5:59 pm    Post subject: Reply with quote

Quote:
but allocate like 2 bytes per opcode?

i was talking about him.

_________________
Back to top
View user's profile Send private message
Labyrnth
Moderator
Reputation: 10

Joined: 28 Nov 2006
Posts: 6300

PostPosted: Tue Jun 05, 2007 6:43 pm    Post subject: Reply with quote

sponge wrote:
Quote:
but allocate like 2 bytes per opcode?

i was talking about him.

Roger Roger....
Back to top
View user's profile Send private message
rapion124
Grandmaster Cheater Supreme
Reputation: 0

Joined: 25 Mar 2007
Posts: 1095

PostPosted: Tue Jun 05, 2007 7:11 pm    Post subject: gg Reply with quote

Whats the diff between 200 and 20000?
Back to top
View user's profile Send private message
Labyrnth
Moderator
Reputation: 10

Joined: 28 Nov 2006
Posts: 6300

PostPosted: Tue Jun 05, 2007 7:26 pm    Post subject: Reply with quote

20000-200 = 19800 Oh i would say about that much.
Back to top
View user's profile Send private message
samuri25404
Grandmaster Cheater
Reputation: 7

Joined: 04 May 2007
Posts: 955
Location: Why do you care?

PostPosted: Thu Jun 07, 2007 8:17 am    Post subject: Reply with quote

sponge wrote:
wrong some mnemonics actually take up up to 6 bytes or maybe more... 2 bytes is barely enough... first allocate over and then count the bytes at the allocated area.


Agreed. Each command takes up a certain ammount of bytes, and as Labyrnth said, 256 should be enough for most anything.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites