Skip to content

Commit

Permalink
SceNpSignalingCreateContextA + listen + shutdown + ScePadOutputReport (
Browse files Browse the repository at this point in the history
…#184)

* SceNpSignalingCreateContextA

* SceKernelAddTimerEvent + SceKernelDeleteTimerEvent

* listen

* ScePadOutputReport

* Remove SceKernelAddTimerEvent

* shutdown

* -

* +

---------

Co-authored-by: red-prig <[email protected]>
  • Loading branch information
Ordinary205 and red-prig authored Feb 3, 2024
1 parent 97a1339 commit accf9ec
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 1 deletion.
2 changes: 2 additions & 0 deletions kernel/ps4_libkernel.pas
Original file line number Diff line number Diff line change
Expand Up @@ -1981,6 +1981,8 @@ function Load_libkernel(Const name:RawByteString):TElf_node;
lib^.set_proc($7C5C469311766D5A,@ps4_setsockopt);
lib^.set_proc($4FC7C447EB481A09,@ps4_select);
lib^.set_proc($95493AC2B197C8CC,@ps4_recvfrom);
lib^.set_proc($A719C299A82BB5AA,@ps4_listen);
lib^.set_proc($4D4BA2612DA413CB,@ps4_shutdown);

//socket

Expand Down
13 changes: 13 additions & 0 deletions kernel/ps4_scesocket.pas
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ function ps4_recvfrom(s:SceNetId;
addr:pSceNetSockaddr;
paddrlen:pSceNetSocklen_t):Integer; SysV_ABI_CDecl;

function ps4_listen(s:SceNetId;backlog:Integer):Integer; SysV_ABI_CDecl;

function ps4_shutdown(s:SceNetId;how:Integer):Integer; SysV_ABI_CDecl;

implementation

Expand Down Expand Up @@ -74,5 +77,15 @@ function ps4_recvfrom(s:SceNetId;
Result:=0;
end;

function ps4_listen(s:SceNetId;backlog:Integer):Integer; SysV_ABI_CDecl;
begin
Result:=0;
end;

function ps4_shutdown(s:SceNetId;how:Integer):Integer; SysV_ABI_CDecl;
begin
Result:=0;
end;

end.

11 changes: 10 additions & 1 deletion src/np/ps4_libscenpsignaling.pas
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,14 @@ function ps4_sceNpSignalingCreateContext(npId:pSceNpId;
Result:=0;
end;

function ps4_sceNpSignalingCreateContextA(npId:pSceNpId;
handler:SceNpSignalingHandler;
arg:Pointer;
ctxId:PDWORD):Integer; SysV_ABI_CDecl;
begin
Result:=0;
end;

function Load_libSceNpSignaling(Const name:RawByteString):TElf_node;
var
lib:PLIBRARY;
Expand All @@ -47,7 +55,8 @@ function Load_libSceNpSignaling(Const name:RawByteString):TElf_node;

lib:=Result._add_lib('libSceNpSignaling');
lib^.set_proc($DCA3AE0B84666595,@ps4_sceNpSignalingInitialize);
lib^.set_proc($E7262311D778B7C6,@ps4_sceNpSignalingCreateContext)
lib^.set_proc($E7262311D778B7C6,@ps4_sceNpSignalingCreateContext);
lib^.set_proc($7432CD15D63C770B,@ps4_sceNpSignalingCreateContextA);
end;

initialization
Expand Down
6 changes: 6 additions & 0 deletions src/ps4_libscepad.pas
Original file line number Diff line number Diff line change
Expand Up @@ -385,6 +385,11 @@ function ps4_scePadGetExtControllerInformation(handle:Integer;
Result:=ps4_scePadGetControllerInformation(handle,@pInfo^.base);
end;

function ps4_scePadOutputReport(param_1:Integer;param_2:Byte;param_3:Pointer;param_4:QWORD):Integer; SysV_ABI_CDecl;
begin
Result:=0;
end;

function Load_libScePad(Const name:RawByteString):TElf_node;
var
lib:PLIBRARY;
Expand Down Expand Up @@ -412,6 +417,7 @@ function Load_libScePad(Const name:RawByteString):TElf_node;
lib^.set_proc($AF8E260317521BE5,@ps4_scePadSetAngularVelocityDeadbandState);
lib^.set_proc($58522249F5C652AF,@ps4_scePadOpenExt);
lib^.set_proc($8466DFD904C19AA7,@ps4_scePadGetExtControllerInformation);
lib^.set_proc($0EB52EF1C3EB8DEF,@ps4_scePadOutputReport);
end;

initialization
Expand Down

0 comments on commit accf9ec

Please sign in to comment.