This commit is contained in:
red-prig 2022-11-26 17:39:03 +03:00
parent 61dc47042e
commit 5482fa3dde
4 changed files with 28 additions and 6 deletions

View File

@ -9,6 +9,7 @@ uses
RWLock,
sys_types,
ps4_map_mm,
ps4_mspace,
ps4_pthread,
ps4_signal,
ps4_mutex,
@ -625,9 +626,10 @@ end;
procedure _kernel_init;
begin
ps4_sceKernelGetCompiledSdkVersion(@SDK_VERSION);
_mem_init;
_sys_dev_init;
ps4_sceKernelGetCompiledSdkVersion(@SDK_VERSION);
ps4_malloc_init;
end;
function Load_libkernel(Const name:RawByteString):TElf_node;

View File

@ -3193,7 +3193,7 @@ begin
tmp^.name:='SceLibcIHeap';
if _INITIAL_LOCK(@tmp)<>0 then Exit(1);
if _INITIAL_LOCK(tmp)<>0 then Exit(1);
tmp^.magic :=DEFAULT_MAGIC;
tmp^.mflags :=USE_MMAP_BIT or USE_LOCK_BIT or 4;

View File

@ -1061,7 +1061,7 @@ begin
mu.value:=entry.d_un.d_val;
_md.strName:=PChar(@pStrTable[mu.name_offset]);
_add_need(_md.strName);
Writeln('DT_NEEDED:',_md.strName); //import filename
Writeln('DT_NEEDED :',_md.strName); //import filename
end;
DT_SCE_MODULE_INFO:
begin
@ -1077,7 +1077,7 @@ begin
mu.value:=entry.d_un.d_val;
_md.strName:=PChar(@pStrTable[mu.name_offset]);
_md.Import:=True;
Writeln('DT_SCE_NEEDED_MODULE:',_md.strName,':',HexStr(mu.id,4)); //import module name
Writeln('DT_SCE_NEEDED_MODULE :',HexStr(mu.id,4),':',_md.strName); //import module name
_set_mod(mu.id,_md);
end;
DT_SCE_IMPORT_LIB:
@ -1085,7 +1085,7 @@ begin
lu.value:=entry.d_un.d_val;
lib.strName:=PChar(@pStrTable[lu.name_offset]);
lib.Import:=True;
Writeln('DT_SCE_IMPORT_LIB :',lib.strName,':',HexStr(lu.id,4)); //import lib name
Writeln('DT_SCE_IMPORT_LIB :',HexStr(lu.id,4),':',lib.strName); //import lib name
_set_lib(lu.id,lib);
end;
DT_SCE_EXPORT_LIB:
@ -1093,7 +1093,7 @@ begin
lu.value:=entry.d_un.d_val;
lib.strName:=PChar(@pStrTable[lu.name_offset]);
lib.Import:=False;
Writeln('DT_SCE_EXPORT_LIB:',lib.strName,':',HexStr(lu.id,4)); //export libname
Writeln('DT_SCE_EXPORT_LIB :',HexStr(lu.id,4),':',lib.strName); //export libname
_set_lib(lu.id,lib);
end;

View File

@ -232,6 +232,25 @@ begin
end;
end;
const
CUH='CUH-0000'#0;
function ps4_sceSystemServiceParamGetString(paramId:Integer;buf:Pchar;bufSize:size_t):Integer; SysV_ABI_CDecl;
begin
if (buf=nil) then Exit(SCE_SYSTEM_SERVICE_ERROR_PARAMETER);
Case paramId of
SCE_SYSTEM_SERVICE_PARAM_ID_SYSTEM_NAME:
begin
if (bufSize<Length(CUH)) then Exit;
Move(PChar(CUH)^,buf^,Length(CUH));
end;
else
Exit(SCE_SYSTEM_SERVICE_ERROR_PARAMETER);
end;
end;
function ps4_sceSystemServiceHideSplashScreen:Integer; SysV_ABI_CDecl;
begin
Result:=0;
@ -294,6 +313,7 @@ begin
Result.pFileName:=name;
lib:=Result._add_lib('libSceSystemService');
lib^.set_proc($7D9A38F2E9FB2CAE,@ps4_sceSystemServiceParamGetInt);
lib^.set_proc($4AC0BF9BF4BD2530,@ps4_sceSystemServiceParamGetString);
lib^.set_proc($568E55F0A0300A69,@ps4_sceSystemServiceHideSplashScreen);
lib^.set_proc($C75501F5BC0348EC,@ps4_sceSystemServiceDisableMusicPlayer);
lib^.set_proc($F643C2CFB3ABFB56,@ps4_sceSystemServiceReenableMusicPlayer);