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

Regarding address injection finding. #9

Open
Kalto-Mate opened this issue Jun 8, 2024 · 1 comment
Open

Regarding address injection finding. #9

Kalto-Mate opened this issue Jun 8, 2024 · 1 comment

Comments

@Kalto-Mate
Copy link

Kalto-Mate commented Jun 8, 2024

In the DIY section for other emulators it is said that to pinpoint where ToxBox should do it's magic one must write a unique value "at 0x02000000 in the NDS address space" to sniff for it in the emulated DS' memory.

The first part has me a bit confused, Should I open the game rom itself in a hex editor and plant my sniffing value at 0x02000000? If I understood correctly that location is Europe rom only, so how would I go about finding the magic position for other versions? I personally wouldn't mind learning some more and help iron out those kinks. Who knows, maybe a crowdsourced list of preconfigured addresses for emulator and rom combos could be made!

EDIT: Over at the 3ds modding realm this exists.
https://github.com/shocoman/Analog-Controls-for-NDS-Games-on-3DS
It looks like they have successfully located the addresses the game operates in when the touch screen control method is used across all versions. After some hoopla within unused memory they manage to get the 3DS extra buttons to talk to the game. Is this useful in any way?

@pants64DS
Copy link
Owner

Should I open the game rom itself in a hex editor and plant my sniffing value at 0x02000000?

The value should be at 0x02000000 in RAM, not in the ROM image. The easiest way to put it there would be using a RAM editor like the one in DeSmuME. If the emulator you're working with doesn't have that, you could use an existing string of bytes that gets loaded into RAM, but then you'd need to take into account the offset from the start of the RAM (0x02000000) to the string of bytes you used. Another option would be creating a ROM that contains code that writes a string of bytes to the start of the RAM.

If I understood correctly that location is Europe rom only, so how would I go about finding the magic position for other versions?

The starting address of the RAM in NDS address space is the same regardless of the ROM. However, ToxInput still only works with the European ROM because it only contains the necessary patches for that version.

Who knows, maybe a crowdsourced list of preconfigured addresses for emulator and rom combos could be made!

That'd be possible, but it'd also be possible to add a feature to ToxInput that searches for the address automatically.

EDIT: Over at the 3ds modding realm this exists.
https://github.com/shocoman/Analog-Controls-for-NDS-Games-on-3DS
It looks like they have successfully located the addresses the game operates in when the touch screen control method is used across all versions. After some hoopla within unused memory they manage to get the 3DS extra buttons to talk to the game. Is this useful in any way?

It might be useful for adding support for other ROM regions, but probably not for anything else.

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