const WCHAR * dllName = L"ps3tmapi.dll";
HINSTANCE hlib = LoadLibrary(dllName);
#include <Windows.h>
in your main source file also add the ps3tmapi.dll into your debug folder
#include "ps3mem.h"
void conect_n_attach()
{
typedef int (__cdecl *InitTargetCommsFunction)(void);
typedef int (__cdecl *ConnectFunction)(int,LPWSTR);
typedef int (__cdecl *ProcessListFunction)(int, UINT32*, UINT32*);
typedef int (__cdecl *ProcessAttachFunction)(int, UINT32 ,UINT32);
typedef int (__cdecl *ProcessContinueFunction) (int, UINT32);
typedef int (__cdecl *ProcessInfoFunction)(int, UINT32 ,UINT32*,SNPS3PROCESSINFO*);
InitTargetCommsFunction InitTargetComms = (InitTargetCommsFunction) GetProcAddress(hlib, "SNPS3InitTargetComms");
ConnectFunction Connect = (ConnectFunction) GetProcAddress(hlib, "SNPS3Connect");
ProcessListFunction ProcessList = (ProcessListFunction) GetProcAddress(hlib, "SNPS3ProcessList");
ProcessInfoFunction ProcessInfo = (ProcessInfoFunction) GetProcAddress(hlib, "SNPS3ProcessInfo");
ProcessAttachFunction ProcessAttach = (ProcessAttachFunction) GetProcAddress(hlib, "SNPS3ProcessAttach");
ProcessContinueFunction ProcessContinue = (ProcessContinueFunction) GetProcAddress(hlib,"SNPS3ProcessContinue");
InitTargetComms();
Connect(target,NULL);
ProcessList(target,&puCount,puProcessID);
ProcessAttach(target, 0,*puProcessID);
ProcessContinue(target, *puProcessID);
ProcessInfo(target,*puProcessID,&puBufferSize,pProcessInfo);
}
void connect_n_attach();
to your main header (stdafx.h)
connect_n_attach();
#include "PS3mem_net.h"
#include "SNPS3.h"
PS3::Connect(0);
LIBS += $$quote(-LC:\Program Files (x86)\SN Systems\PS3\sdk\lib\) -lPS3TMAPI.lib
in your .pro file?
LIBS += $$quote(-LC:\Program Files (x86)\SN Systems\PS3\sdk\lib\) -lPS3TMAPI.lib
in your .pro file?
const WCHAR * dllName = L"ps3tmapi.dll";
HINSTANCE hlib = LoadLibrary(dllName);
#include <Windows.h>
in your main source file also add the ps3tmapi.dll into your debug folder
#include "ps3mem.h"
void conect_n_attach()
{
typedef int (__cdecl *InitTargetCommsFunction)(void);
typedef int (__cdecl *ConnectFunction)(int,LPWSTR);
typedef int (__cdecl *ProcessListFunction)(int, UINT32*, UINT32*);
typedef int (__cdecl *ProcessAttachFunction)(int, UINT32 ,UINT32);
typedef int (__cdecl *ProcessContinueFunction) (int, UINT32);
typedef int (__cdecl *ProcessInfoFunction)(int, UINT32 ,UINT32*,SNPS3PROCESSINFO*);
InitTargetCommsFunction InitTargetComms = (InitTargetCommsFunction) GetProcAddress(hlib, "SNPS3InitTargetComms");
ConnectFunction Connect = (ConnectFunction) GetProcAddress(hlib, "SNPS3Connect");
ProcessListFunction ProcessList = (ProcessListFunction) GetProcAddress(hlib, "SNPS3ProcessList");
ProcessInfoFunction ProcessInfo = (ProcessInfoFunction) GetProcAddress(hlib, "SNPS3ProcessInfo");
ProcessAttachFunction ProcessAttach = (ProcessAttachFunction) GetProcAddress(hlib, "SNPS3ProcessAttach");
ProcessContinueFunction ProcessContinue = (ProcessContinueFunction) GetProcAddress(hlib,"SNPS3ProcessContinue");
InitTargetComms();
Connect(target,NULL);
ProcessList(target,&puCount,puProcessID);
ProcessAttach(target, 0,*puProcessID);
ProcessContinue(target, *puProcessID);
ProcessInfo(target,*puProcessID,&puBufferSize,pProcessInfo);
}
void connect_n_attach();
to your main header (stdafx.h)
connect_n_attach();
#include "PS3mem_net.h"
#include "SNPS3.h"
PS3::Connect(0);
#include "C:/Program Files (x86)/SN Systems/PS3/sdk/include/ps3tmapi.h"
#pragma comment( lib, "C:/Program Files (x86)/SN Systems/PS3/sdk/lib/PS3TMAPI.lib" )
#pragma comment( lib, "C:/Program Files (x86)/SN Systems/PS3/sdk/lib/PS3TMAPIx64.lib" )
//If you look in debugger sometimes the 0x1040200 changes, this is the processID so you'll might have to change it
void ConnectPS3()
{
SNPS3InitTargetComms();
SNPS3Connect(0xfffffffe, NULL);//0xfffffffe is the default
SNPS3ProcessAttach(0xfffffffe, 0, 0x1040200);
SNPS3ProcessContinue(0xfffffffe, 0x1040200);
}
void SetMemoryTest()
{
SNPS3InitTargetComms();//You have to keep using SNPS3InitTargetComms every thread.. good think about this is you dont have to keep reconnecting
BYTE b[4] = { 1, 0, 0, 0 };
SNPS3ProcessSetMemory(0xfffffffe, 0, 0x1040200, 0, OFFSET, 4, (const BYTE *)b);//The 4 is the number of bytes being written and OFFSET is the UInt32 that is being written to
}
void GetMemory()
{
SNPS3InitTargetComms();
BYTE b[4];
SNPS3ProcessGetMemory(0xfffffffe, 0, 0x1040200, 0, OFFSET, 4, b);//Again offset is the offset getting the memory from, 4 is the number of bytes getting, and b is the array off bytes to get
}
#include "C:/Program Files (x86)/SN Systems/PS3/sdk/include/ps3tmapi.h"
#pragma comment( lib, "C:/Program Files (x86)/SN Systems/PS3/sdk/lib/PS3TMAPI.lib" )
#pragma comment( lib, "C:/Program Files (x86)/SN Systems/PS3/sdk/lib/PS3TMAPIx64.lib" )
//If you look in debugger sometimes the 0x1040200 changes, this is the processID so you'll might have to change it
void ConnectPS3()
{
SNPS3InitTargetComms();
SNPS3Connect(0xfffffffe, NULL);//0xfffffffe is the default
SNPS3ProcessAttach(0xfffffffe, 0, 0x1040200);
SNPS3ProcessContinue(0xfffffffe, 0x1040200);
}
void SetMemoryTest()
{
SNPS3InitTargetComms();//You have to keep using SNPS3InitTargetComms every thread.. good think about this is you dont have to keep reconnecting
BYTE b[4] = { 1, 0, 0, 0 };
SNPS3ProcessSetMemory(0xfffffffe, 0, 0x1040200, 0, OFFSET, 4, (const BYTE *)b);//The 4 is the number of bytes being written and OFFSET is the UInt32 that is being written to
}
void GetMemory()
{
SNPS3InitTargetComms();
BYTE b[4];
SNPS3ProcessGetMemory(0xfffffffe, 0, 0x1040200, 0, OFFSET, 4, b);//Again offset is the offset getting the memory from, 4 is the number of bytes getting, and b is the array off bytes to get
}
#include "C:/Program Files (x86)/SN Systems/PS3/sdk/include/ps3tmapi.h"
#pragma comment( lib, "C:/Program Files (x86)/SN Systems/PS3/sdk/lib/PS3TMAPI.lib" )
#pragma comment( lib, "C:/Program Files (x86)/SN Systems/PS3/sdk/lib/PS3TMAPIx64.lib" )
//If you look in debugger sometimes the 0x1040200 changes, this is the processID so you'll might have to change it
void ConnectPS3()
{
SNPS3InitTargetComms();
SNPS3Connect(0xfffffffe, NULL);//0xfffffffe is the default
SNPS3ProcessAttach(0xfffffffe, 0, 0x1040200);
SNPS3ProcessContinue(0xfffffffe, 0x1040200);
}
void SetMemoryTest()
{
SNPS3InitTargetComms();//You have to keep using SNPS3InitTargetComms every thread.. good think about this is you dont have to keep reconnecting
BYTE b[4] = { 1, 0, 0, 0 };
SNPS3ProcessSetMemory(0xfffffffe, 0, 0x1040200, 0, OFFSET, 4, (const BYTE *)b);//The 4 is the number of bytes being written and OFFSET is the UInt32 that is being written to
}
void GetMemory()
{
SNPS3InitTargetComms();
BYTE b[4];
SNPS3ProcessGetMemory(0xfffffffe, 0, 0x1040200, 0, OFFSET, 4, b);//Again offset is the offset getting the memory from, 4 is the number of bytes getting, and b is the array off bytes to get
}
#include "C:/Program Files (x86)/SN Systems/PS3/sdk/include/ps3tmapi.h"
#pragma comment( lib, "C:/Program Files (x86)/SN Systems/PS3/sdk/lib/PS3TMAPI.lib" )
#pragma comment( lib, "C:/Program Files (x86)/SN Systems/PS3/sdk/lib/PS3TMAPIx64.lib" )
//If you look in debugger sometimes the 0x1040200 changes, this is the processID so you'll might have to change it
void ConnectPS3()
{
SNPS3InitTargetComms();
SNPS3Connect(0xfffffffe, NULL);//0xfffffffe is the default
SNPS3ProcessAttach(0xfffffffe, 0, 0x1040200);
SNPS3ProcessContinue(0xfffffffe, 0x1040200);
}
void SetMemoryTest()
{
SNPS3InitTargetComms();//You have to keep using SNPS3InitTargetComms every thread.. good think about this is you dont have to keep reconnecting
BYTE b[4] = { 1, 0, 0, 0 };
SNPS3ProcessSetMemory(0xfffffffe, 0, 0x1040200, 0, OFFSET, 4, (const BYTE *)b);//The 4 is the number of bytes being written and OFFSET is the UInt32 that is being written to
}
void GetMemory()
{
SNPS3InitTargetComms();
BYTE b[4];
SNPS3ProcessGetMemory(0xfffffffe, 0, 0x1040200, 0, OFFSET, 4, b);//Again offset is the offset getting the memory from, 4 is the number of bytes getting, and b is the array off bytes to get
}
Copyright © 2024, NextGenUpdate.
All Rights Reserved.