Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Finding Desired Memory Addresses #56

Open
esiddali opened this issue Jul 31, 2024 · 1 comment
Open

Finding Desired Memory Addresses #56

esiddali opened this issue Jul 31, 2024 · 1 comment

Comments

@esiddali
Copy link

Is there any functionality to help find desired memory addresses?

For example, if I were trying to graph my Mario Kart DS speed over time, how would I go about finding the actual address where your character's speed is located? According to this resource I should be able to find my speed at the address 0x217ACF8+0x2A8 as a 4 byte address, but emu_memory.unsigned[0x217ACF8+0x2A8:4] does not work.

Similarly, if I try to access memory addresses that I found using cheat engine on the regular DeSmuME emulator, or the RAM search and RAM watch tools of the regular BizHawk emulator, they do not work as I expect. It seems like I am accessing different memory entirely.

I'm rather new to reading memory, so please let me know if I have a conceptual misunderstanding. If anyone has a small example similar to what I am trying to do that they could share I would appreciate that.

My end goal is to develop some reinforcement learning models for DS games. My main needs are to efficiently read the upper and lower images of the emulator, read memory addresses, supply input to the emulator, and programmatically advance the emulator one frame at a time. If anyone knows of another library I should look at which might better suit my needs, please let me know. However, if I can just figure out how to access the right addresses, I'll finally have everything I need with just this library.

Thank you for your help!

@theCapypara
Copy link
Member

Hi!

You need to supply the start and end point for the ranges to access memory. Try this instead:

start = 0x217ACF8+0x2A8
emu_memory.unsigned[start:start + 4]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants