This commit is contained in:
Pavel 2022-06-28 12:05:15 +03:00
parent ff15a1e819
commit 3d0ccedf40
6 changed files with 53 additions and 5 deletions

View File

@ -401,23 +401,24 @@ end;
Function TGPU_REGS.GET_SCISSOR(i:Byte):TVkRect2D; //0..15
begin
if (SC_MODE_CNTL_0.VPORT_SCISSOR_ENABLE=1) then
if (SC_MODE_CNTL_0.VPORT_SCISSOR_ENABLE<>0) and
((DWORD(VPORT_SCISSOR[i].TL)<>0) or
(DWORD(VPORT_SCISSOR[i].BR)<>0)) then
begin
Result.offset.x :=_fix_scissor_range(VPORT_SCISSOR[i].TL.TL_X);
Result.offset.y :=_fix_scissor_range(VPORT_SCISSOR[i].TL.TL_Y);
Result.extent.width :=_fix_scissor_range(VPORT_SCISSOR[i].BR.BR_X);
Result.extent.height:=_fix_scissor_range(VPORT_SCISSOR[i].BR.BR_Y);
Result.extent.width :=Result.extent.width -Result.offset.x;
Result.extent.height:=Result.extent.height-Result.offset.y;
end else
begin
Result.offset.x :=_fix_scissor_range(SCREEN_SCISSOR_TL.TL_X);
Result.offset.y :=_fix_scissor_range(SCREEN_SCISSOR_TL.TL_Y);
Result.extent.width :=_fix_scissor_range(SCREEN_SCISSOR_BR.BR_X);
Result.extent.height:=_fix_scissor_range(SCREEN_SCISSOR_BR.BR_Y);
Result.extent.width :=Result.extent.width -Result.offset.x;
Result.extent.height:=Result.extent.height-Result.offset.y;
end;
Result.extent.width :=Result.extent.width -Result.offset.x;
Result.extent.height:=Result.extent.height-Result.offset.y;
end;
Function TGPU_REGS.GET_SCREEN:TVkRect2D;

View File

@ -948,9 +948,12 @@ begin
lib^.set_proc($C755FBE9AAD83315,@ps4_scePthreadAttrGet);
lib^.set_proc($E9482DC15FB4CDBE,@ps4_scePthreadCreate);
lib^.set_proc($3B184807C2C1FCF4,@ps4_pthread_create);
lib^.set_proc($E2A1AB47A7A83FD6,@ps4_scePthreadDetach);
lib^.set_proc($F94D51E16B57BE87,@ps4_pthread_detach);
lib^.set_proc($A27358F41CA7FD6F,@ps4_scePthreadJoin);
lib^.set_proc($87D09C3F7274A153,@ps4_pthread_join);
lib^.set_proc($678428B15B80B00D,@ps4_pthread_once);
lib^.set_proc($D786CE00200D4C1A,@ps4_scePthreadOnce);

View File

