View previous topic :: View next topic |
Author |
Message |
deadfraggle How do I cheat?
Reputation: 0
Joined: 03 Oct 2014 Posts: 3
|
Posted: Fri Oct 03, 2014 4:31 pm Post subject: Values are sometimes stored as multiples of 256? |
|
|
Hello everyone! I registered an account here because I'm curious as to why values are sometimes stored as multiples of 256 and thought you guys would know. I found this result while looking for memory addresses for a game in Dosbox, and again for a game in the Amiga emulator WinUAE. Both games were from the mid 80s. Are the values stored like this because the games are running in emulators, some programming limitation they had back then, or something else? It seems rather inefficient to use a byte of space for a single digit increment in value.
|
|
Back to top |
|
 |
Dark Byte Site Admin
Reputation: 470
Joined: 09 May 2003 Posts: 25805 Location: The netherlands
|
Posted: Fri Oct 03, 2014 4:50 pm Post subject: |
|
|
if it's a dos game, scan using the 1 byte type, or 2 byte but then turn off fast scan
for amiga you may want to look for the big endian custom type posted somewhere, or also just use 1 byte scans
explanation for dos:
the value 10: (0a)
in memory it's stored as 00 0a 00 00 00
let's look at each address in this byte array( using a 2 byte value)
0=00 0a = 0x0a00 = 2560
1=0a 00 = 0x000a = 10
2=00 00 = 0x0000 = 0
with ce you'd probably have found 0, while the address you'd need is address 1
for big endian: memory stored as: 00 00 0a 00 00
0=00 00 = 0x0000=0
1=00 0a = 0x000a = 10
2=0a 00 = 0x0a00 = 2560
in this case ce would find address 2, while you'd need 1.
_________________
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 |
|
 |
deadfraggle How do I cheat?
Reputation: 0
Joined: 03 Oct 2014 Posts: 3
|
Posted: Fri Oct 03, 2014 7:32 pm Post subject: |
|
|
So it's a platform thing. Thanks for the explanation, though I still don't quite understand why dos or amiga stored values in this manner. In one dos game, there was another address that ticked off counts of 32768, seemly unconnected to the first because I could not find it using every length of byte search. I only found it by knowing when the 'roll over' counting byte would change. It's just weird compared to what I've seen before.
|
|
Back to top |
|
 |
Dark Byte Site Admin
Reputation: 470
Joined: 09 May 2003 Posts: 25805 Location: The netherlands
|
Posted: Fri Oct 03, 2014 7:37 pm Post subject: |
|
|
it's not a platform thing, and they do not multiply it by 256
look at the example I gave. the value 10 shows up as 2560 because you are looking at the wrong address
32768 is something like 00 80 00
_________________
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 |
|
 |
deadfraggle How do I cheat?
Reputation: 0
Joined: 03 Oct 2014 Posts: 3
|
Posted: Sat Oct 04, 2014 2:16 pm Post subject: |
|
|
Ah. I should have done a single byte search instead of 2 byte. I love how easy CE makes it to edit my existing records and shift the addresses over. It even gives previews of the value at the new address.
The other value I was having trouble with seemed to be a signed integer because it would change to 0 when +1 was added to 32768 (experience points) in-game. Any addition to 32768 in CE caused a negative value in-game.
|
|
Back to top |
|
 |
|