From 98dba643f43b42d5752798a4bff540923a75499d Mon Sep 17 00:00:00 2001 From: AdamN Date: Wed, 20 Dec 2023 08:29:01 +0700 Subject: [PATCH] =?UTF-8?q?=EF=BB=BFJust=20the=20sceUtility=20changes=20fr?= =?UTF-8?q?om=20ANR2ME's=20branch?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Common/Net/HTTPClient.cpp | 1 + Common/Net/HTTPClient.h | 2 +- Core/HLE/FunctionWrappers.h | 20 ++- Core/HLE/sceKernel.cpp | 1 + Core/HLE/sceNet.cpp | 3 + Core/HLE/sceNet.h | 2 + Core/HLE/sceUtility.cpp | 248 +++++++++++++++++++++++++++++++++++- Core/HLE/sceUtility.h | 30 +++++ 8 files changed, 298 insertions(+), 9 deletions(-) diff --git a/Common/Net/HTTPClient.cpp b/Common/Net/HTTPClient.cpp index 6d1aa1743a..ae5ef4cdf4 100644 --- a/Common/Net/HTTPClient.cpp +++ b/Common/Net/HTTPClient.cpp @@ -235,6 +235,7 @@ constexpr const char *HTTP_VERSION = "1.1"; Client::Client() { userAgent_ = DEFAULT_USERAGENT; + httpVersion_ = HTTP_VERSION; } Client::~Client() { diff --git a/Common/Net/HTTPClient.h b/Common/Net/HTTPClient.h index 0c5d978fb5..fb7a691ae3 100644 --- a/Common/Net/HTTPClient.h +++ b/Common/Net/HTTPClient.h @@ -88,8 +88,8 @@ public: } protected: - std::string httpVersion_; std::string userAgent_; + const char* httpVersion_; double dataTimeout_ = 900.0; }; diff --git a/Core/HLE/FunctionWrappers.h b/Core/HLE/FunctionWrappers.h index 477c128e18..7480e2f881 100644 --- a/Core/HLE/FunctionWrappers.h +++ b/Core/HLE/FunctionWrappers.h @@ -503,6 +503,11 @@ template void WrapI_CU() { RETURN(retval); } +template void WrapI_ICU() { + int retval = func(PARAM(0), Memory::GetCharPointer(PARAM(1)), PARAM(2)); + RETURN(retval); +} + template void WrapI_CUI() { int retval = func(Memory::GetCharPointer(PARAM(0)), PARAM(1), PARAM(2)); RETURN(retval); @@ -785,6 +790,16 @@ template void WrapI_IUUI() { RETURN(retval); } +template void WrapI_IUIIUU() { + int retval = func(PARAM(0), PARAM(1), PARAM(2), PARAM(3), PARAM(4), PARAM(5)); + RETURN(retval); +} + +template void WrapI_IUIIUI() { + int retval = func(PARAM(0), PARAM(1), PARAM(2), PARAM(3), PARAM(4), PARAM(5)); + RETURN(retval); +} + template void WrapI_IUU() { int retval = func(PARAM(0), PARAM(1), PARAM(2)); RETURN(retval); @@ -835,11 +850,6 @@ template void WrapI_ICI() { RETURN(retval); } -template void WrapI_ICU() { - int retval = func(PARAM(0), Memory::GetCharPointer(PARAM(1)), PARAM(2)); - RETURN(retval); -} - template 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); diff --git a/Core/HLE/sceKernel.cpp b/Core/HLE/sceKernel.cpp index bdd5fcd4ae..787aed0f97 100644 --- a/Core/HLE/sceKernel.cpp +++ b/Core/HLE/sceKernel.cpp @@ -90,6 +90,7 @@ #include "sceOpenPSID.h" #include "sceHttp.h" #include "Core/Util/PPGeDraw.h" +#include "sceHttp.h" /* 17: [MIPS32 R4K 00000000 ]: Loader: Type: 1 Vaddr: 00000000 Filesz: 2856816 Memsz: 2856816 diff --git a/Core/HLE/sceNet.cpp b/Core/HLE/sceNet.cpp index 3289f283a3..0dbe8d8ef2 100644 --- a/Core/HLE/sceNet.cpp +++ b/Core/HLE/sceNet.cpp @@ -78,6 +78,9 @@ static struct SceNetMallocStat netMallocStat; static std::map apctlHandlers; +std::string defaultNetConfigName = "NetConf"; +std::string defaultNetSSID = "Wifi"; // fake AP/hotspot +int netApctlInfoId = 0; SceNetApctlInfoInternal netApctlInfo; bool netApctlInited; diff --git a/Core/HLE/sceNet.h b/Core/HLE/sceNet.h index 2a60a88c94..b636ae1c65 100644 --- a/Core/HLE/sceNet.h +++ b/Core/HLE/sceNet.h @@ -247,6 +247,8 @@ extern bool netInetInited; extern bool netApctlInited; extern u32 netApctlState; extern SceNetApctlInfoInternal netApctlInfo; +extern std::string defaultNetConfigName; +extern std::string defaultNetSSID; template std::string num2hex(I w, size_t hex_len = sizeof(I) << 1); std::string error2str(u32 errorcode); diff --git a/Core/HLE/sceUtility.cpp b/Core/HLE/sceUtility.cpp index 39e547e295..fc3683442c 100644 --- a/Core/HLE/sceUtility.cpp +++ b/Core/HLE/sceUtility.cpp @@ -41,6 +41,7 @@ #include "Core/HLE/sceKernelThread.h" #include "Core/HLE/scePower.h" #include "Core/HLE/sceUtility.h" +#include "Core/HLE/sceNet.h" #include "Core/Dialog/PSPSaveDialog.h" #include "Core/Dialog/PSPMsgDialog.h" @@ -66,6 +67,8 @@ #define PSP_USB_MODULE_CAM 4 // Requires PSP_USB_MODULE_ACC loading first #define PSP_USB_MODULE_GPS 5 // Requires PSP_USB_MODULE_ACC loading first +const int SCE_ERROR_NETPARAM_BAD_NETCONF = 0x80110601; +const int SCE_ERROR_NETPARAM_BAD_PARAM = 0x80110604; const int SCE_ERROR_MODULE_BAD_ID = 0x80111101; const int SCE_ERROR_MODULE_ALREADY_LOADED = 0x80111102; const int SCE_ERROR_MODULE_NOT_LOADED = 0x80111103; @@ -148,6 +151,7 @@ static HLEHelperThread *accessThread = nullptr; static bool accessThreadFinished = true; static const char *accessThreadState = "initial"; static int lastSaveStateVersion = -1; +static int netParamLatestId = 1; static void CleanupDialogThreads(bool force = false) { if (accessThread) { @@ -705,14 +709,252 @@ static int sceUtilityNetconfGetStatus() { return hleLogSuccessVerboseI(Log::sceUtility, status); } +/** +* Check existence of a Net Configuration +* +* @param id - id of net Configuration (1 to n) +* @return 0 on success +* +* Note: some homebrew may only support a limited number of entries (ie. 10 entries) +*/ static int sceUtilityCheckNetParam(int id) { bool available = (id >= 0 && id <= 24); - int ret = available ? 0 : 0X80110601; + // We only have 1 faked net config entry + if (id > PSP_NETPARAM_MAX_NUMBER_DUMMY_ENTRIES) { + available = false; + } + int ret = available ? 0 : SCE_ERROR_NETPARAM_BAD_NETCONF; DEBUG_LOG(Log::sceUtility, "%08x=sceUtilityCheckNetParam(%d)", ret, id); return ret; } +/** +* Get Net Configuration Parameter +* +* @param conf - Net Configuration number (1 to n) (0 returns valid but seems to be a copy of the last config requested) +* @param param - which parameter to get +* @param data - parameter data +* @return 0 on success +*/ +static int sceUtilityGetNetParam(int id, int param, u32 dataAddr) { + DEBUG_LOG(Log::sceUtility, "sceUtilityGetNetParam(%d, %d, %08x)", id, param, dataAddr); + if (id < 0 || id > 24) { + return hleLogWarning(Log::sceUtility, SCE_ERROR_NETPARAM_BAD_NETCONF, "invalid id=%d", id); + } + + // TODO: Replace the temporary netApctlInfo with netConfInfo, since some of netApctlInfo contents supposed to be taken from netConfInfo during ApctlInit, while sceUtilityGetNetParam can be used before Apctl Initialized + char name[APCTL_PROFILENAME_MAXLEN]; + truncate_cpy(name, sizeof(name), (defaultNetConfigName + std::to_string(id == 0 ? netParamLatestId:id)).c_str()); + char dummyWEPKey[6] = "XXXXX"; // WEP 64-bit = 10 hex digits key or 5-digit ASCII equivalent + char dummyUserPass[256] = "PPSSPP"; // FIXME: Username / Password max length = 255 chars? + char dummyWPAKey[64] = "XXXXXXXX"; // FIXME: WPA 256-bit = 64 hex digits key or 8 to 63-chars ASCII passphrases? + switch (param) { + case PSP_NETPARAM_NAME: + if (!Memory::IsValidRange(dataAddr, APCTL_PROFILENAME_MAXLEN)) + return hleLogError(Log::sceNet, -1, "invalid arg"); + Memory::MemcpyUnchecked(dataAddr, name, APCTL_PROFILENAME_MAXLEN); + NotifyMemInfo(MemBlockFlags::WRITE, dataAddr, APCTL_PROFILENAME_MAXLEN, "UtilityGetNetParam"); + break; + case PSP_NETPARAM_SSID: + if (!Memory::IsValidRange(dataAddr, APCTL_SSID_MAXLEN)) + return hleLogError(Log::sceNet, -1, "invalid arg"); + Memory::MemcpyUnchecked(dataAddr, netApctlInfo.ssid, APCTL_SSID_MAXLEN); + NotifyMemInfo(MemBlockFlags::WRITE, dataAddr, APCTL_SSID_MAXLEN, "UtilityGetNetParam"); + break; + case PSP_NETPARAM_SECURE: + // 0 is no security. + // 1 is WEP (64-bit). + // 2 is WEP (128-bit). + // 3 is WPA (256-bit ?). + if (!Memory::IsValidRange(dataAddr, 4)) + return hleLogError(Log::sceNet, -1, "invalid arg"); + Memory::WriteUnchecked_U32(1, dataAddr); // WEP 64-bit + NotifyMemInfo(MemBlockFlags::WRITE, dataAddr, 4, "UtilityGetNetParam"); + break; + case PSP_NETPARAM_WEPKEY: + // WEP 64-bit = 10 hex digits key or 5-digit ASCII equivalent + // WEP 128-bit = 26 hex digits key or 13-digit ASCII equivalent + // WEP 256-bit = 58 hex digits key or 29-digit ASCII equivalent + // WPA 256-bit = 64 hex digits key or 8 to 63-chars ASCII passphrases? + if (!Memory::IsValidRange(dataAddr, 5)) + return hleLogError(Log::sceNet, -1, "invalid arg"); + Memory::MemcpyUnchecked(dataAddr, dummyWEPKey, 5); + NotifyMemInfo(MemBlockFlags::WRITE, dataAddr, 5, "UtilityGetNetParam"); + break; + case PSP_NETPARAM_IS_STATIC_IP: + // 0 is DHCP. + // 1 is static. + // 2 is PPPOE. + if (!Memory::IsValidRange(dataAddr, 4)) + return hleLogError(Log::sceNet, -1, "invalid arg"); + Memory::WriteUnchecked_U32(1, dataAddr); // static IP + NotifyMemInfo(MemBlockFlags::WRITE, dataAddr, 4, "UtilityGetNetParam"); + break; + case PSP_NETPARAM_IP: + if (!Memory::IsValidRange(dataAddr, APCTL_IPADDR_MAXLEN)) + return hleLogError(Log::sceNet, -1, "invalid arg"); + Memory::MemcpyUnchecked(dataAddr, netApctlInfo.ip, APCTL_IPADDR_MAXLEN); + NotifyMemInfo(MemBlockFlags::WRITE, dataAddr, APCTL_IPADDR_MAXLEN, "UtilityGetNetParam"); + break; + case PSP_NETPARAM_NETMASK: + if (!Memory::IsValidRange(dataAddr, APCTL_IPADDR_MAXLEN)) + return hleLogError(Log::sceNet, -1, "invalid arg"); + Memory::MemcpyUnchecked(dataAddr, netApctlInfo.subNetMask, APCTL_IPADDR_MAXLEN); + NotifyMemInfo(MemBlockFlags::WRITE, dataAddr, APCTL_IPADDR_MAXLEN, "UtilityGetNetParam"); + break; + case PSP_NETPARAM_ROUTE: + if (!Memory::IsValidRange(dataAddr, APCTL_IPADDR_MAXLEN)) + return hleLogError(Log::sceNet, -1, "invalid arg"); + Memory::MemcpyUnchecked(dataAddr, netApctlInfo.gateway, APCTL_IPADDR_MAXLEN); + NotifyMemInfo(MemBlockFlags::WRITE, dataAddr, APCTL_IPADDR_MAXLEN, "UtilityGetNetParam"); + break; + case PSP_NETPARAM_MANUAL_DNS: + // 0 is auto. + // 1 is manual. + if (!Memory::IsValidRange(dataAddr, 4)) + return hleLogError(Log::sceNet, -1, "invalid arg"); + Memory::WriteUnchecked_U32(1, dataAddr); // manual + NotifyMemInfo(MemBlockFlags::WRITE, dataAddr, 4, "UtilityGetNetParam"); + break; + case PSP_NETPARAM_PRIMARYDNS: + if (!Memory::IsValidRange(dataAddr, APCTL_IPADDR_MAXLEN)) + return hleLogError(Log::sceNet, -1, "invalid arg"); + Memory::MemcpyUnchecked(dataAddr, netApctlInfo.primaryDns, APCTL_IPADDR_MAXLEN); + NotifyMemInfo(MemBlockFlags::WRITE, dataAddr, APCTL_IPADDR_MAXLEN, "UtilityGetNetParam"); + break; + case PSP_NETPARAM_SECONDARYDNS: + if (!Memory::IsValidRange(dataAddr, APCTL_IPADDR_MAXLEN)) + return hleLogError(Log::sceNet, -1, "invalid arg"); + Memory::MemcpyUnchecked(dataAddr, netApctlInfo.secondaryDns, APCTL_IPADDR_MAXLEN); + NotifyMemInfo(MemBlockFlags::WRITE, dataAddr, APCTL_IPADDR_MAXLEN, "UtilityGetNetParam"); + break; + case PSP_NETPARAM_PROXY_USER: + // FIXME: Proxy's Username max length = 255 chars? + if (!Memory::IsValidRange(dataAddr, 255)) + return hleLogError(Log::sceNet, -1, "invalid arg"); + Memory::MemcpyUnchecked(dataAddr, dummyUserPass, 255); + NotifyMemInfo(MemBlockFlags::WRITE, dataAddr, 255, "UtilityGetNetParam"); + break; + case PSP_NETPARAM_PROXY_PASS: + // FIXME: Proxy's Password max length = 255 chars? + if (!Memory::IsValidRange(dataAddr, 255)) + return hleLogError(Log::sceNet, -1, "invalid arg"); + Memory::MemcpyUnchecked(dataAddr, dummyUserPass, 255); + NotifyMemInfo(MemBlockFlags::WRITE, dataAddr, 255, "UtilityGetNetParam"); + break; + case PSP_NETPARAM_USE_PROXY: + // 0 is to not use proxy. + // 1 is to use proxy. + if (!Memory::IsValidRange(dataAddr, 4)) + return hleLogError(Log::sceNet, -1, "invalid arg"); + Memory::WriteUnchecked_U32(netApctlInfo.useProxy, dataAddr); + NotifyMemInfo(MemBlockFlags::WRITE, dataAddr, 4, "UtilityGetNetParam"); + break; + case PSP_NETPARAM_PROXY_SERVER: + if (!Memory::IsValidRange(dataAddr, APCTL_URL_MAXLEN)) + return hleLogError(Log::sceNet, -1, "invalid arg"); + Memory::MemcpyUnchecked(dataAddr, netApctlInfo.proxyUrl, APCTL_URL_MAXLEN); + NotifyMemInfo(MemBlockFlags::WRITE, dataAddr, APCTL_URL_MAXLEN, "UtilityGetNetParam"); + break; + case PSP_NETPARAM_PROXY_PORT: + if (!Memory::IsValidRange(dataAddr, 2)) + return hleLogError(Log::sceNet, -1, "invalid arg"); + Memory::WriteUnchecked_U16(netApctlInfo.proxyPort, dataAddr); + NotifyMemInfo(MemBlockFlags::WRITE, dataAddr, 2, "UtilityGetNetParam"); + break; + case PSP_NETPARAM_VERSION: + // 0 is not used. + // 1 is old version. + // 2 is new version. + if (!Memory::IsValidRange(dataAddr, 4)) + return hleLogError(Log::sceNet, -1, "invalid arg"); + Memory::WriteUnchecked_U32(2, dataAddr); // new version + NotifyMemInfo(MemBlockFlags::WRITE, dataAddr, 4, "UtilityGetNetParam"); + break; + case PSP_NETPARAM_UNKNOWN: + if (!Memory::IsValidRange(dataAddr, 4)) + return hleLogError(Log::sceNet, -1, "invalid arg"); + Memory::WriteUnchecked_U32(0, dataAddr); // reserved? + NotifyMemInfo(MemBlockFlags::WRITE, dataAddr, 4, "UtilityGetNetParam"); + DEBUG_LOG(Log::sceUtility, "sceUtilityGetNetParam - Unknown Param(%d)", param); + break; + case PSP_NETPARAM_8021X_AUTH_TYPE: + // 0 is none. + // 1 is EAP (MD5). + if (!Memory::IsValidRange(dataAddr, 4)) + return hleLogError(Log::sceNet, -1, "invalid arg"); + Memory::WriteUnchecked_U32(netApctlInfo.eapType, dataAddr); + NotifyMemInfo(MemBlockFlags::WRITE, dataAddr, 4, "UtilityGetNetParam"); + break; + case PSP_NETPARAM_8021X_USER: + // FIXME: 8021X's Username max length = 255 chars? + if (!Memory::IsValidRange(dataAddr, 255)) + return hleLogError(Log::sceNet, -1, "invalid arg"); + Memory::MemcpyUnchecked(dataAddr, dummyUserPass, 255); + NotifyMemInfo(MemBlockFlags::WRITE, dataAddr, 255, "UtilityGetNetParam"); + break; + case PSP_NETPARAM_8021X_PASS: + // FIXME: 8021X's Password max length = 255 chars? + if (!Memory::IsValidRange(dataAddr, 255)) + return hleLogError(Log::sceNet, -1, "invalid arg"); + Memory::MemcpyUnchecked(dataAddr, dummyUserPass, 255); + NotifyMemInfo(MemBlockFlags::WRITE, dataAddr, 255, "UtilityGetNetParam"); + break; + case PSP_NETPARAM_WPA_TYPE: + // 0 is key in hexadecimal format. + // 1 is key in ASCII format. + if (!Memory::IsValidRange(dataAddr, 4)) + return hleLogError(Log::sceNet, -1, "invalid arg"); + Memory::WriteUnchecked_U32(1, dataAddr); // ASCII format + NotifyMemInfo(MemBlockFlags::WRITE, dataAddr, 4, "UtilityGetNetParam"); + break; + case PSP_NETPARAM_WPA_KEY: + // FIXME: WPA 256-bit = 64 hex digits key or 8 to 63-chars ASCII passphrases? + if (!Memory::IsValidRange(dataAddr, 63)) + return hleLogError(Log::sceNet, -1, "invalid arg"); + Memory::MemcpyUnchecked(dataAddr, dummyWPAKey, 63); + NotifyMemInfo(MemBlockFlags::WRITE, dataAddr, 63, "UtilityGetNetParam"); + break; + case PSP_NETPARAM_BROWSER: + // 0 is to not start the native browser. + // 1 is to start the native browser. + if (!Memory::IsValidRange(dataAddr, 4)) + return hleLogError(Log::sceNet, -1, "invalid arg"); + Memory::WriteUnchecked_U32(netApctlInfo.startBrowser, dataAddr); + NotifyMemInfo(MemBlockFlags::WRITE, dataAddr, 4, "UtilityGetNetParam"); + break; + case PSP_NETPARAM_WIFI_CONFIG: + // 0 is no config. + // 1 is unknown. (WISP ?) + // 2 is Playstation Spot. + // 3 is unknown. + if (!Memory::IsValidRange(dataAddr, 4)) + return hleLogError(Log::sceNet, -1, "invalid arg"); + Memory::WriteUnchecked_U32(0, dataAddr); // no config / netApctlInfo.wifisp ? + NotifyMemInfo(MemBlockFlags::WRITE, dataAddr, 4, "UtilityGetNetParam"); + break; + default: + return hleLogWarning(Log::sceUtility, SCE_ERROR_NETPARAM_BAD_PARAM, "invalid param=%d", param); + } + + return 0; +} + +/** +* Get Current Net Configuration ID +* +* @param idAddr - Address to store the current net ID (ie. The actual Net Config ID when using ID=0 on sceUtilityGetNetParam ?) +* @return 0 on success +*/ +static int sceUtilityGetNetParamLatestID(u32 idAddr) { + DEBUG_LOG(Log::sceUtility, "sceUtilityGetNetParamLatestID(%08x)", idAddr); + // This function is saving the last net param ID (non-zero ID?) and not the number of net configurations. + Memory::Write_U32(netParamLatestId, idAddr); + + return 0; +} + //TODO: Implement all sceUtilityScreenshot* for real, it doesn't seem to be complex //but it requires more investigation @@ -1077,8 +1319,8 @@ const HLEFunction sceUtility[] = {0X91E70E35, &WrapI_I, "sceUtilityNetconfUpdate", 'i', "i" }, {0X6332AA39, &WrapI_V, "sceUtilityNetconfGetStatus", 'i', "" }, {0X5EEE6548, &WrapI_I, "sceUtilityCheckNetParam", 'i', "i" }, - {0X434D4B3A, nullptr, "sceUtilityGetNetParam", '?', "" }, - {0X4FED24D8, nullptr, "sceUtilityGetNetParamLatestID", '?', "" }, + {0X434D4B3A, &WrapI_IIU, "sceUtilityGetNetParam", 'i', "iix"}, + {0X4FED24D8, &WrapI_U, "sceUtilityGetNetParamLatestID", 'i', "x" }, {0X67AF3428, &WrapI_V, "sceUtilityMsgDialogShutdownStart", 'i', "" }, {0X2AD8E239, &WrapI_U, "sceUtilityMsgDialogInitStart", 'i', "x" }, diff --git a/Core/HLE/sceUtility.h b/Core/HLE/sceUtility.h index 9943fc8399..a654d50926 100644 --- a/Core/HLE/sceUtility.h +++ b/Core/HLE/sceUtility.h @@ -76,6 +76,36 @@ class PointerWrap; #define PSP_SYSTEMPARAM_BUTTON_CIRCLE 0 #define PSP_SYSTEMPARAM_BUTTON_CROSS 1 +// Valid values for NetParam +#define PSP_NETPARAM_NAME 0 // string +#define PSP_NETPARAM_SSID 1 // string +#define PSP_NETPARAM_SECURE 2 // int +#define PSP_NETPARAM_WEPKEY 3 // string +#define PSP_NETPARAM_IS_STATIC_IP 4 // int +#define PSP_NETPARAM_IP 5 // string +#define PSP_NETPARAM_NETMASK 6 // string +#define PSP_NETPARAM_ROUTE 7 // string +#define PSP_NETPARAM_MANUAL_DNS 8 // int +#define PSP_NETPARAM_PRIMARYDNS 9 // string +#define PSP_NETPARAM_SECONDARYDNS 10 // string +#define PSP_NETPARAM_PROXY_USER 11 // string +#define PSP_NETPARAM_PROXY_PASS 12 // string +#define PSP_NETPARAM_USE_PROXY 13 // int +#define PSP_NETPARAM_PROXY_SERVER 14 // string +#define PSP_NETPARAM_PROXY_PORT 15 // int +#define PSP_NETPARAM_VERSION 16 // int +#define PSP_NETPARAM_UNKNOWN 17 // int +#define PSP_NETPARAM_8021X_AUTH_TYPE 18 // int +#define PSP_NETPARAM_8021X_USER 19 // string +#define PSP_NETPARAM_8021X_PASS 20 // string +#define PSP_NETPARAM_WPA_TYPE 21 // int +#define PSP_NETPARAM_WPA_KEY 22 // string +#define PSP_NETPARAM_BROWSER 23 // int +#define PSP_NETPARAM_WIFI_CONFIG 24 // int + +// X-Men Legends 2, and some homebrew may support up to 10 net config entries, but we currently only have 1 faked net config +#define PSP_NETPARAM_MAX_NUMBER_DUMMY_ENTRIES 1 + enum class UtilityDialogType { NONE, SAVEDATA,