This commit is contained in:
Pavel 2023-10-10 17:21:38 +03:00
parent a289460d49
commit 18d0438c41
2 changed files with 36 additions and 22 deletions

View File

@ -53,7 +53,16 @@ const
type
TCUSANAME=array[0..9] of AnsiChar;
//[preload_lib] -> sceSysmodulePreloadModuleForLibkernel
const
//SceLncAppType
SCE_LNC_APP_TYPE_INVALID =-1;
SCE_LNC_APP_TYPE_SHELL_UI= 1;
SCE_LNC_APP_TYPE_DAEMON = 2;
SCE_LNC_APP_TYPE_CDLG = 3;
SCE_LNC_APP_TYPE_MINI_APP= 4;
SCE_LNC_APP_TYPE_BIG_APP = 5;
//[preloadPrxFlags] -> sceSysmodulePreloadModuleForLibkernel
//0x0000000004 libSceNet
//0x0000000008 libSceIpmi
//0x0000000010 libSceMbus
@ -89,26 +98,30 @@ type
//0x2000000000 libSceNpGameIntent
//0x4000000000 libSceNpWebApi2
type
t_title_workaround=packed record
version:Integer;
align :Integer;
ids :array[0..1] of QWORD;
end;
p_appinfo=^t_appinfo;
t_appinfo=packed record
AppId :Integer; //4
mmap_flags :Integer; //4
excp_flags :Integer; //4
AppType :Integer; //4 5?
CUSANAME :TCUSANAME; //10
debug_level:Byte; //1
slv_flags :Byte; //1 eLoadOptions
f_1c :Byte;
f_1d :Byte;
f_1e :Byte;
f_1f :Byte;
preload_lib:QWORD;
f_28 :Integer;
f_2c :Integer;
f_30 :Integer;
f_34 :Integer;
f_38 :QWORD;
f_40 :QWORD;
AppId :Integer; //4
mmap_flags :Integer; //4
attributeExe :Integer; //4
AppType :Integer; //4 SceLncAppType
CUSANAME :TCUSANAME; //10 titleId
debug_level :Byte; //1
slv_flags :Byte; //1 eLoadOptions
budget_flags :Byte;
debug_out :Byte;
f_1e :Byte;
requiredHdcpType:Byte;
preloadPrxFlags :QWORD;
attribute :Integer;
hasParamSfo :Integer;
titleWorkaround :t_title_workaround;
end;
{$IF sizeof(t_appinfo)<>72}{$STOP sizeof(t_appinfo)<>72}{$ENDIF}

View File

@ -1212,7 +1212,7 @@ begin
Exit(0);
end;
procedure init_tty;
procedure init_tty; //TODO before execve
begin
kern_openat(STDIN_FILENO ,'/dev/deci_stdin' ,UIO_SYSSPACE,O_RDWR,0);
kern_openat(STDOUT_FILENO,'/dev/deci_stdout',UIO_SYSSPACE,O_RDWR,0);
@ -1444,16 +1444,17 @@ begin
//copy authinfo
g_authinfo:=imgp^.authinfo;
//copy appinfo
//copy appinfo (TODO before execve)
g_appinfo.mmap_flags:=g_appinfo.mmap_flags or 1; //is_big_app ???
if (p_proc.p_sce_replay_exec<>0) then
begin
g_appinfo.mmap_flags:=g_appinfo.mmap_flags or 2; //is_system ???
end;
g_appinfo.AppType:=SCE_LNC_APP_TYPE_BIG_APP;
//TODO load CUSANAME
//init std tty
//init std tty (TODO before execve)
init_tty;
{