Building out OrbisLibAPI 2.0 for better stability.

This commit is contained in:
Greg
2023-02-23 12:19:58 -07:00
parent d9b1be5ec4
commit 4e8846ef31
41 changed files with 2256 additions and 136 deletions
+6
View File
@@ -23,8 +23,10 @@ Executables/
mono_crash.*
# Build results
Orbis_[Dd]ebug/
[Dd]ebug/
[Dd]ebugPublic/
Orbis_[Rr]elease/
[Rr]elease/
[Rr]eleases/
x64/
@@ -103,6 +105,10 @@ StyleCopReport.xml
*.pidb
*.svclog
*.scc
*.obj
*.a
*.o
*.tlog
# Chutzpah Test files
_Chutzpah*
+80 -1
View File
@@ -1,7 +1,7 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.0.31919.166
VisualStudioVersion = 17.4.33213.308
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Windows", "Windows", "{8F0E1457-FB1E-47A4-9DA8-74A6B757CAA4}"
EndProject
@@ -51,13 +51,21 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OrbisLib2", "Windows\Librar
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OrbisPeeknPoke", "Windows\OrbisPeeknPoke\OrbisPeeknPoke.csproj", "{90180080-9585-499C-99A8-6F4D1725CAF4}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "OrbisLibAPI-2.0", "Playstation\OrbisLibAPI-2.0\OrbisLibAPI-2.0.vcxproj", "{02162131-862F-4D65-A3FB-A670D4790F7E}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "OrbisUtils", "Playstation\OrbisUtils\OrbisUtils.vcxproj", "{6616120A-EACC-4A05-8F48-6B9B32DEEE75}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "v2", "v2", "{F9EC9EAD-0B38-467B-BF57-2E6A4DA29756}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Debug|ORBIS = Debug|ORBIS
Debug|Win32 = Debug|Win32
Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
Release|Any CPU = Release|Any CPU
Release|ORBIS = Release|ORBIS
Release|Win32 = Release|Win32
Release|x64 = Release|x64
Release|x86 = Release|x86
@@ -65,6 +73,8 @@ Global
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{81B068F7-776C-429F-BB7B-5563F75F1A39}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{81B068F7-776C-429F-BB7B-5563F75F1A39}.Debug|Any CPU.Build.0 = Debug|Any CPU
{81B068F7-776C-429F-BB7B-5563F75F1A39}.Debug|ORBIS.ActiveCfg = Debug|Any CPU
{81B068F7-776C-429F-BB7B-5563F75F1A39}.Debug|ORBIS.Build.0 = Debug|Any CPU
{81B068F7-776C-429F-BB7B-5563F75F1A39}.Debug|Win32.ActiveCfg = Debug|Any CPU
{81B068F7-776C-429F-BB7B-5563F75F1A39}.Debug|Win32.Build.0 = Debug|Any CPU
{81B068F7-776C-429F-BB7B-5563F75F1A39}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -73,6 +83,8 @@ Global
{81B068F7-776C-429F-BB7B-5563F75F1A39}.Debug|x86.Build.0 = Debug|Any CPU
{81B068F7-776C-429F-BB7B-5563F75F1A39}.Release|Any CPU.ActiveCfg = Release|Any CPU
{81B068F7-776C-429F-BB7B-5563F75F1A39}.Release|Any CPU.Build.0 = Release|Any CPU
{81B068F7-776C-429F-BB7B-5563F75F1A39}.Release|ORBIS.ActiveCfg = Release|Any CPU
{81B068F7-776C-429F-BB7B-5563F75F1A39}.Release|ORBIS.Build.0 = Release|Any CPU
{81B068F7-776C-429F-BB7B-5563F75F1A39}.Release|Win32.ActiveCfg = Release|Any CPU
{81B068F7-776C-429F-BB7B-5563F75F1A39}.Release|Win32.Build.0 = Release|Any CPU
{81B068F7-776C-429F-BB7B-5563F75F1A39}.Release|x64.ActiveCfg = Release|Any CPU
@@ -81,6 +93,8 @@ Global
{81B068F7-776C-429F-BB7B-5563F75F1A39}.Release|x86.Build.0 = Release|Any CPU
{D7CFB2D5-FAC2-42D5-ABA7-81CE762575EF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D7CFB2D5-FAC2-42D5-ABA7-81CE762575EF}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D7CFB2D5-FAC2-42D5-ABA7-81CE762575EF}.Debug|ORBIS.ActiveCfg = Debug|Any CPU
{D7CFB2D5-FAC2-42D5-ABA7-81CE762575EF}.Debug|ORBIS.Build.0 = Debug|Any CPU
{D7CFB2D5-FAC2-42D5-ABA7-81CE762575EF}.Debug|Win32.ActiveCfg = Debug|Any CPU
{D7CFB2D5-FAC2-42D5-ABA7-81CE762575EF}.Debug|Win32.Build.0 = Debug|Any CPU
{D7CFB2D5-FAC2-42D5-ABA7-81CE762575EF}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -89,6 +103,8 @@ Global
{D7CFB2D5-FAC2-42D5-ABA7-81CE762575EF}.Debug|x86.Build.0 = Debug|Any CPU
{D7CFB2D5-FAC2-42D5-ABA7-81CE762575EF}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D7CFB2D5-FAC2-42D5-ABA7-81CE762575EF}.Release|Any CPU.Build.0 = Release|Any CPU
{D7CFB2D5-FAC2-42D5-ABA7-81CE762575EF}.Release|ORBIS.ActiveCfg = Release|Any CPU
{D7CFB2D5-FAC2-42D5-ABA7-81CE762575EF}.Release|ORBIS.Build.0 = Release|Any CPU
{D7CFB2D5-FAC2-42D5-ABA7-81CE762575EF}.Release|Win32.ActiveCfg = Release|Any CPU
{D7CFB2D5-FAC2-42D5-ABA7-81CE762575EF}.Release|Win32.Build.0 = Release|Any CPU
{D7CFB2D5-FAC2-42D5-ABA7-81CE762575EF}.Release|x64.ActiveCfg = Release|Any CPU
@@ -97,6 +113,7 @@ Global
{D7CFB2D5-FAC2-42D5-ABA7-81CE762575EF}.Release|x86.Build.0 = Release|Any CPU
{228AA300-11F5-49B1-A6B5-4986635C6D0B}.Debug|Any CPU.ActiveCfg = Debug|x64
{228AA300-11F5-49B1-A6B5-4986635C6D0B}.Debug|Any CPU.Build.0 = Debug|x64
{228AA300-11F5-49B1-A6B5-4986635C6D0B}.Debug|ORBIS.ActiveCfg = Debug|Win32
{228AA300-11F5-49B1-A6B5-4986635C6D0B}.Debug|Win32.ActiveCfg = Debug|Win32
{228AA300-11F5-49B1-A6B5-4986635C6D0B}.Debug|Win32.Build.0 = Debug|Win32
{228AA300-11F5-49B1-A6B5-4986635C6D0B}.Debug|x64.ActiveCfg = Debug|x64
@@ -105,6 +122,7 @@ Global
{228AA300-11F5-49B1-A6B5-4986635C6D0B}.Debug|x86.Build.0 = Debug|x64
{228AA300-11F5-49B1-A6B5-4986635C6D0B}.Release|Any CPU.ActiveCfg = Release|x64
{228AA300-11F5-49B1-A6B5-4986635C6D0B}.Release|Any CPU.Build.0 = Release|x64
{228AA300-11F5-49B1-A6B5-4986635C6D0B}.Release|ORBIS.ActiveCfg = Release|Win32
{228AA300-11F5-49B1-A6B5-4986635C6D0B}.Release|Win32.ActiveCfg = Release|x64
{228AA300-11F5-49B1-A6B5-4986635C6D0B}.Release|Win32.Build.0 = Release|x64
{228AA300-11F5-49B1-A6B5-4986635C6D0B}.Release|x64.ActiveCfg = Release|x64
@@ -113,6 +131,7 @@ Global
{228AA300-11F5-49B1-A6B5-4986635C6D0B}.Release|x86.Build.0 = Release|x64
{57244F52-BA7C-4D89-9C38-D80AD9727721}.Debug|Any CPU.ActiveCfg = Debug|x64
{57244F52-BA7C-4D89-9C38-D80AD9727721}.Debug|Any CPU.Build.0 = Debug|x64
{57244F52-BA7C-4D89-9C38-D80AD9727721}.Debug|ORBIS.ActiveCfg = Debug|x64
{57244F52-BA7C-4D89-9C38-D80AD9727721}.Debug|Win32.ActiveCfg = Debug|x64
{57244F52-BA7C-4D89-9C38-D80AD9727721}.Debug|Win32.Build.0 = Debug|x64
{57244F52-BA7C-4D89-9C38-D80AD9727721}.Debug|x64.ActiveCfg = Debug|x64
@@ -121,6 +140,7 @@ Global
{57244F52-BA7C-4D89-9C38-D80AD9727721}.Debug|x86.Build.0 = Debug|x64
{57244F52-BA7C-4D89-9C38-D80AD9727721}.Release|Any CPU.ActiveCfg = Release|x64
{57244F52-BA7C-4D89-9C38-D80AD9727721}.Release|Any CPU.Build.0 = Release|x64
{57244F52-BA7C-4D89-9C38-D80AD9727721}.Release|ORBIS.ActiveCfg = Release|x64
{57244F52-BA7C-4D89-9C38-D80AD9727721}.Release|Win32.ActiveCfg = Release|x64
{57244F52-BA7C-4D89-9C38-D80AD9727721}.Release|Win32.Build.0 = Release|x64
{57244F52-BA7C-4D89-9C38-D80AD9727721}.Release|x64.ActiveCfg = Release|x64
@@ -129,6 +149,7 @@ Global
{57244F52-BA7C-4D89-9C38-D80AD9727721}.Release|x86.Build.0 = Release|x64
{0978D0B2-FFA5-42B2-81AC-0CFD85DE9184}.Debug|Any CPU.ActiveCfg = Debug|x86
{0978D0B2-FFA5-42B2-81AC-0CFD85DE9184}.Debug|Any CPU.Build.0 = Debug|x86
{0978D0B2-FFA5-42B2-81AC-0CFD85DE9184}.Debug|ORBIS.ActiveCfg = Debug|x86
{0978D0B2-FFA5-42B2-81AC-0CFD85DE9184}.Debug|Win32.ActiveCfg = Debug|x86
{0978D0B2-FFA5-42B2-81AC-0CFD85DE9184}.Debug|Win32.Build.0 = Debug|x86
{0978D0B2-FFA5-42B2-81AC-0CFD85DE9184}.Debug|x64.ActiveCfg = Debug|x86
@@ -137,6 +158,7 @@ Global
{0978D0B2-FFA5-42B2-81AC-0CFD85DE9184}.Debug|x86.Build.0 = Debug|x86
{0978D0B2-FFA5-42B2-81AC-0CFD85DE9184}.Release|Any CPU.ActiveCfg = Release|x86
{0978D0B2-FFA5-42B2-81AC-0CFD85DE9184}.Release|Any CPU.Build.0 = Release|x86
{0978D0B2-FFA5-42B2-81AC-0CFD85DE9184}.Release|ORBIS.ActiveCfg = Release|x86
{0978D0B2-FFA5-42B2-81AC-0CFD85DE9184}.Release|Win32.ActiveCfg = Release|x86
{0978D0B2-FFA5-42B2-81AC-0CFD85DE9184}.Release|Win32.Build.0 = Release|x86
{0978D0B2-FFA5-42B2-81AC-0CFD85DE9184}.Release|x64.ActiveCfg = Release|x86
@@ -145,6 +167,7 @@ Global
{0978D0B2-FFA5-42B2-81AC-0CFD85DE9184}.Release|x86.Build.0 = Release|x86
{A37095E9-80BD-4A6B-AF8B-33D278CF92F3}.Debug|Any CPU.ActiveCfg = Debug|x86
{A37095E9-80BD-4A6B-AF8B-33D278CF92F3}.Debug|Any CPU.Build.0 = Debug|x86
{A37095E9-80BD-4A6B-AF8B-33D278CF92F3}.Debug|ORBIS.ActiveCfg = Debug|x86
{A37095E9-80BD-4A6B-AF8B-33D278CF92F3}.Debug|Win32.ActiveCfg = Debug|x86
{A37095E9-80BD-4A6B-AF8B-33D278CF92F3}.Debug|Win32.Build.0 = Debug|x86
{A37095E9-80BD-4A6B-AF8B-33D278CF92F3}.Debug|x64.ActiveCfg = Debug|x86
@@ -153,6 +176,7 @@ Global
{A37095E9-80BD-4A6B-AF8B-33D278CF92F3}.Debug|x86.Build.0 = Debug|x86
{A37095E9-80BD-4A6B-AF8B-33D278CF92F3}.Release|Any CPU.ActiveCfg = Release|x86
{A37095E9-80BD-4A6B-AF8B-33D278CF92F3}.Release|Any CPU.Build.0 = Release|x86
{A37095E9-80BD-4A6B-AF8B-33D278CF92F3}.Release|ORBIS.ActiveCfg = Release|x86
{A37095E9-80BD-4A6B-AF8B-33D278CF92F3}.Release|Win32.ActiveCfg = Release|x86
{A37095E9-80BD-4A6B-AF8B-33D278CF92F3}.Release|Win32.Build.0 = Release|x86
{A37095E9-80BD-4A6B-AF8B-33D278CF92F3}.Release|x64.ActiveCfg = Release|x86
@@ -161,6 +185,8 @@ Global
{A37095E9-80BD-4A6B-AF8B-33D278CF92F3}.Release|x86.Build.0 = Release|x86
{33C378F9-36C5-4C2C-8350-FD1C8DD5AB66}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{33C378F9-36C5-4C2C-8350-FD1C8DD5AB66}.Debug|Any CPU.Build.0 = Debug|Any CPU
{33C378F9-36C5-4C2C-8350-FD1C8DD5AB66}.Debug|ORBIS.ActiveCfg = Debug|Any CPU
{33C378F9-36C5-4C2C-8350-FD1C8DD5AB66}.Debug|ORBIS.Build.0 = Debug|Any CPU
{33C378F9-36C5-4C2C-8350-FD1C8DD5AB66}.Debug|Win32.ActiveCfg = Debug|Any CPU
{33C378F9-36C5-4C2C-8350-FD1C8DD5AB66}.Debug|Win32.Build.0 = Debug|Any CPU
{33C378F9-36C5-4C2C-8350-FD1C8DD5AB66}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -169,6 +195,8 @@ Global
{33C378F9-36C5-4C2C-8350-FD1C8DD5AB66}.Debug|x86.Build.0 = Debug|Any CPU
{33C378F9-36C5-4C2C-8350-FD1C8DD5AB66}.Release|Any CPU.ActiveCfg = Release|Any CPU
{33C378F9-36C5-4C2C-8350-FD1C8DD5AB66}.Release|Any CPU.Build.0 = Release|Any CPU
{33C378F9-36C5-4C2C-8350-FD1C8DD5AB66}.Release|ORBIS.ActiveCfg = Release|Any CPU
{33C378F9-36C5-4C2C-8350-FD1C8DD5AB66}.Release|ORBIS.Build.0 = Release|Any CPU
{33C378F9-36C5-4C2C-8350-FD1C8DD5AB66}.Release|Win32.ActiveCfg = Release|Any CPU
{33C378F9-36C5-4C2C-8350-FD1C8DD5AB66}.Release|Win32.Build.0 = Release|Any CPU
{33C378F9-36C5-4C2C-8350-FD1C8DD5AB66}.Release|x64.ActiveCfg = Release|Any CPU
@@ -177,6 +205,8 @@ Global
{33C378F9-36C5-4C2C-8350-FD1C8DD5AB66}.Release|x86.Build.0 = Release|Any CPU
{53869FE9-BAFF-4FED-B8E3-20660865426C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{53869FE9-BAFF-4FED-B8E3-20660865426C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{53869FE9-BAFF-4FED-B8E3-20660865426C}.Debug|ORBIS.ActiveCfg = Debug|Any CPU
{53869FE9-BAFF-4FED-B8E3-20660865426C}.Debug|ORBIS.Build.0 = Debug|Any CPU
{53869FE9-BAFF-4FED-B8E3-20660865426C}.Debug|Win32.ActiveCfg = Debug|Any CPU
{53869FE9-BAFF-4FED-B8E3-20660865426C}.Debug|Win32.Build.0 = Debug|Any CPU
{53869FE9-BAFF-4FED-B8E3-20660865426C}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -185,6 +215,8 @@ Global
{53869FE9-BAFF-4FED-B8E3-20660865426C}.Debug|x86.Build.0 = Debug|Any CPU
{53869FE9-BAFF-4FED-B8E3-20660865426C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{53869FE9-BAFF-4FED-B8E3-20660865426C}.Release|Any CPU.Build.0 = Release|Any CPU
{53869FE9-BAFF-4FED-B8E3-20660865426C}.Release|ORBIS.ActiveCfg = Release|Any CPU
{53869FE9-BAFF-4FED-B8E3-20660865426C}.Release|ORBIS.Build.0 = Release|Any CPU
{53869FE9-BAFF-4FED-B8E3-20660865426C}.Release|Win32.ActiveCfg = Release|Any CPU
{53869FE9-BAFF-4FED-B8E3-20660865426C}.Release|Win32.Build.0 = Release|Any CPU
{53869FE9-BAFF-4FED-B8E3-20660865426C}.Release|x64.ActiveCfg = Release|Any CPU
@@ -193,6 +225,7 @@ Global
{53869FE9-BAFF-4FED-B8E3-20660865426C}.Release|x86.Build.0 = Release|Any CPU
{22E600CA-B7A4-4FA1-A1DB-6BA4736E6121}.Debug|Any CPU.ActiveCfg = Debug|x64
{22E600CA-B7A4-4FA1-A1DB-6BA4736E6121}.Debug|Any CPU.Build.0 = Debug|x64
{22E600CA-B7A4-4FA1-A1DB-6BA4736E6121}.Debug|ORBIS.ActiveCfg = Debug|x64
{22E600CA-B7A4-4FA1-A1DB-6BA4736E6121}.Debug|Win32.ActiveCfg = Debug|x64
{22E600CA-B7A4-4FA1-A1DB-6BA4736E6121}.Debug|Win32.Build.0 = Debug|x64
{22E600CA-B7A4-4FA1-A1DB-6BA4736E6121}.Debug|x64.ActiveCfg = Debug|x64
@@ -201,6 +234,7 @@ Global
{22E600CA-B7A4-4FA1-A1DB-6BA4736E6121}.Debug|x86.Build.0 = Debug|x64
{22E600CA-B7A4-4FA1-A1DB-6BA4736E6121}.Release|Any CPU.ActiveCfg = Release|x64
{22E600CA-B7A4-4FA1-A1DB-6BA4736E6121}.Release|Any CPU.Build.0 = Release|x64
{22E600CA-B7A4-4FA1-A1DB-6BA4736E6121}.Release|ORBIS.ActiveCfg = Release|x64
{22E600CA-B7A4-4FA1-A1DB-6BA4736E6121}.Release|Win32.ActiveCfg = Release|x64
{22E600CA-B7A4-4FA1-A1DB-6BA4736E6121}.Release|Win32.Build.0 = Release|x64
{22E600CA-B7A4-4FA1-A1DB-6BA4736E6121}.Release|x64.ActiveCfg = Release|x64
@@ -209,6 +243,7 @@ Global
{22E600CA-B7A4-4FA1-A1DB-6BA4736E6121}.Release|x86.Build.0 = Release|x64
{F0E3446E-D9D7-4F44-AC98-797C5124BE91}.Debug|Any CPU.ActiveCfg = Debug|x64
{F0E3446E-D9D7-4F44-AC98-797C5124BE91}.Debug|Any CPU.Build.0 = Debug|x64
{F0E3446E-D9D7-4F44-AC98-797C5124BE91}.Debug|ORBIS.ActiveCfg = Debug|x64
{F0E3446E-D9D7-4F44-AC98-797C5124BE91}.Debug|Win32.ActiveCfg = Debug|x64
{F0E3446E-D9D7-4F44-AC98-797C5124BE91}.Debug|Win32.Build.0 = Debug|x64
{F0E3446E-D9D7-4F44-AC98-797C5124BE91}.Debug|x64.ActiveCfg = Debug|x64
@@ -217,6 +252,7 @@ Global
{F0E3446E-D9D7-4F44-AC98-797C5124BE91}.Debug|x86.Build.0 = Debug|x64
{F0E3446E-D9D7-4F44-AC98-797C5124BE91}.Release|Any CPU.ActiveCfg = Release|x64
{F0E3446E-D9D7-4F44-AC98-797C5124BE91}.Release|Any CPU.Build.0 = Release|x64
{F0E3446E-D9D7-4F44-AC98-797C5124BE91}.Release|ORBIS.ActiveCfg = Release|x64
{F0E3446E-D9D7-4F44-AC98-797C5124BE91}.Release|Win32.ActiveCfg = Release|x64
{F0E3446E-D9D7-4F44-AC98-797C5124BE91}.Release|Win32.Build.0 = Release|x64
{F0E3446E-D9D7-4F44-AC98-797C5124BE91}.Release|x64.ActiveCfg = Release|x64
@@ -225,6 +261,8 @@ Global
{F0E3446E-D9D7-4F44-AC98-797C5124BE91}.Release|x86.Build.0 = Release|x64
{75BA171D-708A-40AA-A27D-57150E5DFB7B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{75BA171D-708A-40AA-A27D-57150E5DFB7B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{75BA171D-708A-40AA-A27D-57150E5DFB7B}.Debug|ORBIS.ActiveCfg = Debug|Any CPU
{75BA171D-708A-40AA-A27D-57150E5DFB7B}.Debug|ORBIS.Build.0 = Debug|Any CPU
{75BA171D-708A-40AA-A27D-57150E5DFB7B}.Debug|Win32.ActiveCfg = Debug|Any CPU
{75BA171D-708A-40AA-A27D-57150E5DFB7B}.Debug|Win32.Build.0 = Debug|Any CPU
{75BA171D-708A-40AA-A27D-57150E5DFB7B}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -233,6 +271,8 @@ Global
{75BA171D-708A-40AA-A27D-57150E5DFB7B}.Debug|x86.Build.0 = Debug|Any CPU
{75BA171D-708A-40AA-A27D-57150E5DFB7B}.Release|Any CPU.ActiveCfg = Release|Any CPU
{75BA171D-708A-40AA-A27D-57150E5DFB7B}.Release|Any CPU.Build.0 = Release|Any CPU
{75BA171D-708A-40AA-A27D-57150E5DFB7B}.Release|ORBIS.ActiveCfg = Release|Any CPU
{75BA171D-708A-40AA-A27D-57150E5DFB7B}.Release|ORBIS.Build.0 = Release|Any CPU
{75BA171D-708A-40AA-A27D-57150E5DFB7B}.Release|Win32.ActiveCfg = Release|Any CPU
{75BA171D-708A-40AA-A27D-57150E5DFB7B}.Release|Win32.Build.0 = Release|Any CPU
{75BA171D-708A-40AA-A27D-57150E5DFB7B}.Release|x64.ActiveCfg = Release|Any CPU
@@ -241,6 +281,8 @@ Global
{75BA171D-708A-40AA-A27D-57150E5DFB7B}.Release|x86.Build.0 = Release|Any CPU
{90180080-9585-499C-99A8-6F4D1725CAF4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{90180080-9585-499C-99A8-6F4D1725CAF4}.Debug|Any CPU.Build.0 = Debug|Any CPU
{90180080-9585-499C-99A8-6F4D1725CAF4}.Debug|ORBIS.ActiveCfg = Debug|Any CPU
{90180080-9585-499C-99A8-6F4D1725CAF4}.Debug|ORBIS.Build.0 = Debug|Any CPU
{90180080-9585-499C-99A8-6F4D1725CAF4}.Debug|Win32.ActiveCfg = Debug|Any CPU
{90180080-9585-499C-99A8-6F4D1725CAF4}.Debug|Win32.Build.0 = Debug|Any CPU
{90180080-9585-499C-99A8-6F4D1725CAF4}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -249,12 +291,46 @@ Global
{90180080-9585-499C-99A8-6F4D1725CAF4}.Debug|x86.Build.0 = Debug|Any CPU
{90180080-9585-499C-99A8-6F4D1725CAF4}.Release|Any CPU.ActiveCfg = Release|Any CPU
{90180080-9585-499C-99A8-6F4D1725CAF4}.Release|Any CPU.Build.0 = Release|Any CPU
{90180080-9585-499C-99A8-6F4D1725CAF4}.Release|ORBIS.ActiveCfg = Release|Any CPU
{90180080-9585-499C-99A8-6F4D1725CAF4}.Release|ORBIS.Build.0 = Release|Any CPU
{90180080-9585-499C-99A8-6F4D1725CAF4}.Release|Win32.ActiveCfg = Release|Any CPU
{90180080-9585-499C-99A8-6F4D1725CAF4}.Release|Win32.Build.0 = Release|Any CPU
{90180080-9585-499C-99A8-6F4D1725CAF4}.Release|x64.ActiveCfg = Release|Any CPU
{90180080-9585-499C-99A8-6F4D1725CAF4}.Release|x64.Build.0 = Release|Any CPU
{90180080-9585-499C-99A8-6F4D1725CAF4}.Release|x86.ActiveCfg = Release|Any CPU
{90180080-9585-499C-99A8-6F4D1725CAF4}.Release|x86.Build.0 = Release|Any CPU
{02162131-862F-4D65-A3FB-A670D4790F7E}.Debug|Any CPU.ActiveCfg = Debug|ORBIS
{02162131-862F-4D65-A3FB-A670D4790F7E}.Debug|ORBIS.ActiveCfg = Debug|ORBIS
{02162131-862F-4D65-A3FB-A670D4790F7E}.Debug|ORBIS.Build.0 = Debug|ORBIS
{02162131-862F-4D65-A3FB-A670D4790F7E}.Debug|Win32.ActiveCfg = Debug|ORBIS
{02162131-862F-4D65-A3FB-A670D4790F7E}.Debug|x64.ActiveCfg = Debug|ORBIS
{02162131-862F-4D65-A3FB-A670D4790F7E}.Debug|x86.ActiveCfg = Debug|ORBIS
{02162131-862F-4D65-A3FB-A670D4790F7E}.Release|Any CPU.ActiveCfg = Release|ORBIS
{02162131-862F-4D65-A3FB-A670D4790F7E}.Release|ORBIS.ActiveCfg = Release|ORBIS
{02162131-862F-4D65-A3FB-A670D4790F7E}.Release|ORBIS.Build.0 = Release|ORBIS
{02162131-862F-4D65-A3FB-A670D4790F7E}.Release|Win32.ActiveCfg = Release|ORBIS
{02162131-862F-4D65-A3FB-A670D4790F7E}.Release|x64.ActiveCfg = Release|ORBIS
{02162131-862F-4D65-A3FB-A670D4790F7E}.Release|x86.ActiveCfg = Release|ORBIS
{6616120A-EACC-4A05-8F48-6B9B32DEEE75}.Debug|Any CPU.ActiveCfg = Debug|x64
{6616120A-EACC-4A05-8F48-6B9B32DEEE75}.Debug|Any CPU.Build.0 = Debug|x64
{6616120A-EACC-4A05-8F48-6B9B32DEEE75}.Debug|ORBIS.ActiveCfg = Debug|x64
{6616120A-EACC-4A05-8F48-6B9B32DEEE75}.Debug|ORBIS.Build.0 = Debug|x64
{6616120A-EACC-4A05-8F48-6B9B32DEEE75}.Debug|Win32.ActiveCfg = Debug|x64
{6616120A-EACC-4A05-8F48-6B9B32DEEE75}.Debug|Win32.Build.0 = Debug|x64
{6616120A-EACC-4A05-8F48-6B9B32DEEE75}.Debug|x64.ActiveCfg = Debug|x64
{6616120A-EACC-4A05-8F48-6B9B32DEEE75}.Debug|x64.Build.0 = Debug|x64
{6616120A-EACC-4A05-8F48-6B9B32DEEE75}.Debug|x86.ActiveCfg = Debug|x64
{6616120A-EACC-4A05-8F48-6B9B32DEEE75}.Debug|x86.Build.0 = Debug|x64
{6616120A-EACC-4A05-8F48-6B9B32DEEE75}.Release|Any CPU.ActiveCfg = Release|x64
{6616120A-EACC-4A05-8F48-6B9B32DEEE75}.Release|Any CPU.Build.0 = Release|x64
{6616120A-EACC-4A05-8F48-6B9B32DEEE75}.Release|ORBIS.ActiveCfg = Release|x64
{6616120A-EACC-4A05-8F48-6B9B32DEEE75}.Release|ORBIS.Build.0 = Release|x64
{6616120A-EACC-4A05-8F48-6B9B32DEEE75}.Release|Win32.ActiveCfg = Release|x64
{6616120A-EACC-4A05-8F48-6B9B32DEEE75}.Release|Win32.Build.0 = Release|x64
{6616120A-EACC-4A05-8F48-6B9B32DEEE75}.Release|x64.ActiveCfg = Release|x64
{6616120A-EACC-4A05-8F48-6B9B32DEEE75}.Release|x64.Build.0 = Release|x64
{6616120A-EACC-4A05-8F48-6B9B32DEEE75}.Release|x86.ActiveCfg = Release|x64
{6616120A-EACC-4A05-8F48-6B9B32DEEE75}.Release|x86.Build.0 = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@@ -274,6 +350,9 @@ Global
{F0E3446E-D9D7-4F44-AC98-797C5124BE91} = {8E8E4C8D-E3E1-4CB9-BD78-7ADAB2F2CF45}
{75BA171D-708A-40AA-A27D-57150E5DFB7B} = {72E29C1E-8723-4885-A5ED-BD3A929D81B6}
{90180080-9585-499C-99A8-6F4D1725CAF4} = {8F0E1457-FB1E-47A4-9DA8-74A6B757CAA4}
{02162131-862F-4D65-A3FB-A670D4790F7E} = {F9EC9EAD-0B38-467B-BF57-2E6A4DA29756}
{6616120A-EACC-4A05-8F48-6B9B32DEEE75} = {F9EC9EAD-0B38-467B-BF57-2E6A4DA29756}
{F9EC9EAD-0B38-467B-BF57-2E6A4DA29756} = {8E8E4C8D-E3E1-4CB9-BD78-7ADAB2F2CF45}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {4B6EE1D0-5ADF-44A2-B6EE-E5C8E110EE47}
+2
View File
@@ -0,0 +1,2 @@
#include "stdafx.h"
#include "API.h"
+1
View File
@@ -0,0 +1 @@
#pragma once
+4
View File
@@ -0,0 +1,4 @@
#pragma once
#define API_PORT 6900
#define EVENT_PORT 6901
+69
View File
@@ -0,0 +1,69 @@
#include "stdafx.h"
#include "Events.h"
std::vector<SceNetInAddr_t> Events::HostList;
std::mutex Events::HostListMtx;
void Events::AddHost(SceNetInAddr_t HostAddress)
{
// Aquire a lock for the list.
std::unique_lock<std::mutex> lock(HostListMtx);
// Add the host to the list if it does not exist already.
if (std::find(HostList.begin(), HostList.end(), HostAddress) == HostList.end())
{
klog("New host (%i.%i.%i.%i)\n", HostAddress & 0xFF, (HostAddress >> 8) & 0xFF, (HostAddress >> 16) & 0xFF, (HostAddress >> 24) & 0xFF);
HostList.push_back(HostAddress);
}
}
void Events::RemoveHost(SceNetInAddr_t HostAddress)
{
// Aquire a lock for the list.
std::unique_lock<std::mutex> lock(HostListMtx);
// Remove this host if it exists in the list.
if (std::find(HostList.begin(), HostList.end(), HostAddress) != HostList.end())
{
klog("Lost host (%i.%i.%i.%i)\n", HostAddress & 0xFF, (HostAddress >> 8) & 0xFF, (HostAddress >> 16) & 0xFF, (HostAddress >> 24) & 0xFF);
std::remove(HostList.begin(), HostList.end(), HostAddress);
}
}
void Events::SendEvent(int EventId, int pid)
{
if (HostList.empty())
{
klog("SendEvent(): Host List Empty :(\n");
return;
}
for (const auto& host : HostList)
{
// Aquire a lock for the list.
std::unique_lock<std::mutex> lock(HostListMtx);
klog("SendEvent(%d): Sending for host %i.%i.%i.%i\n", EventId, host & 0xFF, (host >> 8) & 0xFF, (host >> 16) & 0xFF, (host >> 24) & 0xFF);
auto sock = Sockets::Connect(host, EVENT_PORT, 4);
if (sock)
{
// Send EventId
Sockets::SendInt(sock, EventId);
if (EventId == EVENT_ATTACH && pid != -1)
{
Sockets::SendInt(sock, pid);
}
// Close the socket.
sceNetSocketClose(sock);
}
else
{
klog("SendEvent(): Failed to connect to host %i.%i.%i.%i\n", host & 0xFF, (host >> 8) & 0xFF, (host >> 16) & 0xFF, (host >> 24) & 0xFF);
RemoveHost(host);
}
}
}
+31
View File
@@ -0,0 +1,31 @@
#pragma once
class Events
{
public:
enum EventId
{
EVENT_EXCEPTION,
EVENT_CONTINUE,
EVENT_DIE,
EVENT_ATTACH,
EVENT_DETACH,
EVENT_SUSPEND,
EVENT_RESUME,
EVENT_SHUTDOWN,
};
static bool Init();
static void Term();
static void AddHost(SceNetInAddr_t HostAddress);
static void RemoveHost(SceNetInAddr_t HostAddress);
static void SendEvent(int EventId, int pid = -1);
private:
static std::vector<SceNetInAddr_t> HostList;
static std::mutex HostListMtx;
static SceNetId Connect(SceNetInAddr_t HostAddress);
};
+58
View File
@@ -0,0 +1,58 @@
#include "stdafx.h"
void exit()
{
// Terminate Thread Pool
ThreadPool::Term();
}
int main(int argc, char** arg)
{
// Jailbreak our current process.
//if (!Jailbreak())
//{
// Notify("Failed to jailbreak Process...");
// sceSystemServiceLoadExec("exit", 0);
// return 0;
//}
// Load internal system modules.
if (!LoadModules())
{
Notify("Failed to Load Modules...");
sceSystemServiceLoadExec("exit", 0);
return 0;
}
// Copy back up of sflash so we can read it and not break things :)
CopySflash();
// Set the Name of this process so it shows up as something other than eboot.bin.
//sceKernelSetProcessName("OrbisLibAPI");
// Log the loaded version string.
klog("\n%s\n\n", ORBISLIB_BUILDSTRING);
// Start up the thread pool.
ThreadPool::Init(10);
// Init a thread to monitor the system usage stats.
// SystemMonitor::Init();
// Start up the API.
//if (!API::Init())
//{
// Notify("Failed to init API...");
// sceSystemServiceLoadExec("exit", 0);
// return 0;
//}
// Blocking run monitor.
// Monitor::Run();
atexit(exit);
return 0;
}
@@ -0,0 +1,110 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|ORBIS">
<Configuration>Debug</Configuration>
<Platform>ORBIS</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|ORBIS">
<Configuration>Release</Configuration>
<Platform>ORBIS</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{02162131-862F-4D65-A3FB-A670D4790F7E}</ProjectGuid>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ORBIS'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<PlatformToolset>Clang</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ORBIS'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<PlatformToolset>v142</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<PlatformToolset>v142</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<PropertyGroup Condition="'$(DebuggerFlavor)'=='ORBISDebugger'" Label="OverrideDebuggerDefaults">
<!--LocalDebuggerCommand>$(TargetPath)</LocalDebuggerCommand-->
<!--LocalDebuggerCommandArguments></LocalDebuggerCommandArguments-->
<!--LocalDebuggerTarget></LocalDebuggerTarget-->
<!--LocalDebuggerWorkingDirectory>$(ProjectDir)</LocalDebuggerWorkingDirectory-->
<!--LocalRunCommandLine></LocalRunCommandLine-->
</PropertyGroup>
<ImportGroup Label="ExtensionSettings">
<Import Condition="Exists('$(VCTargetsPath)\BuildCustomizations\OrbisWavePsslc.props')" Project="$(VCTargetsPath)\BuildCustomizations\OrbisWavePsslc.props" />
<Import Condition="Exists('$(VCTargetsPath)\BuildCustomizations\SCU.props')" Project="$(VCTargetsPath)\BuildCustomizations\SCU.props" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|ORBIS'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|ORBIS'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ORBIS'">
<OutDir>$(SolutionDir)Playstation\OrbisLibAPI-2.0\build\$(Configuration)\</OutDir>
<IncludePath>$(SolutionDir)Playstation\OrbisUtils;$(IncludePath)</IncludePath>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ORBIS'">
<ClCompile>
<PreprocessorDefinitions>_DEBUG;DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<GenerateDebugInformation>true</GenerateDebugInformation>
<PrecompiledHeader>Use</PrecompiledHeader>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<ProcessorNumber>32</ProcessorNumber>
<CppLanguageStd>Cpp17</CppLanguageStd>
<CppExceptions>true</CppExceptions>
</ClCompile>
<Link>
<Addressing>NonAslr</Addressing>
<AdditionalLibraryDirectories>$(SolutionDir)Playstation\OrbisUtils\build;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>-lc_stub_weak;-lkernel_stub_weak;-lScePad_stub_weak;-lSceRtc_stub_weak;-lSceUserService_stub_weak;-lSceSystemService_stub_weak;-lSceNet_stub_weak;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
<PostBuildEvent>
<Command>"C:\Python27\python.exe" $(SolutionDir)Playstation\OrbisLibAPI-2.0\build\make_fself.py $(OutputPath)$(ProjectName).elf $(OutputPath)eboot.bin</Command>
</PostBuildEvent>
<PreBuildEvent>
<Command>call "$(SolutionDir)\Misc\Increment.bat" "Version.h" "ORBISLIB_BUILDVERSION" </Command>
</PreBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|ORBIS'">
<ClCompile>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions);</PreprocessorDefinitions>
<OptimizationLevel>Level2</OptimizationLevel>
<PrecompiledHeader>Use</PrecompiledHeader>
</ClCompile>
</ItemDefinitionGroup>
<ItemGroup>
<ClInclude Include="API.h" />
<ClInclude Include="Config.h" />
<ClInclude Include="Events.h" />
<ClInclude Include="Sockets.h" />
<ClInclude Include="stdafx.h" />
<ClInclude Include="ThreadPool.h" />
<ClInclude Include="Utilities.h" />
<ClInclude Include="Version.h" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="API.cpp" />
<ClCompile Include="Events.cpp" />
<ClCompile Include="Main.cpp" />
<ClCompile Include="Sockets.cpp" />
<ClCompile Include="stdafx.cpp">
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|ORBIS'">Create</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|ORBIS'">Create</PrecompiledHeader>
</ClCompile>
<ClCompile Include="ThreadPool.cpp" />
<ClCompile Include="Utilities.cpp" />
</ItemGroup>
<Import Condition="'$(ConfigurationType)' == 'Makefile' and Exists('$(VCTargetsPath)\Platforms\$(Platform)\SCE.Makefile.$(Platform).targets')" Project="$(VCTargetsPath)\Platforms\$(Platform)\SCE.Makefile.$(Platform).targets" />
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
<Import Condition="Exists('$(VCTargetsPath)\BuildCustomizations\OrbisWavePsslc.targets')" Project="$(VCTargetsPath)\BuildCustomizations\OrbisWavePsslc.targets" />
<Import Condition="Exists('$(VCTargetsPath)\BuildCustomizations\SCU.targets')" Project="$(VCTargetsPath)\BuildCustomizations\SCU.targets" />
</ImportGroup>
</Project>
@@ -0,0 +1,74 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Source Files">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cxx;cc;s;asm</Extensions>
</Filter>
<Filter Include="Header Files">
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h;hpp</Extensions>
</Filter>
<Filter Include="Source Files\Utilities">
<UniqueIdentifier>{bdc2fb30-c2db-4ce1-8266-2f6f93dc9e67}</UniqueIdentifier>
</Filter>
<Filter Include="Header Files\Utilities">
<UniqueIdentifier>{d1452c2c-c0db-4cfe-86a4-77f1079bbb07}</UniqueIdentifier>
</Filter>
<Filter Include="Header Files\API">
<UniqueIdentifier>{a253b4b7-0c90-4f79-a868-9dfb32c9d3e4}</UniqueIdentifier>
</Filter>
<Filter Include="Source Files\API">
<UniqueIdentifier>{3ccc78e7-0ce7-46af-ba6e-aa85e0ff0b2c}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="Main.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="stdafx.cpp">
<Filter>Source Files\Utilities</Filter>
</ClCompile>
<ClCompile Include="ThreadPool.cpp">
<Filter>Source Files\Utilities</Filter>
</ClCompile>
<ClCompile Include="Utilities.cpp">
<Filter>Source Files\Utilities</Filter>
</ClCompile>
<ClCompile Include="API.cpp">
<Filter>Source Files\API</Filter>
</ClCompile>
<ClCompile Include="Events.cpp">
<Filter>Source Files\API</Filter>
</ClCompile>
<ClCompile Include="Sockets.cpp">
<Filter>Source Files\Utilities</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="stdafx.h">
<Filter>Header Files\Utilities</Filter>
</ClInclude>
<ClInclude Include="ThreadPool.h">
<Filter>Header Files\Utilities</Filter>
</ClInclude>
<ClInclude Include="Utilities.h">
<Filter>Header Files\Utilities</Filter>
</ClInclude>
<ClInclude Include="Version.h">
<Filter>Header Files\Utilities</Filter>
</ClInclude>
<ClInclude Include="API.h">
<Filter>Header Files\API</Filter>
</ClInclude>
<ClInclude Include="Events.h">
<Filter>Header Files\API</Filter>
</ClInclude>
<ClInclude Include="Sockets.h">
<Filter>Header Files\Utilities</Filter>
</ClInclude>
<ClInclude Include="Config.h">
<Filter>Header Files\API</Filter>
</ClInclude>
</ItemGroup>
</Project>
+110
View File
@@ -0,0 +1,110 @@
#include "stdafx.h"
#include "Sockets.h"
SceNetId Sockets::Connect(SceNetInAddr_t address, uint16_t port, int timeOutSeconds)
{
// Set up socket params.
SceNetSockaddrIn addr = { 0 };
addr.sin_family = SCE_NET_AF_INET;
addr.sin_addr.s_addr = address;
addr.sin_port = sceNetHtons(port);
// Create socket.
auto sock = sceNetSocket("SendEventSock", SCE_NET_AF_INET, SCE_NET_SOCK_STREAM, SCE_NET_IPPROTO_TCP);
if (sock < 0)
{
klog("Sockets::Connect() Failed to allocate sock: %llX %llX\n", sock, *sceNetErrnoLoc());
return -1;
}
// Set connection/transmission time out.
int sock_timeout = timeOutSeconds * 1000000;
sceNetSetsockopt(sock, SCE_NET_SOL_SOCKET, SCE_NET_SO_CONNECTTIMEO, &sock_timeout, sizeof(sock_timeout));
sceNetSetsockopt(sock, SCE_NET_SOL_SOCKET, SCE_NET_SO_SNDTIMEO, &sock_timeout, sizeof(sock_timeout));
sceNetSetsockopt(sock, SCE_NET_SOL_SOCKET, SCE_NET_SO_RCVTIMEO, &sock_timeout, sizeof(sock_timeout));
// Connect to the socket.
auto res = sceNetConnect(sock, (SceNetSockaddr*)&addr, sizeof(addr));
if (!res)
return sock;
else
{
klog("Sockets::Connect() sceNetConnect(): %llX %llX\n", res, *sceNetErrnoLoc());
return -1;
}
}
bool Sockets::SendInt(SceNetId Sock, int val)
{
auto res = sceNetSend(Sock, &val, sizeof(int), 0);
if (res <= 0)
{
klog("SendInt(): Failed to send %llX\n", res);
return false;
}
return true;
}
bool Sockets::RecvInt(SceNetId Sock, int* val)
{
auto res = sceNetRecv(Sock, val, sizeof(int), 0);
if (res <= 0)
{
klog("RecvInt(): Failed to recv %llX\n", res);
return false;
}
return true;
}
bool Sockets::SendLargeData(SceNetId Sock, unsigned char* data, size_t dataLen)
{
unsigned char* CurrentPosition = data;
size_t DataLeft = dataLen;
int res = 0;
while (DataLeft > 0)
{
size_t DataChunkSize = std::min((size_t)8192, DataLeft);
res = sceNetSend(Sock, CurrentPosition, DataChunkSize, 0);
if (res < 0)
{
klog("SendLargeData() Error: %llX(%llX)\n", res, *sceNetErrnoLoc());
return false;
}
DataLeft -= res;
CurrentPosition += res;
}
return true;
}
bool Sockets::RecvLargeData(SceNetId Sock, unsigned char* data, size_t dataLen)
{
size_t DataLeft = dataLen;
int Received = 0;
int res = 0;
while (DataLeft > 0)
{
size_t DataChunkSize = std::min((size_t)8192, DataLeft);
res = sceNetRecv(Sock, data + Received, DataChunkSize, 0);
if (res < 0)
{
klog("RecvLargeData() Error: %llX(%llX)\n", res, *sceNetErrnoLoc());
return false;
}
Received += res;
DataLeft -= res;
}
return true;
}
+13
View File
@@ -0,0 +1,13 @@
#pragma once
class Sockets
{
public:
static SceNetId Connect(SceNetInAddr_t address, uint16_t port, int timeOutSeconds);
static bool SendInt(SceNetId Sock, int val);
static bool RecvInt(SceNetId Sock, int* val);
static bool SendLargeData(SceNetId Sock, unsigned char* data, size_t dataLen);
static bool RecvLargeData(SceNetId Sock, unsigned char* data, size_t dataLen);
private:
};
@@ -0,0 +1,90 @@
#include "stdafx.h"
#include "ThreadPool.h"
bool ThreadPool::ShouldRun;
std::mutex ThreadPool::JobQueueMtx;
std::condition_variable ThreadPool::MtxCondition;
std::vector<ScePthread> ThreadPool::ThreadsPool;
std::queue<std::function<void()>> ThreadPool::JobQueue;
void ThreadPool::WorkingLoop()
{
while (true)
{
try
{
std::function<void()> job;
{
std::unique_lock<std::mutex> lock(JobQueueMtx);
MtxCondition.wait(lock,
[]
{
return !JobQueue.empty() || !ShouldRun;
});
if (!ShouldRun)
return;
job = JobQueue.front();
JobQueue.pop();
}
job();
}
catch (const std::exception& ex)
{
klog("Std Error: %s\n", ex.what());
}
catch (...)
{
klog("Other Uknown Error Occured in Worker Thread.\n");
}
}
}
void ThreadPool::Init(int poolSize)
{
ShouldRun = true;
ThreadsPool.resize(poolSize);
for (int i = 0; i < poolSize; i++)
{
char threadName[0x200];
snprintf(threadName, sizeof(threadName), "WorkerThread%i", i);
scePthreadCreate(&ThreadsPool.at(i), nullptr, [](void*) -> void*
{
ThreadPool::WorkingLoop();
// Clean up the thread.
scePthreadExit(nullptr);
return nullptr;
}, nullptr, threadName);
scePthreadSetaffinity(ThreadsPool.at(i), SCE_KERNEL_CPUMASK_7CPU_ALL);
}
}
void ThreadPool::Term()
{
{
std::unique_lock<std::mutex> lock(JobQueueMtx);
ShouldRun = false;
}
MtxCondition.notify_all();
for (auto& activeThread : ThreadsPool)
{
scePthreadJoin(activeThread, nullptr);
}
ThreadsPool.clear();
}
void ThreadPool::QueueJob(const std::function<void()>& job)
{
{
std::unique_lock<std::mutex> lock(JobQueueMtx);
JobQueue.push(job);
}
MtxCondition.notify_one();
}
+18
View File
@@ -0,0 +1,18 @@
#pragma once
class ThreadPool
{
public:
static void Init(int poolSize);
static void Term();
static void QueueJob(const std::function<void()>& job);
private:
static void WorkingLoop();
static bool ShouldRun;
static std::mutex JobQueueMtx;
static std::condition_variable MtxCondition;
static std::vector<ScePthread> ThreadsPool;
static std::queue<std::function<void()>> JobQueue;
};
+193
View File
@@ -0,0 +1,193 @@
#include "stdafx.h"
#include "Utilities.h"
#include <libsysmodule.h>
int(*sceKernelDebugOutText)(int dbg_channel, const char* text, ...);
int(*sceKernelSendNotificationRequest)(int device, SceNotificationRequest* req, size_t size, int blocking);
int(*sceKernelGetModuleInfo)(SceKernelModule handle, SceDbgModuleInfo* info);
bool LoadModules()
{
int res = 0;
//auto res = sceSysmoduleLoadModule(SCE_SYSMODULE_INTERNAL_SYSTEM_SERVICE);
//if (res != 0)
//{
// klog("LoadModules(): Failed to load SCE_SYSMODULE_INTERNAL_SYSTEM_SERVICE (%llX)\n", res);
// return false;
//}
//
//res = sceSysmoduleLoadModule(SCE_SYSMODULE_INTERNAL_APPINSTUTIL);
//if (res != 0)
//{
// klog("LoadModules(): Failed to load SCE_SYSMODULE_INTERNAL_APPINSTUTIL (%llX)\n", res);
// return false;
//}
//
//res = sceSysmoduleLoadModuleInternal(SCE_SYSMODULE_INTERNAL_USER_SERVICE);
//if (res != 0)
//{
// klog("LoadModules(): Failed to load SCE_SYSMODULE_INTERNAL_USER_SERVICE (%llX)\n", res);
// return false;
//}
//
//res = sceSysmoduleLoadModuleInternal(SCE_SYSMODULE_INTERNAL_SYS_CORE);
//if (res != 0)
//{
// klog("LoadModules(): Failed to load SCE_SYSMODULE_INTERNAL_SYS_CORE (%llX)\n", res);
// return false;
//}
//
//res = sceSysmoduleLoadModuleInternal(SCE_SYSMODULE_INTERNAL_NETCTL);
//if (res != 0)
//{
// klog("LoadModules(): Failed to load SCE_SYSMODULE_INTERNAL_NETCTL (%llX)\n", res);
// return false;
//}
//
//res = sceSysmoduleLoadModuleInternal(SCE_SYSMODULE_INTERNAL_NET);
//if (res != 0)
//{
// klog("LoadModules(): Failed to load SCE_SYSMODULE_INTERNAL_NET (%llX)\n", res);
// return false;
//}
//
//res = sceSysmoduleLoadModuleInternal(SCE_SYSMODULE_INTERNAL_HTTP);
//if (res != 0)
//{
// klog("LoadModules(): Failed to load SCE_SYSMODULE_INTERNAL_HTTP (%llX)\n", res);
// return false;
//}
//
//res = sceSysmoduleLoadModuleInternal(SCE_SYSMODULE_INTERNAL_BGFT);
//if (res != 0)
//{
// klog("LoadModules(): Failed to load SCE_SYSMODULE_INTERNAL_BGFT (%llX)\n", res);
// return false;
//}
//
//sceSysmoduleLoadModuleInternal(0x8000000D);
// Start up networking interface
res = sceNetInit();
if (res != 0)
{
klog("LoadModules(): sceNetInit failed\n");
return false;
}
// Start up user service.
res = sceUserServiceInitialize(nullptr);
if (res != 0)
{
klog("LoadModules(): sceUserServiceInitialize failed (%llX)\n", res);
return false;
}
int libKernelHandle = sceKernelLoadStartModule("libkernel.sprx", 0, nullptr, 0, nullptr, nullptr);
if (libKernelHandle > 0)
{
if (sceKernelDlsym(libKernelHandle, "sceKernelDebugOutText", (void**)&sceKernelDebugOutText) != 0)
{
klog("Failed to resolve: sceKernelDebugOutText\n");
return false;
}
if (sceKernelDlsym(libKernelHandle, "sceKernelSendNotificationRequest", (void**)&sceKernelSendNotificationRequest) != 0)
{
klog("Failed to resolve: sceKernelSendNotificationRequest\n");
return false;
}
if (sceKernelDlsym(libKernelHandle, "sceKernelGetModuleInfo", (void**)&sceKernelGetModuleInfo) != 0)
{
klog("Failed to resolve: sceKernelGetModuleInfo\n");
return false;
}
}
klog("LoadModules(): Success!\n");
return true;
}
void klog(const char* fmt, ...)
{
char Buffer[0x200];
//Create full string from va list.
va_list args;
va_start(args, fmt);
vsprintf(Buffer, fmt, args);
va_end(args);
sceKernelDebugOutText(0, Buffer);
}
void Notify(const char* MessageFMT, ...)
{
SceNotificationRequest Buffer;
//Create full string from va list.
va_list args;
va_start(args, MessageFMT);
vsprintf(Buffer.message, MessageFMT, args);
va_end(args);
//Populate the notify buffer.
Buffer.type = SceNotificationRequestType::NotificationRequest; //this one is just a standard one and will print what ever is stored at the buffer.Message.
Buffer.unk3 = 0;
Buffer.useIconImageUri = 1; //Bool to use a custom uri.
Buffer.targetId = -1; //Not sure if name is correct but is always set to -1.
strcpy(Buffer.iconUri, "https://i.imgur.com/SJPIBGG.png"); //Copy the uri to the buffer.
//From user land we can call int64_t sceKernelSendNotificationRequest(int64_t unk1, char* Buffer, size_t size, int64_t unk2) which is a libkernel import.
sceKernelSendNotificationRequest(0, &Buffer, 3120, 0);
}
void NotifyCustom(const char* IconURI, const char* MessageFMT, ...)
{
SceNotificationRequest Buffer;
//Create full string from va list.
va_list args;
va_start(args, MessageFMT);
vsprintf(Buffer.message, MessageFMT, args);
va_end(args);
//Populate the notify buffer.
Buffer.type = SceNotificationRequestType::NotificationRequest; //this one is just a standard one and will print what ever is stored at the buffer.Message.
Buffer.unk3 = 0;
Buffer.useIconImageUri = 1; //Bool to use a custom uri.
Buffer.targetId = -1; //Not sure if name is correct but is always set to -1.
strcpy(Buffer.iconUri, IconURI); //Copy the uri to the buffer.
//From user land we can call int64_t sceKernelSendNotificationRequest(int64_t unk1, char* Buffer, size_t size, int64_t unk2) which is a libkernel import.
sceKernelSendNotificationRequest(0, &Buffer, 3120, 0);
}
bool CopySflash()
{
int sflashFd = sceKernelOpen("/dev/sflash0", SCE_KERNEL_O_RDONLY, 0);
int backupFd = sceKernelOpen("/data/Orbis Suite/sflash0", SCE_KERNEL_O_CREAT | SCE_KERNEL_O_WRONLY | SCE_KERNEL_O_APPEND, 0777);
if (sflashFd && backupFd)
{
auto buffer = (unsigned char*)malloc(4 * 1024 * 1024);
if (buffer == nullptr)
{
klog("failled to allocate memory for sflash read.\n");
return false;
}
size_t bytesRead = 0;
while ((bytesRead = sceKernelRead(sflashFd, buffer, 4 * 1024 * 1024)) > 0)
{
sceKernelWrite(backupFd, buffer, bytesRead);
}
free(buffer);
sceKernelClose(sflashFd);
sceKernelClose(backupFd);
return true;
}
return false;
}
+58
View File
@@ -0,0 +1,58 @@
#pragma once
enum SceNotificationRequestType
{
NotificationRequest = 0,
SystemNotification = 1,
SystemNotificationWithUserId = 2,
SystemNotificationWithDeviceId = 3,
SystemNotificationWithDeviceIdRelatedToUser = 4,
SystemNotificationWithText = 5,
SystemNotificationWithTextRelatedToUser = 6,
SystemNotificationWithErrorCode = 7,
SystemNotificationWithAppId = 8,
SystemNotificationWithAppName = 9,
SystemNotificationWithAppInfo = 9,
SystemNotificationWithAppNameRelatedToUser = 10,
SystemNotificationWithParams = 11,
SendSystemNotificationWithUserName = 12,
SystemNotificationWithUserNameInfo = 13,
SendAddressingSystemNotification = 14,
AddressingSystemNotificationWithDeviceId = 15,
AddressingSystemNotificationWithUserName = 16,
AddressingSystemNotificationWithUserId = 17,
UNK_1 = 100,
TrcCheckNotificationRequest = 101,
NpDebugNotificationRequest = 102,
UNK_2 = 102,
};
typedef struct
{
enum SceNotificationRequestType type;
int reqId;
int priority;
int msgId;
int targetId;
int userId;
int unk1;
int unk2;
int appId;
int errorNum;
int unk3;
unsigned char useIconImageUri;
char message[1024];
char iconUri[1024];
char unk[1024];
} SceNotificationRequest;
extern int(*sceKernelDebugOutText)(int dbg_channel, const char* text, ...);
extern int(*sceKernelSendNotificationRequest)(int device, SceNotificationRequest* req, size_t size, int blocking);
extern int(*sceKernelGetModuleInfo)(SceKernelModule handle, SceDbgModuleInfo* info);
bool LoadModules();
void klog(const char* fmt, ...);
void Notify(const char* MessageFMT, ...);
void NotifyCustom(const char* IconURI, const char* MessageFMT, ...);
bool CopySflash();
+11
View File
@@ -0,0 +1,11 @@
#pragma once
#define ORBISLIB_MAJOR 2
#define ORBISLIB_MINOR 0
#define ORBISLIB_BUILDVERSION 1194
#define stringify(a) stringify_(a)
#define stringify_(a) #a
#if defined(_DEBUG)
#define ORBISLIB_BUILDSTRING ("[OrbisLib Daemon " stringify(ORBISLIB_MAJOR) "." stringify(ORBISLIB_MINOR) "] Dev Build " stringify(ORBISLIB_BUILDVERSION) " " __DATE__ " " __TIME__)
#else
#define ORBISLIB_BUILDSTRING ("[OrbisLib Daemon " stringify(ORBISLIB_MAJOR) "." stringify(ORBISLIB_MINOR) "] Build " stringify(ORBISLIB_BUILDVERSION) " " __DATE__ " " __TIME__)
#endif
@@ -0,0 +1,816 @@
#!/usr/bin/env python
import sys, os, struct, traceback
import hashlib, hmac
import argparse, re, string
def int_with_base_type(val):
return int(val, 0)
def try_parse_int(x, base=0):
try:
return int(x, base) if isinstance(x, str) else int(x)
except:
return None
def align_up(x, alignment):
return (x + (alignment - 1)) & ~(alignment - 1)
def align_down(x, alignment):
return x & ~(alignment - 1)
def ilog2(x):
if x <= 0:
raise ValueError('math domain error')
return len(bin(x)) - 3
def is_intervals_overlap(p1, p2):
return p1[0] <= p2[1] and p1[1] <= p2[0]
def check_file_magic(f, expected_magic):
old_offset = f.tell()
try:
magic = f.read(len(expected_magic))
except:
return False
finally:
f.seek(old_offset)
return magic == expected_magic
def parse_version(version):
major, minor, patch = (version >> 8) & 0xFF, version & 0xFF, 0 # FIXME
major = 10 * (major >> 4) + (major & 0xF)
minor = 10 * (minor >> 4) + (minor & 0xF)
return '{0:d}.{1:02d}.{2:03d}'.format(major, minor, patch)
def sha256(data):
return hashlib.sha256(data).digest()
def hmac_sha256(key, data):
return hmac.new(key=key, msg=data, digestmod=hashlib.sha256).digest()
class ElfError(Exception):
def __init__(self, msg):
self.msg = msg
def __str__(self):
return repr(self.msg)
class ElfEHdr(object):
FMT = '<4s5B6xB'
EX_FMT = '<2HI3QI6H'
MAGIC = '\x7FELF'
CLASS64 = 0x2
DATA2LSB = 0x1
EM_X86_64 = 0x3E
EV_CURRENT = 0x1
ET_EXEC = 0x2
ET_SCE_EXEC = 0xFE00
ET_SCE_EXEC_ASLR = 0xFE10
ET_SCE_DYNAMIC = 0xFE18
def __init__(self):
self.magic = None
self.machine_class = None
self.data_encoding = None
self.version = None
self.os_abi = None
self.abi_version = None
self.nident_size = None
self.type = None
self.machine = None
self.version = None
self.entry = None
self.phoff = None
self.shoff = None
self.flags = None
self.ehsize = None
self.phentsize = None
self.phnum = None
self.shentsize = None
self.shnum = None
self.shstridx = None
def load(self, f):
#if not check_file_magic(f, ElfEHdr.MAGIC):
# raise ElfError('Invalid magic.')
self.magic, self.machine_class, self.data_encoding, self.version, self.os_abi, self.abi_version, self.nident_size = struct.unpack(ElfEHdr.FMT, f.read(struct.calcsize(ElfEHdr.FMT)))
if self.machine_class != ElfEHdr.CLASS64 or self.data_encoding != ElfEHdr.DATA2LSB:
raise ElfError('Unsupported class or data encoding.')
self.type, self.machine, self.version, self.entry, self.phoff, self.shoff, self.flags, self.ehsize, self.phentsize, self.phnum, self.shentsize, self.shnum, self.shstridx = struct.unpack(ElfEHdr.EX_FMT, f.read(struct.calcsize(ElfEHdr.EX_FMT)))
if self.machine != ElfEHdr.EM_X86_64 or self.version != ElfEHdr.EV_CURRENT:
raise ElfError('Unsupported machine type or version.')
if self.phentsize != struct.calcsize(ElfPHdr.FMT) or (self.shentsize > 0 and self.shentsize != struct.calcsize(ElfSHdr.FMT)):
raise ElfError('Unsupported header entry size.')
if self.type not in [ElfEHdr.ET_EXEC, ElfEHdr.ET_SCE_EXEC, ElfEHdr.ET_SCE_EXEC_ASLR, ElfEHdr.ET_SCE_DYNAMIC]:
raise ElfError('Unsupported type.')
def save(self, f):
f.write(struct.pack(ElfEHdr.FMT, self.magic, self.machine_class, self.data_encoding, self.version, self.os_abi, self.abi_version, self.nident_size))
f.write(struct.pack(ElfEHdr.EX_FMT, self.type, self.machine, self.version, self.entry, self.phoff, self.shoff, self.flags, self.ehsize, self.phentsize, self.phnum, self.shentsize, self.shnum, self.shstridx))
def has_segments(self):
return self.phentsize > 0 and self.phnum > 0
def has_sections(self):
return self.shentsize > 0 and self.shnum > 0
class ElfPHdr(object):
FMT = '<2I6Q'
PT_LOAD = 0x1
PT_DYNAMIC = 0x2
PT_INTERP = 0x3
PT_TLS = 0x7
PT_GNU_EH_FRAME = 0x6474E550
PT_GNU_STACK = 0x6474E551
PT_SCE_RELA = 0x60000000,
PT_SCE_DYNLIBDATA = 0x61000000
PT_SCE_PROCPARAM = 0x61000001
PT_SCE_MODULE_PARAM = 0x61000002
PT_SCE_RELRO = 0x61000010
PT_SCE_COMMENT = 0x6FFFFF00
PT_SCE_VERSION = 0x6FFFFF01
PF_EXEC = 0x1
PF_WRITE = 0x2
PF_READ = 0x4
PF_READ_EXEC = PF_READ | PF_EXEC
PF_READ_WRITE = PF_READ | PF_WRITE
def __init__(self, idx):
self.idx = idx
self.type = None
self.flags = None
self.offset = None
self.vaddr = None
self.paddr = None
self.filesz = None
self.memsz = None
self.align = None
def load(self, f):
self.type, self.flags, self.offset, self.vaddr, self.paddr, self.filesz, self.memsz, self.align = struct.unpack(ElfPHdr.FMT, f.read(struct.calcsize(ElfPHdr.FMT)))
def save(self, f):
f.write(struct.pack(ElfPHdr.FMT, self.type, self.flags, self.offset, self.vaddr, self.paddr, self.filesz, self.memsz, self.align))
def name(self):
if self.type == ElfPHdr.PT_LOAD:
if (self.flags & ElfPHdr.PF_READ_EXEC) == ElfPHdr.PF_READ_EXEC:
return '.text'
elif (self.flags & ElfPHdr.PF_READ_WRITE) == ElfPHdr.PF_READ_WRITE:
return '.data'
else:
return '.load_{0:02}'.format(self.idx)
else:
return {
ElfPHdr.PT_DYNAMIC: '.dynamic',
ElfPHdr.PT_INTERP: '.interp',
ElfPHdr.PT_TLS: '.tls',
ElfPHdr.PT_GNU_EH_FRAME: '.eh_frame_hdr',
ElfPHdr.PT_SCE_DYNLIBDATA: '.sce_dynlib_data',
ElfPHdr.PT_SCE_PROCPARAM: '.sce_process_param',
ElfPHdr.PT_SCE_MODULE_PARAM: '.sce_module_param',
ElfPHdr.PT_SCE_COMMENT: '.sce_comment',
}.get(self.type, None)
def class_name(self):
if (self.flags & ElfPHdr.PF_READ_EXEC) == ElfPHdr.PF_READ_EXEC:
return 'CODE'
else:
return 'DATA'
class ElfSHdr(object):
FMT = '<2I4Q2I2Q'
def __init__(self, idx):
self.idx = idx
self.name = None
self.type = None
self.flags = None
self.addr = None
self.offset = None
self.size = None
self.link = None
self.info = None
self.align = None
self.entsize = None
def load(self, f):
self.name, self.type, self.flags, self.addr, self.offset, self.size, self.link, self.info, self.align, self.entsize = struct.unpack(ElfSHdr.FMT, f.read(struct.calcsize(ElfSHdr.FMT)))
def save(self, f):
f.write(struct.pack(ElfSHdr.FMT, self.name, self.type, self.flags, self.addr, self.offset, self.size, self.link, self.info, self.align, self.entsize))
class ElfFile(object):
def __init__(self, **kwargs):
self.ehdr = None
self.phdrs = None
self.shdrs = None
self.file_size = None
self.digest = None
self.segments = None
self.sections = None
self.ignore_shdrs = 'ignore_shdrs' in kwargs and kwargs['ignore_shdrs']
def load(self, f):
start_offset = f.tell()
data = f.read()
self.file_size = len(data)
self.digest = sha256(data)
f.seek(start_offset)
self.ehdr = ElfEHdr()
self.ehdr.load(f)
if self.ignore_shdrs:
self.ehdr.shnum = 0
self.phdrs = []
self.segments = []
if self.ehdr.has_segments():
for i in xrange(self.ehdr.phnum):
f.seek(start_offset + self.ehdr.phoff + i * self.ehdr.phentsize)
phdr = ElfPHdr(i)
phdr.load(f)
self.phdrs.append(phdr)
if phdr.filesz > 0:
f.seek(start_offset + phdr.offset)
data = f.read(phdr.filesz)
else:
data = ''
self.segments.append(data)
self.shdrs = []
self.sections = []
if self.ehdr.has_sections():
for i in xrange(self.ehdr.shnum):
f.seek(start_offset + self.ehdr.shoff + i * self.ehdr.shentsize)
shdr = ElfSHdr(i)
shdr.load(f)
self.shdrs.append(shdr)
if phdr.filesz > 0:
f.seek(start_offset + shdr.offset)
data = f.read(phdr.filesz)
else:
data = ''
self.sections.append(data)
def save(self, f, no_sections=False):
start_offset = f.tell()
self.ehdr.save(f)
if not no_sections:
if self.ehdr.has_sections():
for i in xrange(self.ehdr.shnum):
f.seek(start_offset + self.ehdr.shoff + i * self.ehdr.shentsize)
shdr = self.shdrs[i]
shdr.save(f)
if self.ehdr.has_segments():
for i in xrange(self.ehdr.phnum):
f.seek(start_offset + self.ehdr.phoff + i * self.ehdr.phentsize)
phdr = self.phdrs[i]
phdr.save(f)
DIGEST_SIZE = 0x20
SIGNATURE_SIZE = 0x100
BLOCK_SIZE = 0x4000
DEFAULT_BLOCK_SIZE = 0x1000
SELF_CONTROL_BLOCK_TYPE_NPDRM = 0x3
SELF_NPDRM_CONTROL_BLOCK_CONTENT_ID_SIZE = 0x13
SELF_NPDRM_CONTROL_BLOCK_RANDOM_PAD_SIZE = 0xD
EMPTY_DIGEST = '\0' * DIGEST_SIZE
EMPTY_SIGNATURE = '\0' * SIGNATURE_SIZE
class SignedElfEntry(object):
FMT = '<4Q'
PROPS_ORDER_SHIFT = 0
PROPS_ORDER_MASK = 0x1
PROPS_ENCRYPTED_SHIFT = 1
PROPS_ENCRYPTED_MASK = 0x1
PROPS_SIGNED_SHIFT = 2
PROPS_SIGNED_MASK = 0x1
PROPS_COMPRESSED_SHIFT = 3
PROPS_COMPRESSED_MASK = 0x1
PROPS_WINDOW_BITS_SHIFT = 8
PROPS_WINDOW_BITS_MASK = 0x7
PROPS_HAS_BLOCKS_SHIFT = 11
PROPS_HAS_BLOCKS_MASK = 0x1
PROPS_BLOCK_SIZE_SHIFT = 12
PROPS_BLOCK_SIZE_MASK = 0xF
PROPS_HAS_DIGESTS_SHIFT = 16
PROPS_HAS_DIGESTS_MASK = 0x1
PROPS_HAS_EXTENTS_SHIFT = 17
PROPS_HAS_EXTENTS_MASK = 0x1
PROPS_HAS_META_SEGMENT_SHIFT = 20
PROPS_HAS_META_SEGMENT_MASK = 0x1
PROPS_SEGMENT_INDEX_SHIFT = 20
PROPS_SEGMENT_INDEX_MASK = 0xFFFF
PROPS_DEFAULT_BLOCK_SIZE = 0x1000
PROPS_META_SEGMENT_MASK = 0xF0000
def __init__(self, index):
self.index = index
self.props = None
self.offset = None
self.filesz = None
self.memsz = None
self.data = None
def save(self, f):
f.write(struct.pack(SignedElfEntry.FMT, self.props, self.offset, self.filesz, self.memsz))
@property
def order(self):
return (self.props >> SignedElfEntry.PROPS_ORDER_SHIFT) & SignedElfEntry.PROPS_ORDER_MASK
@order.setter
def order(self, value):
self.props &= ~(SignedElfEntry.PROPS_ORDER_MASK << SignedElfEntry.PROPS_ORDER_SHIFT)
self.props |= (value & SignedElfEntry.PROPS_ORDER_MASK) << SignedElfEntry.PROPS_ORDER_SHIFT
@property
def encrypted(self):
return ((self.props >> SignedElfEntry.PROPS_ENCRYPTED_SHIFT) & SignedElfEntry.PROPS_ENCRYPTED_MASK) != 0
@encrypted.setter
def encrypted(self, value):
self.props &= ~(SignedElfEntry.PROPS_ENCRYPTED_MASK << SignedElfEntry.PROPS_ENCRYPTED_SHIFT)
if value:
self.props |= SignedElfEntry.PROPS_ENCRYPTED_MASK << SignedElfEntry.PROPS_ENCRYPTED_SHIFT
@property
def signed(self):
return ((self.props >> SignedElfEntry.PROPS_SIGNED_SHIFT) & SignedElfEntry.PROPS_SIGNED_MASK) != 0
@signed.setter
def signed(self, value):
self.props &= ~(SignedElfEntry.PROPS_SIGNED_MASK << SignedElfEntry.PROPS_SIGNED_SHIFT)
if value:
self.props |= SignedElfEntry.PROPS_SIGNED_MASK << SignedElfEntry.PROPS_SIGNED_SHIFT
@property
def compressed(self):
return ((self.props >> SignedElfEntry.PROPS_COMPRESSED_SHIFT) & SignedElfEntry.PROPS_COMPRESSED_MASK) != 0
@compressed.setter
def compressed(self, value):
self.props &= ~(SignedElfEntry.PROPS_COMPRESSED_MASK << SignedElfEntry.PROPS_COMPRESSED_SHIFT)
if value:
self.props |= SignedElfEntry.PROPS_COMPRESSED_MASK << SignedElfEntry.PROPS_COMPRESSED_SHIFT
@property
def has_blocks(self):
return ((self.props >> SignedElfEntry.PROPS_HAS_BLOCKS_SHIFT) & SignedElfEntry.PROPS_HAS_BLOCKS_MASK) != 0
@has_blocks.setter
def has_blocks(self, value):
self.props &= ~(SignedElfEntry.PROPS_HAS_BLOCKS_MASK << SignedElfEntry.PROPS_HAS_BLOCKS_SHIFT)
if value:
self.props |= SignedElfEntry.PROPS_HAS_BLOCKS_MASK << SignedElfEntry.PROPS_HAS_BLOCKS_SHIFT
@property
def has_digests(self):
return ((self.props >> SignedElfEntry.PROPS_HAS_DIGESTS_SHIFT) & SignedElfEntry.PROPS_HAS_DIGESTS_MASK) != 0
@has_digests.setter
def has_digests(self, value):
self.props &= ~(SignedElfEntry.PROPS_HAS_DIGESTS_MASK << SignedElfEntry.PROPS_HAS_DIGESTS_SHIFT)
if value:
self.props |= SignedElfEntry.PROPS_HAS_DIGESTS_MASK << SignedElfEntry.PROPS_HAS_DIGESTS_SHIFT
@property
def has_extents(self):
return ((self.props >> SignedElfEntry.PROPS_HAS_EXTENTS_SHIFT) & SignedElfEntry.PROPS_HAS_EXTENTS_MASK) != 0
@has_extents.setter
def has_extents(self, value):
self.props &= ~(SignedElfEntry.PROPS_HAS_EXTENTS_MASK << SignedElfEntry.PROPS_HAS_EXTENTS_SHIFT)
if value:
self.props |= SignedElfEntry.PROPS_HAS_EXTENTS_MASK << SignedElfEntry.PROPS_HAS_EXTENTS_SHIFT
@property
def has_meta_segment(self):
return ((self.props >> SignedElfEntry.PROPS_HAS_META_SEGMENT_SHIFT) & SignedElfEntry.PROPS_HAS_META_SEGMENT_MASK) != 0
@has_meta_segment.setter
def has_meta_segment(self, value):
self.props &= ~(SignedElfEntry.PROPS_HAS_META_SEGMENT_MASK << SignedElfEntry.PROPS_HAS_META_SEGMENT_SHIFT)
if value:
self.props |= SignedElfEntry.PROPS_HAS_META_SEGMENT_MASK << SignedElfEntry.PROPS_HAS_META_SEGMENT_SHIFT
@property
def wbits(self):
return (self.props >> SignedElfEntry.PROPS_WINDOW_BITS_SHIFT) & SignedElfEntry.PROPS_WINDOW_BITS_MASK
@wbits.setter
def wbits(self, value):
self.props &= ~(SignedElfEntry.PROPS_WINDOW_BITS_MASK << SignedElfEntry.PROPS_WINDOW_BITS_SHIFT)
self.props |= (value & SignedElfEntry.PROPS_WINDOW_BITS_MASK) << SignedElfEntry.PROPS_WINDOW_BITS_SHIFT
@property
def block_size(self):
if self.has_blocks:
return 1 << (12 + (self.props >> SignedElfEntry.PROPS_BLOCK_SIZE_SHIFT) & SignedElfEntry.PROPS_BLOCK_SIZE_MASK)
else:
return DEFAULT_BLOCK_SIZE
@block_size.setter
def block_size(self, value):
self.props &= ~(SignedElfEntry.PROPS_BLOCK_SIZE_MASK << SignedElfEntry.PROPS_BLOCK_SIZE_SHIFT)
if self.has_blocks:
value = ilog2(value) - 12
else:
value = 0 # TODO: check
self.props |= (value & SignedElfEntry.PROPS_BLOCK_SIZE_MASK) << SignedElfEntry.PROPS_BLOCK_SIZE_SHIFT
@property
def segment_index(self):
return (self.props >> SignedElfEntry.PROPS_SEGMENT_INDEX_SHIFT) & SignedElfEntry.PROPS_SEGMENT_INDEX_MASK
@wbits.setter
def segment_index(self, value):
self.props &= ~(SignedElfEntry.PROPS_SEGMENT_INDEX_MASK << SignedElfEntry.PROPS_SEGMENT_INDEX_SHIFT)
self.props |= (value & SignedElfEntry.PROPS_SEGMENT_INDEX_MASK) << SignedElfEntry.PROPS_SEGMENT_INDEX_SHIFT
def is_meta_segment(self): # TODO: check
return (self.props & SignedElfEntry.PROPS_META_SEGMENT_MASK) != 0
def __repr__(self):
return 'prs:0x{0:X} ofs:0x{1:X} fsz:0x{2:X} msz:0x{3:X}'.format(self.props, self.offset, self.filesz, self.memsz)
class SignedElfExInfo(object):
FMT = '<4Q32s'
PTYPE_FAKE = 0x1
PTYPE_NPDRM_EXEC = 0x4
PTYPE_NPDRM_DYNLIB = 0x5
PTYPE_SYSTEM_EXEC = 0x8
PTYPE_SYSTEM_DYNLIB = 0x9 # including Mono binaries
PTYPE_HOST_KERNEL = 0xC
PTYPE_SECURE_MODULE = 0xE
PTYPE_SECURE_KERNEL = 0xF
def __init__(self):
self.paid = None
self.ptype = None
self.app_version = None
self.fw_version = None
self.digest = None
def save(self, f):
f.write(struct.pack(SignedElfExInfo.FMT, self.paid, self.ptype, self.app_version, self.fw_version, self.digest))
class SignedElfNpdrmControlBlock(object):
FMT = '<H14x19s13s'
def __init__(self):
self.type = SELF_CONTROL_BLOCK_TYPE_NPDRM
self.content_id = None
self.random_pad = None
def save(self, f):
f.write(struct.pack(SignedElfNpdrmControlBlock.FMT, self.type, self.content_id, self.random_pad))
class SignedElfMetaBlock(object):
FMT = '<80x'
def __init__(self):
pass
def save(self, f):
f.write(struct.pack(SignedElfMetaBlock.FMT))
class SignedElfMetaFooter(object):
FMT = '<48xI28x'
def __init__(self):
self.unk1 = None
def save(self, f):
f.write(struct.pack(SignedElfMetaFooter.FMT, self.unk1))
class SignedElfFile(object):
COMMON_HEADER_FMT = '<4s4B'
EXT_HEADER_FMT = '<I2HQ2H4x'
MAGIC = '\x4F\x15\x3D\x1D'
VERSION = 0x00
MODE = 0x01
ENDIAN = 0x01
ATTRIBS = 0x12
KEY_TYPE = 0x101
FLAGS_SEGMENT_SIGNED_SHIFT = 4
FLAGS_SEGMENT_SIGNED_MASK = 0x7
HAS_NPDRM = 1
def __init__(self, elf, **kwargs):
self.elf = elf
self.magic = None
self.version = None
self.mode = None
self.endian = None
self.attribs = None
self.key_type = None
self.header_size = None
self.meta_size = None
self.file_size = None
self.num_entries = None
self.flags = None
self.entries = None
self.ex_info = None
self.npdrm_control_block = None
self.meta_blocks = None
self.meta_footer = None
self.signature = None
self.version_data = None
self.paid = kwargs['paid'] if 'paid' in kwargs and not kwargs['paid'] is None else 0x3100000000000002
self.ptype = kwargs['ptype'] if 'ptype' in kwargs and not kwargs['ptype'] is None else SignedElfExInfo.PTYPE_FAKE
self.app_version = kwargs['app_version'] if 'app_version' in kwargs and not kwargs['app_version'] is None else 0
self.fw_version = kwargs['fw_version'] if 'fw_version' in kwargs and not kwargs['fw_version'] is None else 0
self.auth_info = kwargs['auth_info'] if 'auth_info' in kwargs and not kwargs['auth_info'] is None else None
def _prepare(self):
self.magic = SignedElfFile.MAGIC
self.version = SignedElfFile.VERSION
self.mode = SignedElfFile.MODE
self.endian = SignedElfFile.ENDIAN
self.attribs = SignedElfFile.ATTRIBS
self.key_type = SignedElfFile.KEY_TYPE
self.flags = 0x2
signed_block_count = 2
self.flags |= (signed_block_count & SignedElfFile.FLAGS_SEGMENT_SIGNED_MASK) << SignedElfFile.FLAGS_SEGMENT_SIGNED_SHIFT
self.entries = []
entry_idx = 0
for i in xrange(self.elf.ehdr.phnum):
phdr = self.elf.phdrs[i]
if phdr.type == ElfPHdr.PT_SCE_VERSION:
self.version_data = self.elf.segments[i]
if not phdr.type in [ElfPHdr.PT_LOAD, ElfPHdr.PT_SCE_RELRO, ElfPHdr.PT_SCE_DYNLIBDATA, ElfPHdr.PT_SCE_COMMENT]:
continue
meta_entry = SignedElfEntry(entry_idx)
meta_entry.props = 0
meta_entry.encrypted = False
meta_entry.signed = True
meta_entry.has_digests = True
meta_entry.segment_index = entry_idx + 1
self.entries.append(meta_entry)
data_entry = SignedElfEntry(entry_idx + 1)
data_entry.props = 0
data_entry.encrypted = False
data_entry.signed = True
data_entry.has_blocks = True
data_entry.block_size = BLOCK_SIZE
data_entry.segment_index = i
self.entries.append(data_entry)
entry_idx += 2
self.num_entries = len(self.entries)
self.ex_info = SignedElfExInfo()
self.ex_info.paid = self.paid
self.ex_info.ptype = self.ptype
self.ex_info.app_version = self.app_version
self.ex_info.fw_version = self.fw_version
self.ex_info.digest = self.elf.digest
if SignedElfFile.HAS_NPDRM:
self.npdrm_control_block = SignedElfNpdrmControlBlock()
self.npdrm_control_block.content_id = '\0' * SELF_NPDRM_CONTROL_BLOCK_CONTENT_ID_SIZE
self.npdrm_control_block.random_pad = '\0' * SELF_NPDRM_CONTROL_BLOCK_RANDOM_PAD_SIZE
self.header_size = struct.calcsize(SignedElfFile.COMMON_HEADER_FMT) + struct.calcsize(SignedElfFile.EXT_HEADER_FMT)
self.header_size += self.num_entries * struct.calcsize(SignedElfEntry.FMT)
self.header_size += max(self.elf.ehdr.ehsize, self.elf.ehdr.phoff + self.elf.ehdr.phentsize * self.elf.ehdr.phnum)
self.header_size = align_up(self.header_size, 16)
self.header_size += struct.calcsize(SignedElfExInfo.FMT)
if SignedElfFile.HAS_NPDRM:
self.header_size += struct.calcsize(SignedElfNpdrmControlBlock.FMT)
self.meta_size = self.num_entries * struct.calcsize(SignedElfMetaBlock.FMT) + struct.calcsize(SignedElfMetaFooter.FMT) + SIGNATURE_SIZE
self.meta_blocks = []
for i in xrange(self.num_entries):
meta_block = SignedElfMetaBlock()
self.meta_blocks.append(meta_block)
self.meta_footer = SignedElfMetaFooter()
self.meta_footer.unk1 = 0x10000
if not self.auth_info is None:
self.signature = (struct.pack('<QQ', len(self.auth_info), self.ex_info.paid) + self.auth_info[8:]).ljust(SIGNATURE_SIZE, '\0')
else:
self.signature = EMPTY_SIGNATURE
entry_idx = 0
offset = self.header_size + self.meta_size
for i in xrange(self.elf.ehdr.phnum):
phdr = self.elf.phdrs[i]
if not phdr.type in [ElfPHdr.PT_LOAD, ElfPHdr.PT_SCE_RELRO, ElfPHdr.PT_SCE_DYNLIBDATA, ElfPHdr.PT_SCE_COMMENT]:
continue
print('processing segment #{0:02}...'.format(i))
meta_entry, data_entry = self.entries[entry_idx], self.entries[entry_idx + 1]
num_blocks = align_up(phdr.filesz, BLOCK_SIZE) // BLOCK_SIZE
meta_entry.data = EMPTY_DIGEST * num_blocks
meta_entry.offset = offset
meta_entry.memsz = meta_entry.filesz = len(meta_entry.data)
offset += meta_entry.filesz
offset = align_up(offset, 16)
data_entry.data = self.elf.segments[i]
data_entry.offset = offset
data_entry.memsz = data_entry.filesz = phdr.filesz
offset += data_entry.filesz
offset = align_up(offset, 16)
entry_idx += 2
self.file_size = offset
def save(self, f):
start_offset = f.tell()
# calculate neccessary fields
self._prepare()
# write common header
f.write(struct.pack(SignedElfFile.COMMON_HEADER_FMT, self.magic, self.version, self.mode, self.endian, self.attribs))
# write extended header
f.write(struct.pack(SignedElfFile.EXT_HEADER_FMT, self.key_type, self.header_size, self.meta_size, self.file_size, self.num_entries, self.flags))
# write entries
for entry in self.entries:
entry.save(f)
# write elf headers
elf_offset = f.tell()
elf_header_size = max(self.elf.ehdr.ehsize, self.elf.ehdr.phoff + self.elf.ehdr.phentsize * self.elf.ehdr.phnum)
elf_header_size = align_up(elf_header_size, 16)
self.elf.save(f, True)
f.seek(elf_offset + elf_header_size)
# write extended info
self.ex_info.save(f)
# write npdrm control block
if SignedElfFile.HAS_NPDRM:
self.npdrm_control_block.save(f)
# write meta blocks
for meta_block in self.meta_blocks:
meta_block.save(f)
# write meta footer
self.meta_footer.save(f)
# write signature
f.write(self.signature)
# write segments
for entry in self.entries:
f.seek(start_offset + entry.offset)
f.write(entry.data)
# write version
if not self.version_data is None:
f.write(self.version_data)
def ensure_hex_string(val, **kwargs):
exact_size = int(kwargs['exact_size']) if 'exact_size' in kwargs else None
min_size = int(kwargs['min_size']) if 'min_size' in kwargs else None
max_size = int(kwargs['max_size']) if 'max_size' in kwargs else None
val = re.sub('\s+', '', val)
val_size = len(val)
if val_size > 0:
if val.startswith('0x') or val.startswith('0X'):
val = val[2:]
if len(val) % 2 != 0 or not all(x in string.hexdigits for x in val):
return None
val = val.decode('hex')
val_size = len(val)
if not exact_size is None and val_size != exact_size:
return None
else:
if not min_size is None and val_size < min_size:
return None
if not max_size is None and val_size > max_size:
return None
return val
def input_file_type(val):
if not os.access(val, os.F_OK | os.R_OK) or not os.path.isfile(val):
raise argparse.ArgumentTypeError('invalid input file: {0}'.format(val))
return val
def output_file_type(val):
if os.access(val, os.F_OK) and (not os.path.isfile(val) or not os.access(val, os.F_OK | os.W_OK)):
raise argparse.ArgumentTypeError('invalid output file: {0}'.format(val))
return val
def auth_info_type(val):
new_val = ensure_hex_string(val, exact_size=0x88)
if new_val is None:
raise argparse.ArgumentTypeError('invalid auth info: {0}'.format(val))
return new_val
class MyParser(argparse.ArgumentParser):
def error(self, message):
self.print_help()
sys.stderr.write('\nerror: {0}\n'.format(message))
sys.exit(2)
parser = MyParser(description='fake signed elf maker')
parser.add_argument('input', type=input_file_type, default=None, help='elf/prx file path')
parser.add_argument('output', type=output_file_type, default=None, help='self/sprx file path')
parser.add_argument('--paid', type=int_with_base_type, default=0x3100000000000002, help='program authentication id')
parser.add_argument('--ptype', default=None, help='program type {fake, npdrm_exec, npdrm_dynlib, system_exec, system_dynlib, host_kernel, secure_module, secure_kernel}')
parser.add_argument('--app-version', type=int_with_base_type, default=0, help='application version')
parser.add_argument('--fw-version', type=int_with_base_type, default=0, help='firmware version')
parser.add_argument('--auth-info', type=auth_info_type, default=None, help='authentication info')
if len(sys.argv) == 1:
parser.print_usage()
sys.exit(1)
args = parser.parse_args()
paid = args.paid
if not (0 <= paid <= 0xFFFFFFFFFFFFFFFF):
parser.error('invalid program authentication id: 0x{0:016X}'.format(paid))
ptype = SignedElfExInfo.PTYPE_FAKE
if not args.ptype is None:
ptype = {
'fake': SignedElfExInfo.PTYPE_FAKE,
'npdrm_exec': SignedElfExInfo.PTYPE_NPDRM_EXEC,
'npdrm_dynlib': SignedElfExInfo.PTYPE_NPDRM_DYNLIB,
'system_exec': SignedElfExInfo.PTYPE_SYSTEM_EXEC,
'system_dynlib': SignedElfExInfo.PTYPE_SYSTEM_DYNLIB,
'host_kernel': SignedElfExInfo.PTYPE_HOST_KERNEL,
'secure_module': SignedElfExInfo.PTYPE_SECURE_MODULE,
'secure_kernel': SignedElfExInfo.PTYPE_SECURE_KERNEL,
}.get(args.ptype.strip().lower(), None)
if ptype is None:
ptype = try_parse_int(args.ptype)
if ptype is None:
parser.error('invalid program type: 0x{0:016X}'.format(ptype))
if not (0 <= ptype <= 0xFFFFFFFFFFFFFFFF):
parser.error('invalid program type: 0x{0:016X}'.format(ptype))
app_version = args.app_version
if not (0 <= app_version <= 0xFFFFFFFFFFFFFFFF):
parser.error('invalid application version: 0x{0:016X}'.format(app_version))
fw_version = args.fw_version
if not (0 <= fw_version <= 0xFFFFFFFFFFFFFFFF):
parser.error('invalid firmware version: 0x{0:016X}'.format(fw_version))
auth_info = args.auth_info
elf_file_path = args.input
fself_file_path = args.output
print('loading elf file: {0}'.format(elf_file_path))
try:
with open(elf_file_path, 'rb') as f:
elf_file = ElfFile(ignore_shdrs=True)
elf_file.load(f)
except Exception as err:
traceback.print_exc()
print('')
parser.error('unable to load elf file: {0} ({1})'.format(elf_file_path, err))
print('saving fake signed elf file: {0}'.format(fself_file_path))
try:
with open(fself_file_path, 'wb') as f:
self_file = SignedElfFile(elf_file, paid=paid, ptype=ptype, app_version=app_version, fw_version=fw_version, auth_info=auth_info)
self_file.save(f)
except Exception as err:
traceback.print_exc()
print('')
parser.error('unable to save fself file: {0} ({1})'.format(elf_file_path, err))
print('done')
+7
View File
@@ -0,0 +1,7 @@
// stdafx.cpp : source file that includes just the standard includes
// OrbisLibAPI-2.0.pch will be the pre-compiled header
#include "stdafx.h"
// TODO: reference any additional headers you need in STDAFX.H
// and not in this file
+20
View File
@@ -0,0 +1,20 @@
#pragma once
#include <stdlib.h>
#include <mutex>
#include <vector>
#include <queue>
#include <functional>
#include <thread>
#include <kernel.h>
#include <net.h>
#include <user_service.h>
#include <system_service.h>
#include <libdbg.h>
#include "Version.h"
#include "Config.h"
#include "Utilities.h"
#include "ThreadPool.h"
#include "Sockets.h"
#include "Events.h"
+65
View File
@@ -0,0 +1,65 @@
#include "Common.h"
#include "ByteStream.h"
ByteStream::ByteStream(std::vector<unsigned char> data)
{
Data = data;
}
ByteStream::~ByteStream()
{
}
int ByteStream::ReadInt(bool littleEndian)
{
int value = 0;
// Convert the data to int depending on the endianess.
if (littleEndian)
{
for (int j = 0; j < sizeof(int); j++) {
value |= Data[j] << (8 * j);
}
}
else
{
for (int j = sizeof(int) - 1; j >= 0; j--) {
value |= Data[j] << (8 * (sizeof(int) - j - 1));
}
}
// Remove this data from the stream.
Data.erase(Data.begin(), Data.begin() + sizeof(int));
// return the int.
return value;
}
std::string ByteStream::ReadString(int length)
{
// Read the string.
std::string tempStr(Data.begin(), Data.begin() + length);
// Erase this data from the stream.
Data.erase(Data.begin(), Data.begin() + length);
// Return the desired string.
return tempStr;
}
std::vector<uint8_t> ByteStream::ReadBytes(int length)
{
std::vector<uint8_t> block;
for (size_t i = 0; i < length; i++)
{
if (i >= Data.size())
{
// Handle out-of-bounds access
break;
}
block.push_back(Data.at(i));
}
return block;
}
+16
View File
@@ -0,0 +1,16 @@
#pragma once
class ByteStream
{
public:
ByteStream(std::vector<uint8_t> data);
~ByteStream();
int ReadInt(bool littleEndian = true);
std::string ReadString(int length);
std::vector<uint8_t> ReadBytes(int length);
private:
std::vector<uint8_t> Data;
};
+1
View File
@@ -29,6 +29,7 @@
#include <orbis/ShellCoreUtil.h>
#include <orbis/SystemStateMgr.h>
#include <memory>
#include <any>
#include "Config.h"
#include "SocketListener.h"
@@ -66,12 +66,15 @@ del /s /q /f $(IntDir)\*.oelf</NMakeCleanCommandLine>
<ClCompile Include="AppDatabase.cpp" />
<ClCompile Include="Apps.cpp" />
<ClCompile Include="Breakpoint.cpp" />
<ClCompile Include="ByteStream.cpp" />
<ClCompile Include="Debug.cpp" />
<ClCompile Include="Events.cpp" />
<ClCompile Include="Flash.cpp" />
<ClCompile Include="GeneralIPC.cpp" />
<ClCompile Include="main.cpp" />
<ClCompile Include="build.bat" />
<ClCompile Include="PacketBuilder.cpp" />
<ClCompile Include="PacketReader.cpp" />
<ClCompile Include="Proc.cpp" />
<ClCompile Include="ShellUIIPC.cpp" />
<ClCompile Include="SocketListener.cpp" />
@@ -91,12 +94,15 @@ del /s /q /f $(IntDir)\*.oelf</NMakeCleanCommandLine>
<ClInclude Include="AppDatabase.h" />
<ClInclude Include="Apps.h" />
<ClInclude Include="Breakpoint.h" />
<ClInclude Include="ByteStream.h" />
<ClInclude Include="Common.h" />
<ClInclude Include="Config.h" />
<ClInclude Include="Debug.h" />
<ClInclude Include="Events.h" />
<ClInclude Include="Flash.h" />
<ClInclude Include="GeneralIPC.h" />
<ClInclude Include="PacketBuilder.h" />
<ClInclude Include="PacketReader.h" />
<ClInclude Include="Proc.h" />
<ClInclude Include="ShellUIIPC.h" />
<ClInclude Include="SocketListener.h" />
@@ -105,6 +105,15 @@
<ClCompile Include="ThreadPool.cpp">
<Filter>Source Files\Utilities</Filter>
</ClCompile>
<ClCompile Include="PacketBuilder.cpp">
<Filter>Source Files\API</Filter>
</ClCompile>
<ClCompile Include="PacketReader.cpp">
<Filter>Source Files\API</Filter>
</ClCompile>
<ClCompile Include="ByteStream.cpp">
<Filter>Source Files\Utilities</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="Common.h">
@@ -179,5 +188,14 @@
<ClInclude Include="ThreadPool.h">
<Filter>Header Files\Utilities</Filter>
</ClInclude>
<ClInclude Include="PacketBuilder.h">
<Filter>Header Files\API</Filter>
</ClInclude>
<ClInclude Include="PacketReader.h">
<Filter>Header Files\API</Filter>
</ClInclude>
<ClInclude Include="ByteStream.h">
<Filter>Header Files\Utilities</Filter>
</ClInclude>
</ItemGroup>
</Project>
+1
View File
@@ -0,0 +1 @@
#pragma once
+120
View File
@@ -0,0 +1,120 @@
#include "Common.h"
#include "ByteStream.h"
#include "PacketReader.h"
PacketReader::PacketReader(OrbisNetId socket)
{
Socket = socket;
}
PacketReader::~PacketReader()
{
}
bool PacketReader::ReadPacket()
{
// Get the initial packet info.
auto initialPacket = std::make_unique<InitialPacket>();
if (sceNetRecv(Socket, initialPacket.get(), sizeof(InitialPacket), 0) < sizeof(InitialPacket))
{
klog("[PacketReader] Failed to recieve the initial packet\n");
return false;
}
// Make sure the packet version matches up.
if (initialPacket->Version != PacketVersion || strcmp(initialPacket->Magic, "ORBIS_SUITE"))
{
klog("[PacketReader] Packet validation failed. MagicStr '%s' and version '%d' does not meet the requirements of 'ORBIS_SUITE' and '%d'.\n", initialPacket->Magic, initialPacket->Version, PacketVersion);
return false;
}
// Read the packet data.
std::vector<unsigned char> rawData;
rawData.resize(initialPacket->Size);
if (sceNetRecv(Socket, rawData.data(), initialPacket->Size, 0) < initialPacket->Size)
{
klog("[PacketReader] Failed to recieve the packet data\n");
return false;
}
// Set the byte stream.
Data = std::make_shared<ByteStream>(rawData);
// Read the fields.
for (int i = 0; i < initialPacket->FieldCount; i++)
ReadField();
return true;
}
bool PacketReader::ReadField()
{
// Read the field type.
int fieldType = Data->ReadInt();
// Read the feild size.
int fieldSize = Data->ReadInt();
// Read the field name length.
int fieldNameLen = Data->ReadInt();
// Read the field name.
auto fieldName = Data->ReadString(fieldNameLen);
// Recieve the field data.
switch ((FieldTypes)fieldType)
{
default:
klog("[PacketReader] Unknown field type of %d\n", fieldType);
return false;
case FT_INT:
{
// Set up the field.
auto fieldTemp = std::make_shared<DataField<int>>();
fieldTemp->FieldType = fieldType;
fieldTemp->Size = fieldSize;
fieldTemp->Value = Data->ReadInt();
// Set the field into the field list.
Fields[fieldName] = (std::shared_ptr<IDataType>)fieldTemp.get();
return true;
}
case FT_STR:
{
// Set up the field.
auto fieldTemp = std::make_shared<DataField<std::string>>();
fieldTemp->FieldType = fieldType;
fieldTemp->Size = fieldSize;
// Read the string.
auto stringLen = Data->ReadInt();
fieldTemp->Value = Data->ReadString(stringLen);
// Set the field into the field list.
Fields[fieldName] = (std::shared_ptr<IDataType>)fieldTemp.get();
return true;
}
case FT_BYTES:
{
// Set up the field.
auto fieldTemp = std::make_shared<DataField<std::vector<uint8_t>>>();
fieldTemp->FieldType = fieldType;
fieldTemp->Size = fieldSize;
// Read the string.
auto stringLen = Data->ReadInt();
fieldTemp->Value = Data->ReadBytes(stringLen);
// Set the field into the field list.
Fields[fieldName] = (std::shared_ptr<IDataType>)fieldTemp.get();
return true;
}
}
}
+48
View File
@@ -0,0 +1,48 @@
#pragma once
enum FieldTypes
{
FT_INT,
FT_STR,
FT_BYTES,
};
class IDataType
{
public:
int FieldType;
int Size;
};
template <typename T>
class DataField : public IDataType
{
public:
T Value;
};
class PacketReader
{
public:
PacketReader(OrbisNetId sock);
~PacketReader();
bool ReadPacket();
bool ReadField();
private:
static const int PacketVersion = 1;
struct InitialPacket
{
char Magic[12];
int Version;
int Size;
int FieldCount;
};
OrbisNetId Socket;
std::shared_ptr<ByteStream> Data;
std::map<std::string, std::shared_ptr<IDataType>> Fields;
};
+16 -17
View File
@@ -11,25 +11,24 @@ void ThreadPool::WorkingLoop()
{
while (true)
{
std::function<void()> job;
{
std::unique_lock<std::mutex> lock(JobQueueMtx);
MtxCondition.wait(lock,
[]
{
return !JobQueue.empty() || !ShouldRun;
});
if (!ShouldRun)
return;
job = JobQueue.front();
JobQueue.pop();
}
try
{
std::function<void()> job;
{
std::unique_lock<std::mutex> lock(JobQueueMtx);
MtxCondition.wait(lock,
[]
{
return !JobQueue.empty() || !ShouldRun;
});
if (!ShouldRun)
return;
job = JobQueue.front();
JobQueue.pop();
}
job();
}
catch(const std::exception& ex)
+1 -1
View File
@@ -1,7 +1,7 @@
#pragma once
#define ORBISLIB_MAJOR 3
#define ORBISLIB_MINOR 0
#define ORBISLIB_BUILDVERSION 1169
#define ORBISLIB_BUILDVERSION 1185
#define stringify(a) stringify_(a)
#define stringify_(a) #a
#if defined(_DEBUG)
-80
View File
@@ -1,80 +0,0 @@
SETLOCAL EnableDelayedExpansion
Rem Package information
set PKG_TITLE="My Homebrew"
set PKG_VERSION="1.00"
set PKG_ASSETS="assets"
set PKG_TITLE_ID="BREW00100"
set PKG_CONTENT_ID="IV0000-BREW00100_00-MYHOMEBREW000000"
Rem Libraries to link in
set libraries=-lc -lkernel -lc++
Rem set extra_flags=
Rem Read the script arguments into local vars
set intdir=%1
set targetname=%~2
set outputPath=%3
set outputElf=%intdir%\%targetname%.elf
set outputOelf=%intdir%\%targetname%.oelf
@mkdir %intdir%
Rem Compile object files for all the source files
for %%f in (*.c) do (
clang --target=x86_64-pc-freebsd12-elf -fPIC -funwind-tables -I"%OO_PS4_TOOLCHAIN%\\include" -I"%OO_PS4_TOOLCHAIN%\\include\\c++\\v1" %extra_flags% -c -o %intdir%\%%~nf.o %%~nf.c
)
for %%f in (*.cpp) do (
clang++ --target=x86_64-pc-freebsd12-elf -fPIC -funwind-tables -I"%OO_PS4_TOOLCHAIN%\\include" -I"%OO_PS4_TOOLCHAIN%\\include\\c++\\v1" %extra_flags% -c -o %intdir%\%%~nf.o %%~nf.cpp
)
Rem Get a list of object files for linking
set obj_files=
for %%f in (%1\\*.o) do set obj_files=!obj_files! .\%%f
Rem Link the input ELF
ld.lld -m elf_x86_64 -pie --script "%OO_PS4_TOOLCHAIN%\link.x" --eh-frame-hdr -o "%outputElf%" "-L%OO_PS4_TOOLCHAIN%\\lib" %libraries% --verbose "%OO_PS4_TOOLCHAIN%\lib\crt1.o" %obj_files%
Rem Create the eboot
%OO_PS4_TOOLCHAIN%\bin\windows\create-fself.exe -in "%outputElf%" --out "%outputOelf%" --eboot "eboot.bin" --paid 0x3800000000000011
Rem Create param.sfo
%OO_PS4_TOOLCHAIN%\bin\windows\PkgTool.Core.exe sfo_new sce_sys/param.sfo
%OO_PS4_TOOLCHAIN%\bin\windows\PkgTool.Core.exe sfo_setentry sce_sys/param.sfo APP_TYPE --type Integer --maxsize 4 --value 1
%OO_PS4_TOOLCHAIN%\bin\windows\PkgTool.Core.exe sfo_setentry sce_sys/param.sfo APP_VER --type Utf8 --maxsize 8 --value %PKG_VERSION%
%OO_PS4_TOOLCHAIN%\bin\windows\PkgTool.Core.exe sfo_setentry sce_sys/param.sfo ATTRIBUTE --type Integer --maxsize 4 --value 0
%OO_PS4_TOOLCHAIN%\bin\windows\PkgTool.Core.exe sfo_setentry sce_sys/param.sfo CATEGORY --type Utf8 --maxsize 4 --value "gd"
%OO_PS4_TOOLCHAIN%\bin\windows\PkgTool.Core.exe sfo_setentry sce_sys/param.sfo CONTENT_ID --type Utf8 --maxsize 48 --value %PKG_CONTENT_ID%
%OO_PS4_TOOLCHAIN%\bin\windows\PkgTool.Core.exe sfo_setentry sce_sys/param.sfo DOWNLOAD_DATA_SIZE --type Integer --maxsize 4 --value 0
%OO_PS4_TOOLCHAIN%\bin\windows\PkgTool.Core.exe sfo_setentry sce_sys/param.sfo SYSTEM_VER --type Integer --maxsize 4 --value 0
%OO_PS4_TOOLCHAIN%\bin\windows\PkgTool.Core.exe sfo_setentry sce_sys/param.sfo TITLE --type Utf8 --maxsize 128 --value %PKG_TITLE%
%OO_PS4_TOOLCHAIN%\bin\windows\PkgTool.Core.exe sfo_setentry sce_sys/param.sfo TITLE_ID --type Utf8 --maxsize 12 --value %PKG_TITLE_ID%
%OO_PS4_TOOLCHAIN%\bin\windows\PkgTool.Core.exe sfo_setentry sce_sys/param.sfo VERSION --type Utf8 --maxsize 8 --value %PKG_VERSION%
Rem Get a list of assets for packaging
set module_files=
for %%f in (sce_module\\*) do set module_files=!module_files! sce_module/%%~nxf
set asset_audio_files=
for %%f in (assets\\audio\\*) do set asset_audio_files=!asset_audio_files! assets/audio/%%~nxf
set asset_fonts_files=
for %%f in (assets\\fonts\\*) do set asset_fonts_files=!asset_fonts_files! assets/fonts/%%~nxf
set asset_images_files=
for %%f in (assets\\images\\*) do set asset_images_files=!asset_images_files! assets/images/%%~nxf
set asset_misc_files=
for %%f in (assets\\misc\\*) do set asset_misc_files=!asset_misc_files! assets/misc/%%~nxf
set asset_videos_files=
for %%f in (assets\\videos\\*) do set asset_videos_files=!asset_videos_files! assets/videos/%%~nxf
Rem Create gp4
%OO_PS4_TOOLCHAIN%\bin\windows\create-gp4.exe -out pkg.gp4 --content-id=%PKG_CONTENT_ID% --files "eboot.bin sce_sys/about/right.sprx sce_sys/param.sfo sce_sys/icon0.png %module_files% %asset_audio_files% %asset_fonts_files% %asset_images_files% %asset_misc_files% %asset_videos_files%"
Rem Create pkg
%OO_PS4_TOOLCHAIN%\bin\windows\PkgTool.Core.exe pkg_build pkg.gp4 ..
-7
View File
@@ -1,7 +0,0 @@
#include <stdio.h>
int main()
{
// Your code here...
return 0;
}
+1 -1
View File
@@ -1,7 +1,7 @@
#pragma once
#define ORBIS_TOOLBOX_MAJOR 2
#define ORBIS_TOOLBOX_MINOR 0
#define ORBIS_TOOLBOX_BUILDVERSION 346
#define ORBIS_TOOLBOX_BUILDVERSION 347
#define stringify(a) stringify_(a)
#define stringify_(a) #a
#if defined(ORBIS_TOOLBOX_DEBUG)
+41
View File
@@ -0,0 +1,41 @@
#include <cstdint>
#include <orbis/LncUtil.h>
#include "LncUtil.h"
namespace LncUtil
{
int IsAppLaunched(const char* titleId, bool* isLaunched)
{
return sceLncUtilIsAppLaunched(titleId, isLaunched);
}
int IsAppSuspended(int appId, bool* isSuspended)
{
return sceLncUtilIsAppSuspended(appId, isSuspended);
}
int GetAppId(const char* titleId)
{
return sceLncUtilGetAppId(titleId);
}
int LaunchApp(const char* titleId, char** args, LncLaunchAppParam* appParam)
{
return sceLncUtilLaunchApp(titleId, args, (LaunchAppParam*)appParam);
}
int SuspendApp(int appId, int flags)
{
return sceLncUtilSuspendApp(appId, flags);
}
int ResumeApp(int appId, int flags)
{
return sceLncUtilResumeApp(appId, flags);
}
int SetAppFocus(int appId, int flags)
{
return sceLncUtilSetAppFocus(appId, flags);
}
};
+21
View File
@@ -0,0 +1,21 @@
#pragma once
namespace LncUtil
{
struct LncLaunchAppParam
{
unsigned int size; //0x00
int userId; //0x04
int appAttr; //0x08
int enableCrashReport; //0x0C
uint64_t checkFlag; //0x10
};
int IsAppLaunched(const char* titleId, bool* isLaunched);
int IsAppSuspended(int appId, bool* isSuspended);
int GetAppId(const char* titleId);
int LaunchApp(const char* titleId, char** args, LncLaunchAppParam* appParam);
int SuspendApp(int appId, int flags);
int ResumeApp(int appId, int flags);
int SetAppFocus(int appId, int flags);
}
@@ -12,7 +12,7 @@
</ItemGroup>
<PropertyGroup Label="Globals">
<VCProjectVersion>15.0</VCProjectVersion>
<ProjectGuid>{95716bec-ff5a-4666-b8fe-547512ca38e0}</ProjectGuid>
<ProjectGuid>{6616120a-eacc-4a05-8f48-6b9b32deee75}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
@@ -38,8 +38,10 @@
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<NMakePreprocessorDefinitions>WIN32;_DEBUG;$(NMakePreprocessorDefinitions)</NMakePreprocessorDefinitions>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<NMakeOutput>eboot.bin</NMakeOutput>
<NMakePreprocessorDefinitions>_DEBUG;$(NMakePreprocessorDefinitions)</NMakePreprocessorDefinitions>
<NMakeBuildCommandLine>call build.bat $(IntDir) "$(TargetName)" "$(SolutionDir)"</NMakeBuildCommandLine>
<NMakeReBuildCommandLine>del /s /q /f $(IntDir)\*.o
@@ -52,15 +54,22 @@ del /s /q /f $(IntDir)\*.oelf</NMakeCleanCommandLine>
<OutDir>$(SolutionDir)</OutDir>
<NMakeIncludeSearchPath>$(OO_PS4_TOOLCHAIN)\include;$(NMakeIncludeSearchPath)</NMakeIncludeSearchPath>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<NMakePreprocessorDefinitions>WIN32;NDEBUG;$(NMakePreprocessorDefinitions)</NMakePreprocessorDefinitions>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<NMakeOutput>eboot.bin</NMakeOutput>
<NMakePreprocessorDefinitions>NDEBUG;$(NMakePreprocessorDefinitions)</NMakePreprocessorDefinitions>
</PropertyGroup>
<ItemDefinitionGroup>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="main.cpp" />
<ClCompile Include="build.bat" />
<ClCompile Include="LncUtil.cpp" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="LncUtil.h" />
</ItemGroup>
<ItemGroup>
<None Include="build.bat" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
@@ -11,9 +11,16 @@
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="main.cpp">
<ClCompile Include="LncUtil.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="build.bat" />
</ItemGroup>
<ItemGroup>
<None Include="build.bat" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="LncUtil.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
</Project>
+62
View File
@@ -0,0 +1,62 @@
SETLOCAL EnableDelayedExpansion
Rem Libraries to link in
set libraries=-lc++ -lc -lkernel -lSceSystemService -lSceLncUtil -lSceUserService -lSceRegMgr -lSceFreeType -lSceSysCore -lSceSystemStateMgr
Rem Read the script arguments into local vars
set intdir=%1
set targetname=%~2
set outputPath=%~3
set outputElf=%intdir%%targetname%.elf
set outputOelf=%intdir%%targetname%.oelf
set outputPrx=%intdir%%targetname%.prx
set outputStub=%intdir%%targetname%_stub.so
Rem Compile object files for all the source files
for %%f in (*.cpp) do (
clang++ -cc1 -triple x86_64-scei-ps4-elf -I"%OO_PS4_TOOLCHAIN%\include" -I"%OO_PS4_TOOLCHAIN%\\include\\c++\\v1" -emit-obj -o %intdir%\%%~nf.o %%~nf.cpp
)
Rem Compile object files for all the assembly files
for %%f in (*.s) do (
clang -m64 -nodefaultlibs -nostdlib --target=x86_64-scei-ps4-elf -c -o %intdir%\%%~nf.o %%~nf.s
)
Rem Get a list of object files for linking
set obj_files=
for %%f in (%intdir%\\*.o) do set obj_files=!obj_files! .\%%f
Rem Link the input ELF
ld.lld -m elf_x86_64 -pie --script "%OO_PS4_TOOLCHAIN%\link.x" --eh-frame-hdr -o "%outputElf%" "-L%OO_PS4_TOOLCHAIN%\lib" %libraries% --verbose "%OO_PS4_TOOLCHAIN%\lib\crtlib.o" %obj_files%
Rem Create stub shared libraries
for %%f in (*.cpp) do (
clang++ -target x86_64-pc-linux-gnu -ffreestanding -nostdlib -fno-builtin -fPIC -c -I"%OO_PS4_TOOLCHAIN%\include" -I"%OO_PS4_TOOLCHAIN%\\include\\c++\\v1" -o %intdir%\%%~nf.o.stub %%~nf.cpp
)
set stub_obj_files=
for %%f in (%intdir%\\*.o.stub) do set stub_obj_files=!stub_obj_files! .\%%f
clang++ -target x86_64-pc-linux-gnu -shared -fuse-ld=lld -ffreestanding -nostdlib -fno-builtin "-L%OO_PS4_TOOLCHAIN%\lib" %libraries% %stub_obj_files% -o "%outputStub%"
Rem Create the prx
%OO_PS4_TOOLCHAIN%\bin\windows\create-fself.exe -in "%outputElf%" --out "%outputOelf%" --lib "%outputPrx%" --paid 0x3800000000010003
Rem Cleanup
copy "%outputPrx%" "%outputPath%\Playstation\Build\pkg\Orbis Toolbox\%targetname%.sprx"
del "%outputPrx%"
REM Generate the script. Will overwrite any existing temp.txt
echo open 1.1.0.15 2121> temp.txt
echo anonymous>> temp.txt
echo anonymous>> temp.txt
echo cd "/system/vsh/app/ORBS30000/">> temp.txt
echo send "%outputPath%\Playstation\Build\pkg\Daemons\ORBS30000\%targetname%.sprx">> temp.txt
echo quit>> temp.txt
REM Launch FTP and pass it the script
ftp -s:temp.txt
REM Clean up.
del temp.txt
+24
View File
@@ -0,0 +1,24 @@
@echo off
rem GoldHEN SDK static lib build script
rem change these if you need:
rem C compiler
set CC=clang
rem AR archiver
set AR=llvm-ar
rem usually you do not need to change the stuff below:
set CFLAGS=--target=x86_64-pc-freebsd12-elf -DORBIS=1 -D__ORBIS__=1 -DPS4=1 -DOO=1 -D__PS4__=1 -DOOPS4=1 -D__OOPS4__=1 -D__BSD_VISIBLE=1 -D_BSD_SOURCE=1 -march=btver2 -mtune=btver2 -fPIC -std=c++11 -isysroot "%OO_PS4_TOOLCHAIN%" -isystem "%OO_PS4_TOOLCHAIN%\include" -I"%OO_PS4_TOOLCHAIN%\\include\\c++\\v1" -Iinclude
rmdir /s /q build
mkdir build
for %%f in (*.cpp) do (
%CC% %CFLAGS% -c %%f -o build\%%~nf.o
)
%CC% -target x86_64-pc-linux-gnu -ffreestanding -nostdlib -fno-builtin -fPIC -isysroot "%OO_PS4_TOOLCHAIN%" -isystem "%OO_PS4_TOOLCHAIN%\include" -I"%OO_PS4_TOOLCHAIN%\\include\\c++\\v1" -Iinclude -o "%OO_PS4_TOOLCHAIN%\lib\crtlib.o"
%AR% --format=bsd rcs build\libOrbisUtils.a build\*.o "%OO_PS4_TOOLCHAIN%\lib\crtlib.o"
pause
-1
View File
@@ -141,7 +141,6 @@
LineInfoVisible="True"
ColumnInfoVisible="True"
GroupSeparatorVisible="false"
Font="Segoe UI"
InfoForeColor="186, 105, 105"
ForeColor="220, 220, 220"