Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2251,6 +2251,12 @@ add_library(${CoreLibName} ${CoreLinkType}
Core/HLE/sceNetAdhoc.h
Core/HLE/sceNetAdhocMatching.cpp
Core/HLE/sceNetAdhocMatching.h
Core/HLE/sceNetInet.cpp
Core/HLE/sceNetInet.h
Core/HLE/sceNetApctl.cpp
Core/HLE/sceNetApctl.h
Core/HLE/sceNetResolver.cpp
Core/HLE/sceNetResolver.h
Core/HLE/proAdhoc.h
Core/HLE/proAdhoc.cpp
Core/HLE/proAdhocServer.h
Expand Down Expand Up @@ -2378,6 +2384,12 @@ add_library(${CoreLibName} ${CoreLinkType}
Core/MIPS/MIPSAsm.h
Core/MIPS/MIPSTracer.cpp
Core/MIPS/MIPSTracer.h
Core/Net/InetCommon.cpp
Core/Net/InetCommon.h
Core/Net/NetResolver.cpp
Core/Net/NetResolver.h
Core/Net/InetSocket.cpp
Core/Net/InetSocket.h
Core/MemFault.cpp
Core/MemFault.h
Core/MemMap.cpp
Expand Down Expand Up @@ -2467,6 +2479,11 @@ include_directories(ext/libchdr/include)
target_link_libraries(${CoreLibName} Common native chdr kirk cityhash sfmt19937 xbrz xxhash rcheevos minimp3 at3_standalone lua ${GlslangLibs}
${CoreExtraLibs} ${OPENGL_LIBRARIES} ${X11_LIBRARIES} ${CMAKE_DL_LIBS})

# Winsock
if(WIN32)
target_link_libraries(${CoreLibName} ws2_32 winhttp)
endif()

if(NOT HTTPS_NOT_AVAILABLE)
target_link_libraries(${CoreLibName} naett)
if(WIN32)
Expand Down
11 changes: 11 additions & 0 deletions Core/Config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1244,6 +1244,10 @@ void Config::Load(const char *iniFileName, const char *controllerIniFilename) {
mPostShaderSetting[key] = std::stof(value);
}

const Section *hostOverrideSetting = iniFile.GetOrCreateSection("HostAliases");
// TODO: relocate me before PR
mHostToAlias = hostOverrideSetting->ToMap();

// Load post process shader names
vPostShaderNames.clear();
for (const auto& it : postShaderChain->ToMap()) {
Expand Down Expand Up @@ -1376,6 +1380,13 @@ bool Config::Save(const char *saveReason) {
}
}

// TODO: relocate me before PR
Section *hostOverrideSetting = iniFile.GetOrCreateSection("HostAliases");
hostOverrideSetting->Clear();
for (auto& it : mHostToAlias) {
hostOverrideSetting->Set(it.first.c_str(), it.second.c_str());
}

Section *control = iniFile.GetOrCreateSection("Control");
control->Delete("DPadRadius");

Expand Down
2 changes: 2 additions & 0 deletions Core/Config.h
Original file line number Diff line number Diff line change
Expand Up @@ -458,6 +458,7 @@ struct Config {
// Networking
std::string proAdhocServer;
bool bEnableWlan;
std::map<std::string, std::string> mHostToAlias; // TODO: mPostShaderSetting
bool bEnableAdhocServer;
bool bEnableUPnP;
bool bUPnPUseOriginalPort;
Expand All @@ -482,6 +483,7 @@ struct Config {
int iFirmwareVersion;
bool bBypassOSKWithKeyboard;


// Virtual reality
bool bEnableVR;
bool bEnable6DoF;
Expand Down
12 changes: 12 additions & 0 deletions Core/Core.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -572,6 +572,9 @@
<ClCompile Include="HLE\KUBridge.cpp" />
<ClCompile Include="HLE\Plugins.cpp" />
<ClCompile Include="HLE\sceKernelHeap.cpp" />
<ClCompile Include="HLE\sceNetApctl.cpp" />
<ClCompile Include="HLE\sceNetInet.cpp" />
<ClCompile Include="HLE\sceNetResolver.cpp" />
<ClCompile Include="HLE\sceNp2.cpp" />
<ClCompile Include="HLE\sceUsbAcc.cpp" />
<ClCompile Include="HLE\sceUsbCam.cpp" />
Expand Down Expand Up @@ -625,6 +628,9 @@
<ClCompile Include="MIPS\x86\X64IRCompSystem.cpp" />
<ClCompile Include="MIPS\x86\X64IRCompVec.cpp" />
<ClCompile Include="MIPS\x86\X64IRJit.cpp" />
<ClCompile Include="Net\InetCommon.cpp" />
<ClCompile Include="Net\InetSocket.cpp" />
<ClCompile Include="Net\NetResolver.cpp" />
<ClCompile Include="Replay.cpp" />
<ClCompile Include="Compatibility.cpp" />
<ClCompile Include="Config.cpp" />
Expand Down Expand Up @@ -1185,6 +1191,9 @@
<ClInclude Include="HLE\KUBridge.h" />
<ClInclude Include="HLE\Plugins.h" />
<ClInclude Include="HLE\sceKernelHeap.h" />
<ClInclude Include="HLE\sceNetApctl.h" />
<ClInclude Include="HLE\sceNetInet.h" />
<ClInclude Include="HLE\sceNetResolver.h" />
<ClInclude Include="HLE\sceNp2.h" />
<ClInclude Include="HLE\sceUsbAcc.h" />
<ClInclude Include="HLE\sceUsbCam.h" />
Expand All @@ -1211,6 +1220,9 @@
<ClInclude Include="MIPS\RiscV\RiscVJit.h" />
<ClInclude Include="MIPS\RiscV\RiscVRegCache.h" />
<ClInclude Include="MIPS\x86\X64IRJit.h" />
<ClInclude Include="Net\InetCommon.h" />
<ClInclude Include="Net\InetSocket.h" />
<ClInclude Include="Net\NetResolver.h" />
<ClInclude Include="Replay.h" />
<ClInclude Include="Compatibility.h" />
<ClInclude Include="Config.h" />
Expand Down
39 changes: 39 additions & 0 deletions Core/Core.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,9 @@
<Filter Include="MIPS\RiscV">
<UniqueIdentifier>{067e3128-3aaf-4ed1-b19e-bab11606abe7}</UniqueIdentifier>
</Filter>
<Filter Include="Net">
<UniqueIdentifier>{f1b3f688-26eb-4121-9914-e9e19ab04bcd}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="ELF\ElfReader.cpp">
Expand Down Expand Up @@ -1321,6 +1324,24 @@
<ClCompile Include="Dialog\PSPOskConstants.cpp">
<Filter>Dialog</Filter>
</ClCompile>
<ClCompile Include="HLE\sceNetApctl.cpp">
<Filter>HLE\Libraries</Filter>
</ClCompile>
<ClCompile Include="HLE\sceNetInet.cpp">
<Filter>HLE\Libraries</Filter>
</ClCompile>
<ClCompile Include="HLE\sceNetResolver.cpp">
<Filter>HLE\Libraries</Filter>
</ClCompile>
<ClCompile Include="Net\InetCommon.cpp">
<Filter>Net</Filter>
</ClCompile>
<ClCompile Include="Net\NetResolver.cpp">
<Filter>Net</Filter>
</ClCompile>
<ClCompile Include="Net\InetSocket.cpp">
<Filter>Net</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="ELF\ElfReader.h">
Expand Down Expand Up @@ -2121,6 +2142,24 @@
<ClInclude Include="Dialog\PSPOskConstants.h">
<Filter>Dialog</Filter>
</ClInclude>
<ClInclude Include="HLE\sceNetApctl.h">
<Filter>HLE\Libraries</Filter>
</ClInclude>
<ClInclude Include="HLE\sceNetInet.h">
<Filter>HLE\Libraries</Filter>
</ClInclude>
<ClInclude Include="HLE\sceNetResolver.h">
<Filter>HLE\Libraries</Filter>
</ClInclude>
<ClInclude Include="Net\InetCommon.h">
<Filter>Net</Filter>
</ClInclude>
<ClInclude Include="Net\NetResolver.h">
<Filter>Net</Filter>
</ClInclude>
<ClInclude Include="Net\InetSocket.h">
<Filter>Net</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<None Include="..\LICENSE.TXT" />
Expand Down
25 changes: 25 additions & 0 deletions Core/HLE/FunctionWrappers.h
Original file line number Diff line number Diff line change
Expand Up @@ -438,11 +438,21 @@ template<int func(int, int, int, u32, int)> void WrapI_IIIUI() {
RETURN(retval);
}

template<int func(int, int, int, u32, u32)> void WrapI_IIIUU() {
int retval = func(PARAM(0), PARAM(1), PARAM(2), PARAM(3), PARAM(4));
RETURN(retval);
}

template<int func(int, u32, u32, int, int)> void WrapI_IUUII() {
int retval = func(PARAM(0), PARAM(1), PARAM(2), PARAM(3), PARAM(4));
RETURN(retval);
}

template<int func(int, u32, u32, int, int, int)> void WrapI_IUUIII() {
int retval = func(PARAM(0), PARAM(1), PARAM(2), PARAM(3), PARAM(4), PARAM(5));
RETURN(retval);
}

template<int func(int, const char *, int, u32, u32)> void WrapI_ICIUU() {
int retval = func(PARAM(0), Memory::GetCharPointer(PARAM(1)), PARAM(2), PARAM(3), PARAM(4));
RETURN(retval);
Expand Down Expand Up @@ -699,6 +709,11 @@ template<int func(int, u32, u32, u32, u32, u32)> void WrapI_IUUUUU() {
RETURN(retval);
}

template<int func(int, u32, u32, int, u32, u32)> void WrapI_IUUIUU() {
int retval = func(PARAM(0), PARAM(1), PARAM(2), PARAM(3), PARAM(4), PARAM(5));
RETURN(retval);
}

template<int func(int, u32, int, int)> void WrapI_IUII() {
int retval = func(PARAM(0), PARAM(1), PARAM(2), PARAM(3));
RETURN(retval);
Expand Down Expand Up @@ -755,6 +770,11 @@ template<int func(int, u32, u32, u32)> void WrapI_IUUU() {
RETURN(retval);
}

template<int func(int, u32, u32, int)> void WrapI_IUUI() {
int retval = func(PARAM(0), PARAM(1), PARAM(2), PARAM(3));
RETURN(retval);
}

template<int func(int, u32, u32)> void WrapI_IUU() {
int retval = func(PARAM(0), PARAM(1), PARAM(2));
RETURN(retval);
Expand Down Expand Up @@ -800,6 +820,11 @@ template <int func(int, const char *, int)> void WrapI_ICI() {
RETURN(retval);
}

template <int func(int, const char *, u32)> void WrapI_ICU() {
int retval = func(PARAM(0), Memory::GetCharPointer(PARAM(1)), PARAM(2));
RETURN(retval);
}

template<int func(int, void *, void *, void *, void *, u32, int)> void WrapI_IVVVVUI(){
u32 retval = func(PARAM(0), Memory::GetPointerWrite(PARAM(1)), Memory::GetPointerWrite(PARAM(2)), Memory::GetPointerWrite(PARAM(3)), Memory::GetPointerWrite(PARAM(4)), PARAM(5), PARAM(6) );
RETURN(retval);
Expand Down
4 changes: 4 additions & 0 deletions Core/HLE/HLETables.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,8 @@
#include "sceSfmt19937.h"
#include "sceG729.h"
#include "KUBridge.h"
#include "sceNetInet.h"
#include "sceNetResolver.h"

#define N(s) s

Expand Down Expand Up @@ -313,6 +315,8 @@ void RegisterAllModules() {
Register_mp4msv();
Register_InterruptManagerForKernel();
Register_sceSircs();
Register_sceNetInet();
Register_sceNetResolver();
// add new modules here.
}

1 change: 1 addition & 0 deletions Core/HLE/proAdhoc.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
#include "Core/HLE/sceKernelMutex.h"
#include "Core/HLE/sceUtility.h"

// TODO: move this to some common set
#ifdef _WIN32
#undef errno
#undef ESHUTDOWN
Expand Down
Loading