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 


Properly showing an int32 with big-endiannes byte order

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine
View previous topic :: View next topic  
Author Message
markheloking
Cheater
Reputation: 2

Joined: 21 Nov 2009
Posts: 35

PostPosted: Thu Jan 14, 2016 10:31 am    Post subject: Properly showing an int32 with big-endiannes byte order Reply with quote

So this game I'm currently debugging has an int32 value where the bytes are in big-endian. If I use "add address manually" to add the address to the list stating as a 4 byte type, it shows up in the reverse order.

Example:

Proper value (checken in game) and wanted notation: 6138

Byte array in memory viewer: 00 00 17 FA
4 Bytes (decimal notation): 4195811328
4 Bytes (hexadecimal notation): FA170000
Array of 4 byte (hex notation): 00 00 17 FA
Array of 4 byte (decimal notation): 0 0 23 250

[edit]
Check dark_bytes answer, it works!


Last edited by markheloking on Thu Jan 14, 2016 11:11 am; edited 2 times in total
Back to top
View user's profile Send private message
mgostIH
Expert Cheater
Reputation: 3

Joined: 01 Jan 2016
Posts: 159

PostPosted: Thu Jan 14, 2016 10:47 am    Post subject: Reply with quote

Set the type to Array of Bytes with lenght of 4.
_________________
Do you need to ask me something? Feel free to join my discord server at: https://discord.gg/At4VZXA or ask me something in my YouTube channel: https://www.youtube.com/c/mgostIH
Back to top
View user's profile Send private message
markheloking
Cheater
Reputation: 2

Joined: 21 Nov 2009
Posts: 35

PostPosted: Thu Jan 14, 2016 10:49 am    Post subject: Reply with quote

That's what I'm doing now, but I want it show the decimal value, not the hex value.

Array of 4 byte (hex notation): 00 00 17 FA
Array of 4 byte (decimal notation): 0 0 23 250
Wanted decimal notation: 6138
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 470

Joined: 09 May 2003
Posts: 25785
Location: The netherlands

PostPosted: Thu Jan 14, 2016 11:07 am    Post subject: Reply with quote

here is a custom type for big endian (2 and 4 byte)
http://forum.cheatengine.org/viewtopic.php?p=5305367#5305367

_________________
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
View user's profile Send private message MSN Messenger
markheloking
Cheater
Reputation: 2

Joined: 21 Nov 2009
Posts: 35

PostPosted: Thu Jan 14, 2016 11:11 am    Post subject: Reply with quote

Thank you, that works just as I want it to.

Sorry about the big-endian vs little-endian mixup there haha.
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