Editing CCAPI
Jump to navigation
Jump to search
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 51: | Line 51: | ||
Important:<br /> | Important:<br /> | ||
If some games refuse to work, just don't use plugins, delete plugins folder from /dev_usb000<br /> | If some games refuse to work, just don't use plugins, delete plugins folder from /dev_usb000<br /> | ||
**2.50 | **2.50 | ||
Line 246: | Line 204: | ||
= CCAPI 2.70 - 2.80 rev5 = | = CCAPI 2.70 - 2.80 rev5 = | ||
''' Location of ccapi.sprx ''' | |||
ccapi.sprx is renamed to sys_audio.sprx and is located to | ccapi.sprx is renamed to sys_audio.sprx and is located to /dev_flash/sys/internal/sys_audio.sprx | ||
'''Ports used by CCAPI''' | |||
== Packets and http Requests == | == Packets and http Requests == | ||
Port: | Port:80 | ||
Communication: HTTP | Communication: HTTP | ||
Port:1979 PS3 | Port:1979 PS3 | ||
Communication: TCP/UDP | Communication: TCP/UDP | ||
Source : CCAPI && Webman Http requests for sprx - Jo-Milk | Source : CCAPI && Webman Http requests for sprx - Jo-Milk | ||
https//pastebin.com/RqnvPZ0j | https//pastebin.com/RqnvPZ0j | ||
== Use CCAPI Syscall from sprx == | |||
== Use CCAPI Syscall from | |||
CCAPI uses a unique PPC instruction that it implemented it. I named it "ccsc" as it works similarly to "sc" the syscall instruction in PPC. Here is the HEX value that represents "ccsc". | CCAPI uses a unique PPC instruction that it implemented it. I named it "ccsc" as it works similarly to "sc" the syscall instruction in PPC. Here is the HEX value that represents "ccsc". | ||
Line 276: | Line 230: | ||
<code>#define CcxCall uint64_t __attribute__((naked))</code> | <code>#define CcxCall uint64_t __attribute__((naked))</code> | ||
<code>static CcxCall CCAPIWriteProcessMemory(int command_id,sys_pid_t pid, void* destination, const void* source, size_t size) | <code>static CcxCall CCAPIWriteProcessMemory(int command_id,sys_pid_t pid, void* destination, const void* source, size_t size) { __asm__(/*"li %r3, 0x123;" R3 is your command_id write */"sc;" /*You must replace this 4 byte instruction by 0xEF455314*/"blr;"); } </code> | ||
{ | |||
__asm__( | |||
/*"li %r3, 0x123;" R3 is your command_id write */ | |||
"sc;" /*You must replace this 4 byte instruction by 0xEF455314*/ | |||
"blr;" | |||
); | |||
} </code> | |||
R3 or the first argument will be the value of the Command ID that will be processed by a kernel in a function implemented by CCAPI. | |||
{| class="wikitable sortable" | {| class="wikitable sortable" | ||
|- | |- | ||
! | ! Command ID !! Description !! Arguments | ||
|- | |- | ||
| | | 0x241 || {{cellcolors|#88ff88}} Enable CCAPI Syscalls || int32_t unk() | ||
|- | |- | ||
| | | 0x785 || {{cellcolors|#88ff88}} CCAPIReadProcessMemory || int32_t CCAPIReadProcessMemory(int command_id, sys_pid_t pid, void* destination, void* source, size_t size) | ||
|- | |- | ||
| | | 0x123 || {{cellcolors|#88ff88}} CCAPIWriteProcessMemory || int32_t CCAPIWriteProcessMemory(int command_id,sys_pid_t pid, void* destination, const void* source, size_t size) | ||
|- | |- | ||
| | | 0x357 || {{cellcolors|#88ff88}} CCAPICreateProcessThread || int32_t CCAPICreateProcessThread(int command_id,sys_pid_t pid, thread_t* thread, void* entry, uint64_t arg, int prio, size_t stacksize, const char* threadname) | ||
|- | |- | ||
| 0x977 || {{cellcolors|#88ff88}} CCAPIAllocatePage || int32_t CCAPIAllocatePage(int command_id,sys_pid_t pid, uint64_t size, uint64_t page_size, uint64_t flags, uint64_t is_executable, uint64_t* kernel_page_adr, uint64_t* game_page_adr) | |||
|} | |} | ||
Reference for this info : offset 0x448 ccapi.prx in ccapi 2.80 rev5 this is the function called to use ccsc(command id, ... ); | Reference for this info : offset 0x448 ccapi.prx in ccapi 2.80 rev5 this is the function called to use ccsc(command id, ... ); | ||
{{Reverse engineering}}<noinclude>[[Category:Main]]</noinclude> | {{Reverse engineering}}<noinclude>[[Category:Main]]</noinclude> |