Int32
*(int*)OffsetToWriteTo = IntergerToWrite;
int mem = *(int*)OffsetToRead;
Float
*(float*)OffsetToWriteTo = FloatToWrite;
float mem = *(int*)OffsetToRead;
there is many more of these just google it or look at xbox :p
#include <sys/syscall.h>
sys_pid_t sys_process_getpid(void)
{
system_call_0(1);
return_to_user_prog(sys_pid_t);
}
#include <sys/sys_time.h>
void sleep(second_t time)
{
sys_timer_sleep(time);
}
#include <sys/syscall.h>
int sys_ppu_thread_exit()
{
system_call_1(41, 0);
return_to_user_prog(int);
}
#include <sys/syscall.h>
#include <sys/ppu_thread.h>
sys_ppu_thread_t id;
sys_ppu_thread_t create_thread(void (*entry)(uint64_t), int priority, size_t stacksize, const char* threadname)
{
if(sys_ppu_thread_create(&id, entry, 0, priority , stacksize, 0, threadname) != CELL_OK)
{
console_write("Thread creation failed\n");
}
else
{
console_write("Thread created\n");
}
return id;
}
#include <string.h>
#include <sys/syscall.h>
#include <stdarg.h>
#include <stddef.h>
int console_write(const char * s)
{
uint32_t len;
system_call_4(403, 0, (uint64_t) s, std::strlen(s), (uint64_t) &len);
return_to_user_prog(int);
}
#include "stdafx.h"
#include <cellstatus.h>
#include <sys/prx.h>
#include <sys/sys_time.h>
#include <sys/syscall.h>
#include <sys/ppu_thread.h>
#include <string.h>
#include <sys/syscall.h>
#include <stdarg.h>
#include <stddef.h>
#include <sys/timer.h>
void sleep(usecond_t time)
{
sys_timer_usleep(time * 1000);
}
int console_write(const char * s)
{
uint32_t len;
system_call_4(403, 0, (uint64_t) s, 32, (uint64_t) &len);
return_to_user_prog(int);
}
sys_ppu_thread_t id;
sys_ppu_thread_t create_thread(void (*entry)(uint64_t), int priority, size_t stacksize, const char* threadname)
{
if(sys_ppu_thread_create(&id, entry, 0, priority , stacksize, 0, threadname) != CELL_OK)
{
console_write("Thread creation failed\n");
}
else
{
console_write("Thread created\n");
}
return id;
}
SYS_MODULE_INFO( Test, 0, 1, 1);
SYS_MODULE_START( _Test_prx_entry );
SYS_LIB_DECLARE_WITH_STUB( LIBNAME, SYS_LIB_AUTO_EXPORT, STUBNAME );
SYS_LIB_EXPORT( _Test_export_function, LIBNAME );
//GO
enum Buttons
{
Up = 0x3135,
Down = 0x3137,
Left = 0x3139,
Right = 0x3231,
X = 0x3235,
Square = 0x3131,
Triangle = 0x3430,
L1 = 0x3133,
L2 = 0x3700,
L3 = 0x3900,
R1 = 0x3100,
R2 = 0x3500,
R3 = 0x3237
};
bool DetectBtn(int clientIndex, Buttons Btn)
{
return *(short*)(*(int*)0x017BB210 + (clientIndex * 0x68B80) + 0x21022) == Btn;
}
//Buttons
{
if (InGame())
{
if(DetectBtn(0, Up))
{
//how do i put this together lol
}
}
}
// An exported function is needed to generate the project's PRX stub export library
extern "C" int _Test_export_function(void)
{
return CELL_OK;
}
void thread_entry(uint64_t arg)
{
}
extern "C" int _Test_prx_entry(void)
{
create_thread(thread_entry, 0x4AA, 0x6000, "Main_Thread");
return 0;
return SYS_PRX_RESIDENT;
}
Copyright © 2024, NextGenUpdate.
All Rights Reserved.