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 


Can't find the X Position in Mega Man NES

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine
View previous topic :: View next topic  
Author Message
JigsawKiller
How do I cheat?
Reputation: 0

Joined: 16 Apr 2024
Posts: 3

PostPosted: Tue Apr 16, 2024 3:31 am    Post subject: Can't find the X Position in Mega Man NES Reply with quote

Hello! I have problems with finding the address of the variable that holds the x position of mega man in Mega Man NES game! I have tried to look for all types of variables but only found a float, 2 doubles and a 4 bytes value that change when my x position changes. The 4 bytes value is changing suddenly from 250 or so to around 20-40 million when I shoot or when I am hit by an enemy. These are the values that I have discovered that change when my x position changes. You can ignore the "Health" value.
If anyone can find me the X position of Mega Man, I would be very grateful. I am using the FCEUMM core for emulating mega man NES.



MegaMan-CheatEngine.png
 Description:
Photo of what I have found on Cheat Engine when searching for the X position of Mega Man
 Filesize:  103.16 KB
 Viewed:  508 Time(s)

MegaMan-CheatEngine.png


Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 459

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

PostPosted: Tue Apr 16, 2024 4:43 am    Post subject: Reply with quote

go to settings and enable 2 byte big endian

or maybe it's just a 1 byte value

_________________
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
JigsawKiller
How do I cheat?
Reputation: 0

Joined: 16 Apr 2024
Posts: 3

PostPosted: Tue Apr 16, 2024 8:01 am    Post subject: Reply with quote

The processor used for NES is little endian. Also, I looked at the memory view, and found out why the 4 bytes value is so big after I shoot.

As the image shows, the X position must be a combination made of the first byte from the CA6B00 address and another byte somewhere in this memory view. Another byte I saw was changing based on the speed, but that doesn't really help me. If you have any other suggestions, I am glad to hear them!



MemoryView-MegaMan.jpg
 Description:
This is the memory view. As you can see, the first byte is for the X position, but once it passes over the FF value, it returns 0.
 Filesize:  202.33 KB
 Viewed:  472 Time(s)

MemoryView-MegaMan.jpg


Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 459

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

PostPosted: Tue Apr 16, 2024 8:48 am    Post subject: Reply with quote

I'd say it's a 1 byte value then and the bytes after it might be timers or something for when you can shoot again ?

nes screen coordinates are 256x240, so a 1 byte value is enough for just the x coordinate.

Perhaps there's another variable that specifies what x coordinate inside the map itself

_________________
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
JigsawKiller
How do I cheat?
Reputation: 0

Joined: 16 Apr 2024
Posts: 3

PostPosted: Tue Apr 16, 2024 9:58 am    Post subject: Reply with quote

I managed to find the other byte. Apparently, the first byte that I found out was an offset, since it went only to 255 and then back to 0, but anytime I was going from 255 to 0, some other byte was increasing to 1 and vice versa when I was going back to the left. Now I can find out the x position of mega man based on those two bytes. Though it seems kind of weird to place those 2 bytes so apart in memory, but it is what it is! Thanks for the help though, Dark Byte!
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