From 94f3c061b121793a250fe1bee99ce726b524d98a Mon Sep 17 00:00:00 2001 From: red-prig Date: Sat, 11 Jun 2022 02:48:17 +0300 Subject: [PATCH] + --- ps4_elf.pas | 4 ++-- ps4_libkernel/ps4_libkernel.pas | 2 +- ps4_libscediscmap.pas | 12 ++++++------ ps4_libscegnmdriver.pas | 27 ++++++++++++++++++++++++++- 4 files changed, 35 insertions(+), 10 deletions(-) diff --git a/ps4_elf.pas b/ps4_elf.pas index ccb4b6f4..69a98702 100644 --- a/ps4_elf.pas +++ b/ps4_elf.pas @@ -1536,7 +1536,7 @@ Procedure OnLoadRelaExport(elf:Telf_file;Info:PRelaInfo;data:Pointer); case _on_module_start_stop(Info^.pName) of 0:begin //module_start - nSymVal:=elf.mMap.pAddr+elf.dtInit; + //nSymVal:=elf.mMap.pAddr+elf.dtInit; _do_set(nSymVal); //IInfo.nid:=ps4_nid_hash(Info^.pName); @@ -1546,7 +1546,7 @@ Procedure OnLoadRelaExport(elf:Telf_file;Info:PRelaInfo;data:Pointer); Exit; end; 1:begin //module_stop - nSymVal:=elf.mMap.pAddr+elf.dtFini; + //nSymVal:=elf.mMap.pAddr+elf.dtFini; _do_set(nSymVal); //IInfo.nid:=ps4_nid_hash(Info^.pName); diff --git a/ps4_libkernel/ps4_libkernel.pas b/ps4_libkernel/ps4_libkernel.pas index 2d4dbe80..99f3e6e5 100644 --- a/ps4_libkernel/ps4_libkernel.pas +++ b/ps4_libkernel/ps4_libkernel.pas @@ -799,7 +799,7 @@ begin lib^.set_proc($DC1A4FF39D21053E,@ps4_pthread_condattr_setpshared); lib^.set_proc($D13C959383122EDD,@ps4_pthread_cond_init); - lib^.set_proc($9A4C767D584D32C8,@ps4_pthread_cond_broadcast); + lib^.set_proc($4575EA8B80AD17CC,@ps4_pthread_cond_destroy); lib^.set_proc($D8C3B2FAB51FBA14,@ps4_pthread_cond_signal); lib^.set_proc($9A4C767D584D32C8,@ps4_pthread_cond_broadcast); diff --git a/ps4_libscediscmap.pas b/ps4_libscediscmap.pas index 75413f3f..c0f9056c 100644 --- a/ps4_libscediscmap.pas +++ b/ps4_libscediscmap.pas @@ -14,24 +14,24 @@ implementation const SCE_DISC_MAP_ERROR_INVALID_ARGUMENT=-2129657855; //0x81100001 -function ps4_sceDiscMapIsRequestOnHDD(param1:PChar;param2,param3:Int64;param4:PInteger):Integer; SysV_ABI_CDecl; +function ps4_sceDiscMapIsRequestOnHDD(path:PChar;param2,param3:Int64;param4:PInteger):Integer; SysV_ABI_CDecl; begin - if (param1=nil) or (param4=nil) then Exit(SCE_DISC_MAP_ERROR_INVALID_ARGUMENT); + if (path=nil) or (param4=nil) then Exit(SCE_DISC_MAP_ERROR_INVALID_ARGUMENT); param4^:=1; Result:=0; end; -function ps4_8A828CAEE7EDD5E9(param1:PChar;param2,param3:Int64;param4,param5,param6:PInt64):Integer; SysV_ABI_CDecl; +function ps4_8A828CAEE7EDD5E9(path:PChar;param2,param3:Int64;pflags,param5,param6:PInt64):Integer; SysV_ABI_CDecl; begin - param4^:=0; + pflags^:=0; param5^:=0; param6^:=0; Result:=0; end; -function ps4_7C980FFB0AA27E7A(param1:PChar;param2,param3:Int64;param4,param5,param6:PInt64):Integer; SysV_ABI_CDecl; +function ps4_7C980FFB0AA27E7A(path:PChar;param2,param3:Int64;pflags,param5,param6:PInt64):Integer; SysV_ABI_CDecl; begin - param4^:=0; + pflags^:=0; param5^:=0; param6^:=0; Result:=0; diff --git a/ps4_libscegnmdriver.pas b/ps4_libscegnmdriver.pas index db423e54..7f2f112d 100644 --- a/ps4_libscegnmdriver.pas +++ b/ps4_libscegnmdriver.pas @@ -1126,8 +1126,31 @@ begin Result:=0; end; +function ps4_sceGnmSetVgtControl(cmdBuffer:PDWORD;numDwords:DWORD; + primGroupSizeMinusOne:DWORD; + partialVsWaveMode :DWORD; + wdSwitchOnlyOnEopMode:DWORD):Integer; SysV_ABI_CDecl; +begin + + Result:=-1; + + if (cmdBuffer<>nil) and + (numDwords=3) and + (primGroupSizeMinusOne<$100) and + ((wdSwitchOnlyOnEopMode or partialVsWaveMode)<2) then + begin + Result:=0; + cmdBuffer[0]:=$c0016900; + cmdBuffer[1]:=$2aa; + cmdBuffer[2]:=((partialVsWaveMode and 1) shl $10) or (primGroupSizeMinusOne and $ffff); + end; +end; + function ps4_sceGnmDispatchDirect(cmdBuffer:PDWORD;numDwords:DWORD; - threadGroupX,threadGroupY,threadGroupZ,modifier:DWORD):Integer; SysV_ABI_CDecl; + threadGroupX, + threadGroupY, + threadGroupZ, + modifier:DWORD):Integer; SysV_ABI_CDecl; begin Result:=-1; if (cmdBuffer=nil) or (numDwords<9) or (integer(threadGroupY or threadGroupX or threadGroupZ)<=-1) then Exit; @@ -1392,6 +1415,8 @@ begin lib^.set_proc($E0C811C3F6D53505,@ps4_sceGnmUpdatePsShader); lib^.set_proc($98B54BECDEC15418,@ps4_sceGnmUpdatePsShader350); + lib^.set_proc($7050A9D0D5FCC1FD,@ps4_sceGnmSetVgtControl); + lib^.set_proc($D01CCB1A58DCC01A,@ps4_sceGnmDispatchDirect); lib^.set_proc($186B27EE3313C70E,@ps4_sceGnmDrawIndexAuto);