Dolphin Memory Engine

raw JSON →
1.3.1 verified Mon Apr 27 auth: no python

Python library for reading and writing the memory of running Dolphin (GameCube/Wii emulator) processes. Provides a high-level interface to access game memory addresses, supporting both GameCube and Wii titles. Current version is 1.3.1, with limited API wheels and Python 3.9+ support. The project is actively maintained.

pip install dolphin-memory-engine
error DolphinMemoryEngine' object has no attribute 'read_word'
cause Importing the class name instead of the top-level functions.
fix
Use 'from dolphin_memory_engine import read_word' instead of importing the class.
error dolphin_memory_engine.hook() -> Exception: Failed to hook
cause Dolphin emulator is not running or the game process is not accessible (e.g., running as different user).
fix
Ensure Dolphin is running and the game is started. On Linux, you may need to run the script with appropriate permissions (e.g., sudo).
error ImportError: cannot import name 'dolphin_memory_engine' from 'dolphin_memory_engine' (unknown location)
cause Using an outdated import path (treating the module as a function).
fix
Import functions directly: 'from dolphin_memory_engine import read_word, write_word, hook, unhook'.
breaking The package was renamed from 'py-dolphin-memory-engine' to 'dolphin-memory-engine' in v1.3.0. The old package may still exist but is outdated.
fix Install 'dolphin-memory-engine' instead of 'py-dolphin-memory-engine'.
gotcha hook() will raise an exception if Dolphin is not running or if the emulated game is not started. Always check is_hooked() after hook() or use try/except.
fix Wrap hook() in a try-except or call is_hooked() immediately after hook().
deprecated Python 3.8 support was dropped in v1.3.0. If you are on Python 3.8, you must upgrade to Python 3.9+.
fix Upgrade Python to 3.9 or later.
gotcha The library uses ctypes and a C extension, which may not be available on all platforms. macOS wheels are provided but not tested; if import fails, install from source or use Linux/Windows.
fix Use a supported platform (Linux or Windows) or build from source.

Basic hook and memory read. Ensure Dolphin emulator is running before calling hook().

from dolphin_memory_engine import hook, is_hooked, read_word

hook()
if is_hooked():
    # Example: read word from address 0x80000000
    value = read_word(0x80000000)
    print(f"Value at 0x80000000: {value}")
else:
    print("Failed to hook into Dolphin. Is Dolphin running?")
unhook()