Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sewer56/dolphin.memory.access
Tiny 9KB barebones library used to access the memory of Dolphin emulator on Windows.
https://github.com/sewer56/dolphin.memory.access
csharp dolphin dolphin-emu hacking modding netstandard
Last synced: 19 days ago
JSON representation
Tiny 9KB barebones library used to access the memory of Dolphin emulator on Windows.
- Host: GitHub
- URL: https://github.com/sewer56/dolphin.memory.access
- Owner: Sewer56
- License: lgpl-3.0
- Created: 2019-08-15T19:42:28.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2024-01-07T20:45:46.000Z (10 months ago)
- Last Synced: 2024-10-01T00:57:59.570Z (about 2 months ago)
- Topics: csharp, dolphin, dolphin-emu, hacking, modding, netstandard
- Language: C#
- Size: 21.5 KB
- Stars: 6
- Watchers: 3
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE.md
Awesome Lists containing this project
README
# About This Project
This project is a simple, easy to use .NET Standard library that allows you to access the memory of Dolphin emulator on Windows. I wrote this mainly for personal use.
# Usage
Simply instantiate the class `Dolphin`, passing an instance of `System.Diagnostics.Process` belonging to Dolphin emulator.
```csharp
_process = Process.GetProcessesByName("dolphin")[0];
_dolphin = new Dolphin(_process);
```Then use the API of the `Dolphin`, you can either get an address to the start of emulated memory.
```csharp
// Operation fails if no game is currently running.
if (_dolphin.TryGetBaseAddress(out IntPtr initialBaseAddress))
{
// Do things with memory.
}
```Or more conveniently, get the real address of a variable in emulated memory:
```csharp
// Operation fails if no game is currently running.
// 0x805EF958: Current stage ID in NTSC US Shadow The Hedgehog (GUPE8P)
if (_dolphin.TryGetAddress(0x805EF958, out IntPtr variableAddress))
{
// Do things with memory.
}
```PS. Just remember that emulated memory is `Big Endian` as opposed to our `Little Endian` x86/x64 chips. Consider using another library such as [Reloaded.Memory](https://github.com/Reloaded-Project/Reloaded.Memory)'s Endian class to flip the endian of variables.
# Other Notes
This tiny 9KB library is barebones and does does not handle events such as process exit for you.
It's the user's responsibility to listen to these events, otherwise you'll run into exceptions if e.g. you try to read Dolphin Memory after Dolphin closes.