Skip to content

Commit

Permalink
+
Browse files Browse the repository at this point in the history
  • Loading branch information
red-prig committed Mar 1, 2024
1 parent 8708109 commit 9257399
Show file tree
Hide file tree
Showing 6 changed files with 38 additions and 35 deletions.
3 changes: 2 additions & 1 deletion kernel/ps4_scesocket.pas
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,8 @@ function ps4_connect(s:SceNetId;
const addr:pSceNetSockaddr;
addrlen:SceNetSocklen_t):Integer; SysV_ABI_CDecl;
begin
Result:=0;
sleep(200);
Result:=_set_errno(ECONNREFUSED);
end;

end.
Expand Down
2 changes: 1 addition & 1 deletion src/np/ps4_libscenpmanager.pas
Original file line number Diff line number Diff line change
Expand Up @@ -546,7 +546,7 @@ function ps4_sceNpCheckCallbackForLib():Integer; SysV_ABI_CDecl;
Result:=0;
end;

function ps4_sceNpGetAccountDateOfBirth(userId:SceUserServiceUserId;
function ps4_sceNpGetAccountDateOfBirth(pOnlineId:pSceNpOnlineId;
pDateOfBirth:PSceNpDate):Integer; SysV_ABI_CDecl;
begin
if pDateOfBirth=nil then
Expand Down
35 changes: 15 additions & 20 deletions src/np/ps4_libscenptus.pas
Original file line number Diff line number Diff line change
Expand Up @@ -20,19 +20,14 @@ interface

pSceNpTusDataStatus=^SceNpTusDataStatus;
SceNpTusDataStatus=packed record
ownerId :SceNpOnlineId;
reserved1 :array[0..15] of Byte;
hasData :Integer;
lastChangedDate :QWORD; //SceRtcTick
lastChangedAuthorId :SceNpOnlineId;
reserved2 :array[0..15] of Byte;
pad :array[0..3] of Byte;
data :Pointer;
dataSize :QWORD;
info :SceNpTusDataInfo;
ownerAccountId :SceNpAccountId;
lastChangedAuthorAccountId:SceNpAccountId;
reserved :array[0..15] of Byte;
ownerId :SceNpId;
hasData :Integer;
lastChangedDate :QWORD; //SceRtcTick
lastChangedAuthorId:SceNpId;
pad :array[0..3] of Byte;
data :Pointer;
dataSize :QWORD;
info :SceNpTusDataInfo;
end;

pSceNpTusDataStatusA=^SceNpTusDataStatusA;
Expand Down Expand Up @@ -85,13 +80,13 @@ function ps4_sceNpTusCreateNpTitleCtxA(serviceLabel:DWord;selfId:Integer):Intege
end;

function ps4_sceNpTusGetData(reqId:Integer;
targetAccountId:SceNpAccountId;
slotId:DWORD;
dataStatus:pSceNpTusDataStatus;
dataStatusSize:QWORD;
data:Pointer;
recvSize:QWORD;
option:Pointer):Integer; SysV_ABI_CDecl;
targetNpId:pSceNpId;
slotId:DWORD;
dataStatus:pSceNpTusDataStatus;
dataStatusSize:QWORD;
data:Pointer;
recvSize:QWORD;
option:Pointer):Integer; SysV_ABI_CDecl;
begin
Result:=0;
end;
Expand Down
5 changes: 4 additions & 1 deletion src/ps4_libscegamelivestreaming.pas
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,10 @@ interface
pSceGameLiveStreamingPresetSocialFeedback=^SceGameLiveStreamingPresetSocialFeedback;
SceGameLiveStreamingPresetSocialFeedback=packed record
commandId :DWORD;
commandText:array[0..SCE_GAME_LIVE_STREAMING_MAX_SOCIAL_FEEDBACK_PRESET_TEXT_LENGTH,0..MB_LEN_MAX-1] of char;
commandText:array[0..
(SCE_GAME_LIVE_STREAMING_MAX_SOCIAL_FEEDBACK_PRESET_TEXT_LENGTH*
MB_LEN_MAX+1)
-1] of char;
reserved :array[0..30] of Byte;
end;

Expand Down
5 changes: 3 additions & 2 deletions src/ps4_libscenet.pas
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ interface
SCE_NET_ENOSPC =28;
SCE_NET_EWOULDBLOCK =35;
SCE_NET_EAFNOSUPPORT=47;

SCE_NET_ECONNREFUSED=61;
SCE_NET_EHOSTUNREACH=65;

//
Expand Down Expand Up @@ -452,7 +452,8 @@ function ps4_sceNetResolverDestroy(rid:Integer):Integer; SysV_ABI_CDecl;

function ps4_sceNetConnect(s:Integer; const addr:pSceNetSockaddr; addrlen:SceNetSocklen_t):Integer; SysV_ABI_CDecl;
begin
Result:=0;
sleep(200);
Result:=_set_net_errno(SCE_NET_ECONNREFUSED);
end;

function ps4_sceNetEpollWait(s:Integer; events:pSceNetEpollEvent; maxevents:Integer; timeout:Integer):Integer; SysV_ABI_CDecl;
Expand Down
23 changes: 13 additions & 10 deletions src/ps4_libsceult.pas
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,16 @@ implementation
{$I sce_errno.inc}

const
SCE_ULT_ERROR_NULL =$80810001;
SCE_ULT_ERROR_ALIGNMENT =$80810002;
SCE_ULT_ERROR_RANGE =$80810003;
SCE_ULT_ERROR_INVALID =$80810004;
SCE_ULT_ERROR_PERMISSION =$80810005;
SCE_ULT_ERROR_STATE =$80810006;
SCE_ULT_ERROR_BUSY =$80810007;
SCE_ULT_ERROR_AGAIN =$80810008;
SCE_ULT_ERROR_NOT_INITIALIZE=$8081000A;
SCE_ULT_ERROR_NULL =Integer($80810001);
SCE_ULT_ERROR_ALIGNMENT =Integer($80810002);
SCE_ULT_ERROR_RANGE =Integer($80810003);
SCE_ULT_ERROR_INVALID =Integer($80810004);
SCE_ULT_ERROR_PERMISSION =Integer($80810005);
SCE_ULT_ERROR_STATE =Integer($80810006);
SCE_ULT_ERROR_BUSY =Integer($80810007);
SCE_ULT_ERROR_AGAIN =Integer($80810008);
SCE_ULT_ERROR_NOT_INITIALIZE=Integer($8081000A);

SCE_ULT_MAX_NAME_LENGTH =31;

ULT_STATE_INIT =0;
Expand Down Expand Up @@ -548,7 +549,7 @@ function ps4_sceUltWaitingQueueResourcePoolDestroy(pool:PSceUltWaitingQueueResou
if (pool=nil) then
Exit(SCE_ULT_ERROR_NULL);
Writeln(SysLogPrefix,'sceUltWaitingQueueResourcePoolDestroy');
Result:=0; // TODO: Not used by current implementation of this lib.
Result:=0; // TODO: There is no actual destructor
end;

//
Expand Down Expand Up @@ -675,6 +676,8 @@ function ps4_sceUltMutexDestroy(mutex:PSceUltMutex):Integer; SysV_ABI_CDecl;
begin
if (mutex=nil) then
Exit(SCE_ULT_ERROR_NULL);
ps4_pthread_mutex_destroy(mutex^.handle);
mutex^.handle:=nil;
//Writeln(SysLogPrefix,'sceUltMutexDestroy,mutex=',mutex^.name);
Result:=0;
end;
Expand Down

0 comments on commit 9257399

Please sign in to comment.