• Login
  • Register
  • Dolphin Forums
  • Home
  • FAQ
  • Download
  • Wiki
  • Code


Dolphin, the GameCube and Wii emulator - Forums › Dolphin Emulator Discussion and Support › Development Discussion v
« Previous 1 ... 19 20 21 22 23 ... 116 Next »

Custom input display [looking for memory address]
View New Posts | View Today's Posts

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Thread Modes
Custom input display [looking for memory address]
12-19-2017, 10:33 PM (This post was last modified: 12-19-2017, 10:46 PM by fudgepop01.)
#1
fudgepop01 Offline
Junior Member
**
Posts: 8
Threads: 4
Joined: Dec 2016
Hi!  Big Grin

I'm looking to build a custom input display for dolphin emulator. I've gotten various node packages to assist me, including one that allows me to read and edit memory addresses of any application. Because of this, I'm wondering if there is a particular memory address in dolphin that updates every frame that I can use to ensure that the input display updates perfectly in-sync with the emulation.

...is there? that would be outstanding, for if so - I could integrate special tools into the display that allows for training regimes in games like Super Smash Bros. Melee and Brawl/ProjectM. I've been searching for one with cheat-engine + dolphin's debug mode, but haven't been able to find anything in particular (other than one that updates every frame ONLY when I use the frame by frame feature in Dolphin's debug mode), so I'm wondering if anyone else has had any better luck.
Find
Reply
12-20-2017, 05:28 AM
#2
leolam Offline
Developer
**********
Developers (Some Administrators and Super Moderators)
Posts: 1,478
Threads: 5
Joined: Sep 2015
Watching hardcoded addresses in Dolphin memory sounds really gross... especially since (1) you'll have a hard time figuring out where the data you want is located in memory, and (2) it will likely change every time Dolphin is recompiled.

As there currently isn't any API to interact with Dolphin, a possible way you could do this (which would still be hacky, but less fragile) would be to edit Dolphin's source code to export any information you are interested in and access it from an external program properly.
Website Find
Reply
12-21-2017, 01:19 AM
#3
Neui Offline
Quiet
***
Posts: 174
Threads: 1
Joined: Apr 2015
(12-20-2017, 05:28 AM)leolam Wrote: As there currently isn't any API to interact with Dolphin, a possible way you could do this (which would still be hacky, but less fragile) would be to edit Dolphin's source code to export any information you are interested in and access it from an external program properly.

The wiki describes a way to send GC controller input to the emulator via a FIFO (not available on Windows). The example bot linked in the wiki also has a way to watch memory addresses from also a FIFO that dolphin apparently also supports but I couldn't find it anywhere documented on the wiki (but it seems there is code for it).
Find
Reply
12-21-2017, 01:40 AM (This post was last modified: 12-21-2017, 01:40 AM by leolam.)
#4
leolam Offline
Developer
**********
Developers (Some Administrators and Super Moderators)
Posts: 1,478
Threads: 5
Joined: Sep 2015
Yeah, there is pipe input and MemoryWatcher (both unavailable on Windows). Though they are technically APIs (I guess...), I didn't mention them because they're not relevant, as they're definitely not the kind of API the OP wants (scripting API).
Website Find
Reply
12-23-2017, 10:13 PM (This post was last modified: 12-23-2017, 10:14 PM by fudgepop01.)
#5
fudgepop01 Offline
Junior Member
**
Posts: 8
Threads: 4
Joined: Dec 2016
Hmm... well, let me say exactly what I'm looking for:

In-short: I'm looking for a way to share the data from the USB port. I've created my own code in nodejs with the node-usb package to read and display inputs (https://i.redd.it/93ouxj022h401.jpg), but I have little idea how to read the data in my app while allowing Dolphin to read the inputs as well aside from looking at memory addresses. This is due to how claiming ports work in libusb as far as I'm aware, where only one application can claim an interface and read the data at a time.

My end-goal is this: https://www.reddit.com/r/SSBPM/comments/7kdfl9/so_ive_gotten_back_into_programming/drdm2di/

I'm trying to make this thing as accessible as possible too - so I hope to make it work on both Mac AND Windows (hence why I can't use the input streaming features that exist in Dolphin natively). If I can do that without creating a mod for Dolphin in C++, that would be fantastic, though I know that also further complicates things. I'm certainly willing to try though if it's absolutely necessary.

I know that there was something awhile back called padpyght that I THINK was able to do this, but that's written in python so I'm not sure how relevant it is.

If anyone can offer some guidance or assistance, that would be extremely appreciated :o
Find
Reply
12-23-2017, 11:26 PM (This post was last modified: 12-23-2017, 11:29 PM by leolam.)
#6
leolam Offline
Developer
**********
Developers (Some Administrators and Super Moderators)
Posts: 1,478
Threads: 5
Joined: Sep 2015
In my opinion, you won't have a lot of fun trying to figure out where the data is located in Dolphin's private memory.

If you really want to try it, then use the s_InputDisplay symbol from Movie.cpp to find where the input string is -- it's a std::string[8], so you will also have to figure out how to access the underlying data of the std::string class.

You could also find the location of the "pad state" structure you're interested in.

I'd modify Dolphin instead to write the input data to a pipe or something like that. No idea about Windows.
Website Find
Reply
« Next Oldest | Next Newest »


  • View a Printable Version
  • Subscribe to this thread
Forum Jump:


Users browsing this thread: 1 Guest(s)



Powered By MyBB | Theme by Fragma

Linear Mode
Threaded Mode