View previous topic :: View next topic |
Author |
Message |
Zephiles Advanced Cheater Reputation: 0
Joined: 04 Feb 2016 Posts: 56
|
Posted: Thu Feb 04, 2016 12:58 pm Post subject: 8 Byte Big Endian |
|
|
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 |
|
|
Zanzer I post too much Reputation: 126
Joined: 09 Jun 2013 Posts: 3278
|
|
Back to top |
|
|
Zephiles Advanced Cheater Reputation: 0
Joined: 04 Feb 2016 Posts: 56
|
Posted: Thu Feb 04, 2016 4:10 pm Post subject: |
|
|
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 |
|
|
mgr.inz.Player I post too much Reputation: 218
Joined: 07 Nov 2008 Posts: 4438 Location: W kraju nad Wisla. UTC+01:00
|
Posted: Thu Feb 04, 2016 4:10 pm Post subject: |
|
|
Are you sure this is QWord in Big Endian? Maybe it is just DWord in Big Endian.
_________________
|
|
Back to top |
|
|
Zephiles Advanced Cheater Reputation: 0
Joined: 04 Feb 2016 Posts: 56
|
Posted: Thu Feb 04, 2016 4:15 pm Post subject: |
|
|
If I understand those terms correctly, then it is definitely a QWord.
|
|
Back to top |
|
|
mgr.inz.Player I post too much Reputation: 218
Joined: 07 Nov 2008 Posts: 4438 Location: W kraju nad Wisla. UTC+01:00
|
Posted: Thu Feb 04, 2016 4:25 pm Post subject: |
|
|
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 |
|
|
Zephiles Advanced Cheater Reputation: 0
Joined: 04 Feb 2016 Posts: 56
|
Posted: Thu Feb 04, 2016 4:26 pm Post subject: |
|
|
So there's nothing I can do for this?
|
|
Back to top |
|
|
mgr.inz.Player I post too much Reputation: 218
Joined: 07 Nov 2008 Posts: 4438 Location: W kraju nad Wisla. UTC+01:00
|
Posted: Thu Feb 04, 2016 4:37 pm Post subject: |
|
|
It is possible that those timers will have values bigger than FFFFFFFF?
If not, you can use "dword big endian".
_________________
|
|
Back to top |
|
|
Zephiles Advanced Cheater Reputation: 0
Joined: 04 Feb 2016 Posts: 56
|
Posted: Thu Feb 04, 2016 4:41 pm Post subject: |
|
|
I have already confirmed that the timer can go up to FFFFFFFFFFFFFFFF before it resets to 0.
|
|
Back to top |
|
|
mgr.inz.Player I post too much Reputation: 218
Joined: 07 Nov 2008 Posts: 4438 Location: W kraju nad Wisla. UTC+01:00
|
Posted: Thu Feb 04, 2016 4:56 pm Post subject: |
|
|
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 |
|
|
Zephiles Advanced Cheater Reputation: 0
Joined: 04 Feb 2016 Posts: 56
|
Posted: Thu Feb 04, 2016 8:15 pm Post subject: |
|
|
Sure, I can give it a try.
|
|
Back to top |
|
|
mgr.inz.Player I post too much Reputation: 218
Joined: 07 Nov 2008 Posts: 4438 Location: W kraju nad Wisla. UTC+01:00
|
Posted: Thu Feb 04, 2016 9:06 pm Post subject: |
|
|
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 |
|
|
Arikado-G How do I cheat? Reputation: 0
Joined: 16 Mar 2021 Posts: 3
|
Posted: Thu Jun 15, 2023 10:27 pm Post subject: |
|
|
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 |
|
|
|