libSceVoice and libSceSystemService functions (#158)

* sceVoiceDeletePort

* sceVoiceGetPortInfo

* sceSystemServiceReportAbnormalTermination

* sceSystemServiceLoadExec

* sceSystemServiceGetRenderingMode

* Fixes

* Fix and TODO

sceSystemServiceLoadExec must be implemented
sceSystemServiceReportAbnormalTermination is an abnormal termination of the program

* +

---------

Co-authored-by: red-prig <vdpasha@mail.ru>
This commit is contained in:
Ordinary205 2023-12-31 20:46:48 +04:00 committed by GitHub
parent a6d0ebb1b1
commit 21ef724919
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 61 additions and 0 deletions

View File

@ -157,6 +157,10 @@ type
minToneMapLuminance :Single;
end;
pSceSystemServiceAbnormalTerminationInfo=^SceSystemServiceAbnormalTerminationInfo;
SceSystemServiceAbnormalTerminationInfo=packed record
end;
pSceSystemServiceEventType=^SceSystemServiceEventType;
SceSystemServiceEventType=packed record
eventType:Integer; //SceSystemServiceEventType
@ -407,6 +411,25 @@ begin
Result:=SCE_SYSTEM_SERVICE_ERROR_NO_EVENT;
end;
function ps4_sceSystemServiceReportAbnormalTermination(const info:pSceSystemServiceAbnormalTerminationInfo):Integer; SysV_ABI_CDecl;
begin
Writeln(StdErr,'sceSystemServiceReportAbnormalTermination');
Assert(false);
Result:=0;
end;
function ps4_sceSystemServiceLoadExec(const path:PChar;const argv:PChar):Integer; SysV_ABI_CDecl;
begin
Writeln(StdErr,'TODO:sceSystemServiceLoadExec:',path);
Assert(false);
Result:=0;
end;
function ps4_sceSystemServiceGetRenderingMode():Integer; SysV_ABI_CDecl;
begin
Result:=0;
end;
//
function ps4_sceSystemServiceEnableSuspendNotification:Integer; SysV_ABI_CDecl;
@ -439,6 +462,9 @@ begin
lib^.set_proc($98FA4FC6FE4266DE,@ps4_sceSystemServiceGetHdrToneMapLuminance);
lib^.set_proc($ACFA3AB55F03F5B3,@ps4_sceSystemServiceGetStatus);
lib^.set_proc($EB9E8B3104AB83A5,@ps4_sceSystemServiceReceiveEvent);
lib^.set_proc($DECF1C1E20812811,@ps4_sceSystemServiceReportAbnormalTermination);
lib^.set_proc($26806A490B75CB20,@ps4_sceSystemServiceLoadExec);
lib^.set_proc($8C0EB6F4F70C08A5,@ps4_sceSystemServiceGetRenderingMode);
lib:=Result._add_lib('libSceSystemServiceSuspend');
lib^.set_proc($6B92A38EAE8781C5,@ps4_sceSystemServiceEnableSuspendNotification);

View File

@ -10,6 +10,9 @@ uses
Classes,
SysUtils;
const
SCE_VOICE_ERROR_ARGUMENT_INVALID=-2142369787;
type
pSceVoiceInitParam=^SceVoiceInitParam;
SceVoiceInitParam=packed record
@ -32,6 +35,17 @@ type
//
end;
pSceVoiceBasePortInfo=^SceVoiceBasePortInfo;
SceVoiceBasePortInfo=packed record
portType :Integer; //SceVoicePortType
state :Integer; //SceVoicePortState
pEdge :PDWORD;
numByte :DWORD;
frameSize:DWORD;
numEdge :WORD;
reserved :WORD;
end;
implementation
function ps4_sceVoiceInit(pArg:pSceVoiceInitParam;
@ -56,6 +70,11 @@ begin
Result:=0;
end;
function ps4_sceVoiceDeletePort(portId:DWORD):Integer; SysV_ABI_CDecl;
begin
Result:=0;
end;
function ps4_sceVoiceConnectIPortToOPort(ips,ops:DWORD):Integer; SysV_ABI_CDecl;
begin
Result:=0;
@ -66,6 +85,20 @@ begin
Result:=0;
end;
function ps4_sceVoiceGetPortInfo(portId:DWORD;pInfo:pSceVoiceBasePortInfo):Integer; SysV_ABI_CDecl;
begin
if (pInfo=nil) then Exit(SCE_VOICE_ERROR_ARGUMENT_INVALID);
pInfo^.portType :=0;
pInfo^.state :=3;
pInfo^.numByte :=0;
pInfo^.frameSize:=1;
pInfo^.numEdge :=0;
pInfo^.reserved :=0;
Result:=0;
end;
function Load_libSceVoice(Const name:RawByteString):TElf_node;
var
lib:PLIBRARY;
@ -76,8 +109,10 @@ begin
lib^.set_proc($F53AE1B86CDB7AB4,@ps4_sceVoiceInit);
lib^.set_proc($E78A613C7D8B665B,@ps4_sceVoiceStart);
lib^.set_proc($9D7A637B9C8DA5A1,@ps4_sceVoiceCreatePort);
lib^.set_proc($6FB90923E9F1DA18,@ps4_sceVoiceDeletePort);
lib^.set_proc($A15F4601D276DC6C,@ps4_sceVoiceConnectIPortToOPort);
lib^.set_proc($6A3563DD01B6BA6E,@ps4_sceVoiceDisconnectIPortFromOPort);
lib^.set_proc($0AB2EA0F058BA173,@ps4_sceVoiceGetPortInfo);
end;
function Load_libSceVoiceQoS(Const name:RawByteString):TElf_node;