@ -37,6 +37,7 @@ function ps4_pthread_create(pthread:p_pthread;pAttr:p_pthread_attr_t;entry:Poin
function ps4_scePthreadDetach(_pthread:pthread):Integer; SysV_ABI_CDecl;
function ps4_pthread_detach(_pthread:pthread):Integer; SysV_ABI_CDecl;
function ps4_scePthreadJoin(_pthread:pthread;value:PPointer):Integer; SysV_ABI_CDecl;
function ps4_pthread_join(_pthread:pthread;value:PPointer):Integer; SysV_ABI_CDecl;
function ps4_pthread_once(once_control:p_pthread_once_t;init_routine:t_init_routine_proc):Integer; SysV_ABI_CDecl;
function ps4_scePthreadOnce(once_control:p_pthread_once_t;init_routine:t_init_routine_proc):Integer; SysV_ABI_CDecl;
@ -540,6 +541,11 @@ begin
end;
end;
function ps4_pthread_join(_pthread:pthread;value:PPointer):Integer; SysV_ABI_CDecl;
begin
Result:=sce2px(ps4_scePthreadJoin(_pthread,value));
end;
function ps4_pthread_once(once_control:p_pthread_once_t;init_routine:t_init_routine_proc):Integer; SysV_ABI_CDecl;
begin
Result:=0;

View File

@ -16,6 +16,12 @@ begin
Result:=4;
end;
function ps4_sceHttpTerm(libhttpCtxId:Integer):Integer; SysV_ABI_CDecl;
begin
Writeln('sceHttpTerm:',libhttpCtxId);
Result:=0;
end;
function ps4_sceHttpCreateTemplate(
libhttpCtxId:Integer;
userAgent:PChar;
@ -68,6 +74,7 @@ begin
Result.pFileName:=name;
lib:=Result._add_lib('libSceHttp');
lib^.set_proc($03D715314B44A786,@ps4_sceHttpInit);
lib^.set_proc($224FCAA4B4E57FB4,@ps4_sceHttpTerm);
lib^.set_proc($D206233D347FE9C6,@ps4_sceHttpCreateTemplate);
lib^.set_proc($B36FCD3C8BF3FA20,@ps4_sceHttpSetNonblock);
lib^.set_proc($EB7F3575617EC6C4,@ps4_sceHttpCreateEpoll);

View File

@ -35,12 +35,23 @@ begin
Result:=0;
end;
function ps4_sceNetTerm:Integer; SysV_ABI_CDecl;
begin
Result:=0;
end;
function ps4_sceNetPoolCreate(name:PChar;size,flags:Integer):Integer; SysV_ABI_CDecl;
begin
Writeln('sceNetPoolCreate:',name,':',size,':',flags);
Result:=2;
end;
function ps4_sceNetPoolDestroy(memid:Integer):Integer; SysV_ABI_CDecl;
begin
Writeln('sceNetPoolDestroy:',memid);
Result:=0;
end;
const
AF_INET = 2;
AF_INET6 = 10;
@ -341,7 +352,9 @@ begin
Result.pFileName:=name;
lib:=Result._add_lib('libSceNet');
lib^.set_proc($3657AFECB83C9370,@ps4_sceNetInit);
lib^.set_proc($7131A473AFD30652,@ps4_sceNetTerm);
lib^.set_proc($76024169E2671A9A,@ps4_sceNetPoolCreate);
lib^.set_proc($2BB465AD3908FE6C,@ps4_sceNetPoolDestroy);
lib^.set_proc($F0A729E5DFEAD54A,@ps4_sceNetInetPton);
lib^.set_proc($BFA338B7179C0AEA,@ps4_sceNetEtherNtostr);
lib^.set_proc($E8E7346CBB0861ED,@ps4_sceNetGetMacAddress);

View File

@ -109,6 +109,13 @@ type
align1:Integer;
end;
pSceSaveDataMountInfo=^SceSaveDataMountInfo;
SceSaveDataMountInfo=packed record
blocks :QWORD; //SceSaveDataBlocks
freeBlocks:QWORD; //SceSaveDataBlocks
reserved:array[0..31] of Byte;
end;
implementation
uses
@ -188,6 +195,16 @@ begin
_sig_unlock;
end;
function ps4_sceSaveDataGetMountInfo(mountPoint:PSceSaveDataMountPoint;
info:pSceSaveDataMountInfo):Integer; SysV_ABI_CDecl;
begin
Result:=0;
if (info<>nil) then
begin
info^:=Default(SceSaveDataMountInfo);
end;
end;
type
SceSaveDataParamType=DWORD;
@ -217,6 +234,7 @@ begin
lib^.set_proc($DF61D0010770336A,@ps4_sceSaveDataMount);
lib^.set_proc($D33E393C81FE48D2,@ps4_sceSaveDataMount2);
lib^.set_proc($04C47817F51E9371,@ps4_sceSaveDataUmount);
lib^.set_proc($EB9547D1069ACFAB,@ps4_sceSaveDataGetMountInfo);
lib^.set_proc($F39CEE97FFDE197B,@ps4_sceSaveDataSetParam);
end;