
//IN YOUR PROJECT, RIGHT CLICK ON YOUR PROJECT and add THESE TO THE PROPERTIES!
[B]C/C++/Additional Include Directories/:[/B] C:\Program Files (x86)\SN Systems\PS3\sdk\include\
[B]Linker/Input/Additional Dependencies/:[/B] C:\Program Files (x86)\SN Systems\PS3\sdk\lib\PS3TMAPI.lib
[B]Linker/Input/Additional Dependencies/:[/B] C:\Program Files (x86)\SN Systems\PS3\sdk\lib\PS3TMAPix64.lib
//Then you shouldn't have any errors 
//Add header to your project (Drag and drop, or "Add Existing")
#pragma once
#include <iostream>
#include <Windows.h>
#include "C:\Program Files (x86)\SN Systems\PS3\sdk\include\ps3tmapi.h"
/*
IN YOUR PROJECT SETTINGS! ADD THESE:
C/C++/Additional Include Directories/-> C:\Program Files (x86)\SN Systems\PS3\sdk\include\
Linker/Input/Additional Dependencies/-> C:\Program Files (x86)\SN Systems\PS3\sdk\lib\PS3TMAPI.lib
*/
int target=0xfffffffe; //target default
unsigned int pid; //This is a decimal value of your ProcessID, Convert to HEX if to see (Thanks to Milky4444 for clearing that up)
using namespace System;
namespace PS3 {
public ref class PS3TMAPI
{
public: void Connect()
{
SNPS3InitTargetComms();
SNPS3Connect(target, NULL);
}
public: void Attach()
{
SNPS3InitTargetComms();
SNPS3Connect(target,NULL);
unsigned int pCount[32];
SNPS3InitTargetComms();
SNPS3ProcessList(target,pCount,&pid);
SNPS3ProcessAttach(target,0,pid);
SNPS3ProcessContinue(target,pid);
}
public: void writestring(UINT32 Address, std::string text)
{
SNPS3InitTargetComms();
SetMemory(Address, (BYTE*)text.c_str(), text.length() + 1);
}
public: void SetMemory(UINT32 Address, BYTE *bytes, int sizeOfArray)
{
SNPS3InitTargetComms();
SNPS3ProcessSetMemory(target, 0, pid, 0, Address, sizeOfArray, bytes);
}
public: BYTE* GetMemory(UINT32 Address, INT32 Length)
{
SNPS3InitTargetComms();
BYTE* ret = new BYTE[Length];
SNPS3ProcessGetMemory(target, 0, pid, 0, Address, Length, ret);
return ret;
}
public: void writeByte(UINT32 Address, BYTE input)
{
SNPS3InitTargetComms();
BYTE bytes[] = { input };
SetMemory(Address, bytes, 1);
}
public: void writeBool(UINT32 Address, bool input)
{
SNPS3InitTargetComms();
BYTE bytes[] = { input };
bytes[0] = input ? (BYTE)1 : (BYTE)0;
SetMemory(Address, bytes, 1);
}
public: BYTE readByte(UINT32 Address)
{
SNPS3InitTargetComms();
return (BYTE)GetMemory(Address, 1)[0];
}
public: char* ReadString(UINT32 Address)
{
SNPS3InitTargetComms();
int i = 0;
while (PS3:
S3TMAPI::readByte(Address + i) != 0x00){ i++; }
i++;//null terminate
return (char*)PS3:
S3TMAPI::GetMemory(Address, i);
}
public: bool readBool(UINT32 Address)
{
SNPS3InitTargetComms();
return GetMemory(Address, 1)[0] != 0;
}
public: INT16 readShort(UINT32 Address)
{
SNPS3InitTargetComms();
BYTE* read = GetMemory(Address, 2);
std::reverse(read, read + 2);
return *(INT16*)read;
}
public: INT32 readInt(UINT32 Address)
{
SNPS3InitTargetComms();
BYTE* read = GetMemory(Address, 4);
std::reverse(read, read + 4);
return *(INT32*)read;
}
public: INT64 readInt64(UINT64 Address)
{
SNPS3InitTargetComms();
BYTE* read = GetMemory(Address,
;
std::reverse(read, read +
;
return *(INT64*)read;
}
public: UINT16 readUShort(UINT32 Address)
{
SNPS3InitTargetComms();
BYTE* read = GetMemory(Address, 2);
std::reverse(read, read + 2);
return *(UINT16*)read;
}
public: UINT32 readUInt(UINT32 Address)
{
SNPS3InitTargetComms();
BYTE* read = GetMemory(Address, 4);
std::reverse(read, read + 4);
return *(UINT32*)read;
}
public: UINT64 readUInt64(UINT32 Address)
{
SNPS3InitTargetComms();
BYTE* read = GetMemory(Address,
;
std::reverse(read, read +
;
return *(UINT64*)read;
}
public: FLOAT readFloat(UINT32 Address)
{
SNPS3InitTargetComms();
BYTE* read = GetMemory(Address, 4);
std::reverse(read, read + 4);
return *(FLOAT*)read;
}
public: DOUBLE readDouble(UINT32 Address)
{
SNPS3InitTargetComms();
BYTE* read = GetMemory(Address,
;
std::reverse(read, read +
;
return *(DOUBLE*)read;
}
public: bool cmpArray(BYTE* a, BYTE* b, INT32 ArrayLength)
{
SNPS3InitTargetComms();
INT32 CheckArray = 0;
for (INT32 i = 0; i < ArrayLength; i++)
if (a[i] == b[i])
CheckArray++;
return CheckArray == ArrayLength;
}
public: void writeShort(UINT32 Address, INT16 input)
{
SNPS3InitTargetComms();
BYTE bytes[2];
*(INT16*)bytes = input;
std::reverse(bytes, bytes + 2);
SetMemory(Address, bytes, 2);
}
public: void writeInt(UINT32 Address, INT32 input)
{
SNPS3InitTargetComms();
BYTE bytes[4];
*(INT32*)bytes = input;
std::reverse(bytes, bytes + 4);
SetMemory(Address, bytes, 4);
}
public: void writeInt64(UINT32 Address, INT64 input)
{
SNPS3InitTargetComms();
BYTE bytes[8];
*(INT64*)bytes = input;
std::reverse(bytes, bytes +
;
SetMemory(Address, bytes,
;
}
public: void writeUShort(UINT32 Address, UINT16 input)
{
SNPS3InitTargetComms();
BYTE bytes[2];
*(UINT16*)bytes = input;
std::reverse(bytes, bytes + 2);
SetMemory(Address, bytes, 2);
}
public: void writeUInt(UINT32 Address, UINT32 input)
{
SNPS3InitTargetComms();
BYTE bytes[4];
*(UINT32*)bytes = input;
std::reverse(bytes, bytes + 4);
SetMemory(Address, bytes, 4);
}
public: void writeUInt64(UINT32 Address, UINT64 input)
{
SNPS3InitTargetComms();
BYTE bytes[8];
*(UINT64*)bytes = input;
std::reverse(bytes, bytes +
;
SetMemory(Address, bytes,
;
}
public: void writeFloat(UINT32 Address, float input)
{
SNPS3InitTargetComms();
BYTE bytes[4];
*(float*)bytes = input;
std::reverse(bytes, bytes + 4);
SetMemory(Address, bytes, 4);
}
public: void writeDouble(UINT32 Address, DOUBLE input)
{
SNPS3InitTargetComms();
BYTE bytes[8];
*(DOUBLE*)bytes = input;
std::reverse(bytes, bytes +
;
SetMemory(Address, bytes,
;
}
};
}
Copyright © 2026, NextGenUpdate.
All Rights Reserved.