 |
Cheat Engine The Official Site of Cheat Engine
|
| View previous topic :: View next topic |
| Author |
Message |
StarfireTBT Advanced Cheater
Reputation: 1
Joined: 15 Aug 2015 Posts: 66
|
Posted: Wed Jul 01, 2026 3:54 pm Post subject: One byte endian |
|
|
Can someone create a 1 byte big endian feature? I'm using retroarch to emulate windows 98 in Dosbox pure and the only value type it reads is one byte.
I know 2 byte endian works for dosbox pure emulating dos games but if I was to emulate windows 98 it doesn't.
I do know 1 byte does work because it works for values under 255 and for values over 255 cheat engine will read a different number under 255.
For example, If I search for 105,000 cheat engine will show the number 40 but if I change it to 5,000 I get the number 136. Cheat engine finds the correct address because if I keep changing it from one number to the other it keeps giving a consistent 40 and 136.
If I check the active box to freeze it, the number changes to 4,959 or 104,959. If I try to change it the number in cheat engine changes but not in game. So instead of cheat engine reading 40 and 136 I might get 255 and 95.
I know cheat engine found something because I can keep going back and forth, changing the number and cheat engine will remain consistent.
|
|
| Back to top |
|
 |
ParkourPenguin I post too much
Reputation: 155
Joined: 06 Jul 2014 Posts: 4773
|
Posted: Wed Jul 01, 2026 4:23 pm Post subject: |
|
|
Endianness only applies to values that take up more than 1 byte.
Enable the big endian custom types somewhere in Edit -> Settings and use those.
_________________
I don't know where I'm going, but I'll figure it out when I get there. |
|
| Back to top |
|
 |
Dark Byte Site Admin
Reputation: 474
Joined: 09 May 2003 Posts: 25972 Location: The netherlands
|
Posted: Thu Jul 02, 2026 2:13 am Post subject: |
|
|
maybe use 2 or 4 byte little endian and disable fast scan (maybe it's a 3 byte value)
_________________
Tools give you results. Knowledge gives you control.
Like my help? Join me on Patreon so i can keep helping |
|
| Back to top |
|
 |
StarfireTBT Advanced Cheater
Reputation: 1
Joined: 15 Aug 2015 Posts: 66
|
Posted: Fri Jul 03, 2026 8:07 am Post subject: |
|
|
<>
I think you might be on to something, but when I ctrl+alt+a and enter the script I get this error message...
Lua error in the script at line 1:[strink "local syntaxcheck,memrec=...
..."]:3: attempt to call a nil value (global 'get CustomTypeManager')
|
|
| Back to top |
|
 |
Dark Byte Site Admin
Reputation: 474
Joined: 09 May 2003 Posts: 25972 Location: The netherlands
|
Posted: Sun Jul 12, 2026 10:04 am Post subject: |
|
|
here is a 3 byte custom type for linux
| Code: |
alloc(ConvertRoutine,1024)
alloc(ConvertBackRoutine,1024)
alloc(TypeName,256)
alloc(ByteSize,4)
alloc(PREFEREDALIGNMENT,4)
alloc(CallMethod,1)
PREFEREDALIGNMENT:
dd 1
TypeName:
db '3 Byte',0
ByteSize:
dd 3
CallMethod:
db 1
ConvertRoutine:
[64-bit]
xor rax,rax
mov ax,[rdi+1]
shl eax,8
mov al,[rdi]
ret
[/64-bit]
ConvertBackRoutine:
[64-bit]
and edi,ffffff
mov [rdx],di
shr edi,10
mov [rdx+2],dil
ret
[/64-bit]
|
and windows 64 bit:
| Code: |
alloc(ConvertRoutine,1024)
alloc(ConvertBackRoutine,1024)
alloc(TypeName,256)
alloc(ByteSize,4)
alloc(PREFEREDALIGNMENT,4)
alloc(CallMethod,1)
PREFEREDALIGNMENT:
dd 1
TypeName:
db '3 Byte',0
ByteSize:
dd 3
CallMethod:
db 1
ConvertRoutine:
[64-bit]
xor rax,rax
mov ax,[rcx+1]
shl eax,8
mov al,[rcx]
ret
[/64-bit]
ConvertBackRoutine:
[64-bit]
mov eax,ecx
and eax,ffffff
mov [r8],ax
shr eax,10
mov [r8+2],al
ret
[/64-bit]
|
_________________
Tools give you results. Knowledge gives you control.
Like my help? Join me on Patreon so i can keep helping |
|
| Back to top |
|
 |
|
|
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
|
|