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 


8 Byte Big Endian

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

Joined: 04 Feb 2016
Posts: 56

PostPosted: Thu Feb 04, 2016 12:58 pm    Post subject: 8 Byte Big Endian Reply with quote

Is this a thing? Because there are some addresses, such as timers, that use 8 bytes. I am currently testing one in a GameCube game in Dolphin, and there is no good way to keep track of it with the current options in Cheat Engine.
Back to top
View user's profile Send private message
Zanzer
I post too much
Reputation: 126

Joined: 09 Jun 2013
Posts: 3278

PostPosted: Thu Feb 04, 2016 3:09 pm    Post subject: Reply with quote

Update DB's custom type for an 8-byte size.
http://forum.cheatengine.org/viewtopic.php?p=5305367#5305367
Back to top
View user's profile Send private message
Zephiles
Advanced Cheater
Reputation: 0

Joined: 04 Feb 2016
Posts: 56

PostPosted: Thu Feb 04, 2016 4:10 pm    Post subject: Reply with quote

I'm not entirely sure how to do this, mainly because some of the coding changes slightly between 2 byte and 4 byte.

Last edited by Zephiles on Thu Feb 04, 2016 4:10 pm; edited 1 time in total
Back to top
View user's profile Send private message
mgr.inz.Player
I post too much
Reputation: 218

Joined: 07 Nov 2008
Posts: 4438
Location: W kraju nad Wisla. UTC+01:00

PostPosted: Thu Feb 04, 2016 4:10 pm    Post subject: Reply with quote

Are you sure this is QWord in Big Endian? Maybe it is just DWord in Big Endian.
_________________
Back to top
View user's profile Send private message MSN Messenger
Zephiles
Advanced Cheater
Reputation: 0

Joined: 04 Feb 2016
Posts: 56

PostPosted: Thu Feb 04, 2016 4:15 pm    Post subject: Reply with quote

If I understand those terms correctly, then it is definitely a QWord.
Back to top
View user's profile Send private message
mgr.inz.Player
I post too much
Reputation: 218

Joined: 07 Nov 2008
Posts: 4438
Location: W kraju nad Wisla. UTC+01:00

PostPosted: Thu Feb 04, 2016 4:25 pm    Post subject: Reply with quote

CE custom types can have any size. Unfortunately the result must be in range of 32bit unsigned integer number or 32bit single-precision floating-point.
_________________
Back to top
View user's profile Send private message MSN Messenger
Zephiles
Advanced Cheater
Reputation: 0

Joined: 04 Feb 2016
Posts: 56

PostPosted: Thu Feb 04, 2016 4:26 pm    Post subject: Reply with quote

So there's nothing I can do for this?
Back to top
View user's profile Send private message
mgr.inz.Player
I post too much
Reputation: 218

Joined: 07 Nov 2008
Posts: 4438
Location: W kraju nad Wisla. UTC+01:00

PostPosted: Thu Feb 04, 2016 4:37 pm    Post subject: Reply with quote

It is possible that those timers will have values bigger than FFFFFFFF?
If not, you can use "dword big endian".

_________________
Back to top
View user's profile Send private message MSN Messenger
Zephiles
Advanced Cheater
Reputation: 0

Joined: 04 Feb 2016
Posts: 56

PostPosted: Thu Feb 04, 2016 4:41 pm    Post subject: Reply with quote

I have already confirmed that the timer can go up to FFFFFFFFFFFFFFFF before it resets to 0.
Back to top
View user's profile Send private message
mgr.inz.Player
I post too much
Reputation: 218

Joined: 07 Nov 2008
Posts: 4438
Location: W kraju nad Wisla. UTC+01:00

PostPosted: Thu Feb 04, 2016 4:56 pm    Post subject: Reply with quote

Unfortunately, max value for custom type integer is 0xFFFFFFFF.


We could convert this QWord Big Endian to sp-fp value, like this:
0x0 - 0.0
0xFFFFFFFFFFFFFFFF - 1000.0

So you should be able to do scans. Do you want such Custom Type?

_________________
Back to top
View user's profile Send private message MSN Messenger
Zephiles
Advanced Cheater
Reputation: 0

Joined: 04 Feb 2016
Posts: 56

PostPosted: Thu Feb 04, 2016 8:15 pm    Post subject: Reply with quote

Sure, I can give it a try.
Back to top
View user's profile Send private message
mgr.inz.Player
I post too much
Reputation: 218

Joined: 07 Nov 2008
Posts: 4438
Location: W kraju nad Wisla. UTC+01:00

PostPosted: Thu Feb 04, 2016 9:06 pm    Post subject: Reply with quote

0x0000000000000001 will be 5.421010862E-17
0x0000000000000002 will be 1.084202172E-16
0x8000000000000000 will be 500
0xF000000000000000 will be 937.5
0xFF00000000000000 will be 996.09375
0xFFFFFFFFFFFFFFFF will be 1000.0

Note:
0xFFFFFF0000000000 will be 999.999939




Custom Type AA:
Code:
alloc(ConvertRoutine,1024)
alloc(TypeName,256)
alloc(ByteSize,4)
alloc(data,16)
label(data1)
label(data2)
alloc(UsesFloat,1)

TypeName:
db 'toFloat(QWord Big Endian)',0

ByteSize:
dd 8

data1:
dq ffffffffffffffff

data2:
dd 5F800000

data3:
dd (float)1000.0

UsesFloat:
db 1

ConvertRoutine:
[64-bit]
lea rsp,[rsp-8]

mov rax,[rcx]
bswap rax
mov [rsp],rax

bt [rsp+4],1F
fild qword ptr [rsp]     // dividend
jae @f
fadd [data2]
@@:
bt [data1+4],1F
fild qword ptr [data1] // divisor
jae @f
fadd [data2]
@@:

fdivp
fmul [data3]
fstp [rsp]
mov eax,[rsp]

lea rsp,[rsp+8]
ret
[/64-bit]

_________________
Back to top
View user's profile Send private message MSN Messenger
Arikado-G
How do I cheat?
Reputation: 0

Joined: 16 Mar 2021
Posts: 3

PostPosted: Thu Jun 15, 2023 10:27 pm    Post subject: Reply with quote

mgr.inz.Player wrote:
0x0000000000000001 will be 5.421010862E-17
0x0000000000000002 will be 1.084202172E-16
0x8000000000000000 will be 500
0xF000000000000000 will be 937.5
0xFF00000000000000 will be 996.09375
0xFFFFFFFFFFFFFFFF will be 1000.0

Note:
0xFFFFFF0000000000 will be 999.999939




Custom Type AA:
Code:
alloc(ConvertRoutine,1024)
alloc(TypeName,256)
alloc(ByteSize,4)
alloc(data,16)
label(data1)
label(data2)
alloc(UsesFloat,1)

TypeName:
db 'toFloat(QWord Big Endian)',0

ByteSize:
dd 8

data1:
dq ffffffffffffffff

data2:
dd 5F800000

data3:
dd (float)1000.0

UsesFloat:
db 1

ConvertRoutine:
[64-bit]
lea rsp,[rsp-8]

mov rax,[rcx]
bswap rax
mov [rsp],rax

bt [rsp+4],1F
fild qword ptr [rsp]     // dividend
jae @f
fadd [data2]
@@:
bt [data1+4],1F
fild qword ptr [data1] // divisor
jae @f
fadd [data2]
@@:

fdivp
fmul [data3]
fstp [rsp]
mov eax,[rsp]

lea rsp,[rsp+8]
ret
[/64-bit]


Hi, how about non-Float QWord Big Endian? Thx
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