Protocol for Instrumentation of Emulators
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

33 lines
873 B

import ctypes
import os
import platform
# we get the correct library extension per os
cur_os = platform.system()
if(cur_os == "Linux"):
elif(cur_os == "Windows"):
elif(cur_os == "Darwin"):
# we load the library, this will require it to be in the same folder
# refer to bindings/c to build the library.
libipc = ctypes.CDLL(os.path.join(os.path.dirname(os.path.abspath(__file__)),lib))
# we create a new PCSX2Ipc object
ipc = libipc.newPCSX2Ipc()
# we read an uint8_t from memory location 0x00347D34
print(libipc.Read(ipc, 0x00347D34, 0, False))
# we check for errors
print("Error (if any): " + str(libipc.GetError(ipc)))
# we delete the object and free the resources
# for more infos check out the C bindings documentation :D !