mirror of
https://github.com/libretro/ppsspp.git
synced 2025-02-27 03:55:42 +00:00
Merge pull request #7264 from hrydgard/rebased-adhoc-by-ANR2ME
Rebased adhoc by ANR2ME
This commit is contained in:
commit
1fa67104ce
@ -1218,6 +1218,8 @@ add_library(${CoreLibName} ${CoreLinkType}
|
||||
Core/HLE/sceNetAdhoc.h
|
||||
Core/HLE/proAdhoc.h
|
||||
Core/HLE/proAdhoc.cpp
|
||||
Core/HLE/proAdhocServer.h
|
||||
Core/HLE/proAdhocServer.cpp
|
||||
Core/HLE/sceOpenPSID.cpp
|
||||
Core/HLE/sceOpenPSID.h
|
||||
Core/HLE/sceP3da.cpp
|
||||
|
@ -571,7 +571,7 @@ static ConfigSetting controlSettings[] = {
|
||||
|
||||
static ConfigSetting networkSettings[] = {
|
||||
ConfigSetting("EnableWlan", &g_Config.bEnableWlan, false, true, true),
|
||||
|
||||
ConfigSetting("EnableAdhocServer", &g_Config.bEnableAdhocServer, false, true, true),
|
||||
ConfigSetting(false),
|
||||
};
|
||||
|
||||
|
@ -311,6 +311,7 @@ public:
|
||||
|
||||
// Networking
|
||||
bool bEnableWlan;
|
||||
bool bEnableAdhocServer;
|
||||
int iWlanAdhocChannel;
|
||||
bool bWlanPowerSave;
|
||||
|
||||
|
@ -208,6 +208,7 @@
|
||||
<ClCompile Include="HLE\HLEHelperThread.cpp" />
|
||||
<ClCompile Include="HLE\HLETables.cpp" />
|
||||
<ClCompile Include="HLE\proAdhoc.cpp" />
|
||||
<ClCompile Include="HLE\proAdhocServer.cpp" />
|
||||
<ClCompile Include="HLE\ReplaceTables.cpp" />
|
||||
<ClCompile Include="HLE\sceAtrac.cpp" />
|
||||
<ClCompile Include="HLE\sceAudio.cpp" />
|
||||
@ -445,6 +446,7 @@
|
||||
<ClInclude Include="HLE\HLETables.h" />
|
||||
<ClInclude Include="HLE\KernelWaitHelpers.h" />
|
||||
<ClInclude Include="HLE\proAdhoc.h" />
|
||||
<ClInclude Include="HLE\proAdhocServer.h" />
|
||||
<ClInclude Include="HLE\ReplaceTables.h" />
|
||||
<ClInclude Include="HLE\sceAtrac.h" />
|
||||
<ClInclude Include="HLE\sceAudio.h" />
|
||||
|
@ -508,6 +508,9 @@
|
||||
<ClCompile Include="HLE\sceUsbGps.cpp">
|
||||
<Filter>HLE\Libraries</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="HLE\proAdhocServer.cpp">
|
||||
<Filter>HLE\Libraries</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\ext\udis86\itab.c">
|
||||
<Filter>Ext\udis86</Filter>
|
||||
</ClCompile>
|
||||
@ -976,6 +979,9 @@
|
||||
<ClInclude Include="HLE\sceUsbGps.h">
|
||||
<Filter>HLE\Libraries</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="HLE\proAdhocServer.h">
|
||||
<Filter>HLE\Libraries</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\ext\udis86\decode.h">
|
||||
<Filter>Ext\udis86</Filter>
|
||||
</ClInclude>
|
||||
|
@ -142,7 +142,8 @@ template<int func(int, int, int, int, int, int, u32)> void WrapI_IIIIIIU() {
|
||||
|
||||
// Hm, do so many params get passed in registers?
|
||||
template<int func(int, int, int, int, int, int, int, int, u32)> void WrapI_IIIIIIIIU() {
|
||||
u32 retval = func(PARAM(0), PARAM(1), PARAM(2), PARAM(3), PARAM(4), PARAM(5), PARAM(6), PARAM(7), PARAM(8));
|
||||
u32 param8 = *(u32*)Memory::GetPointer(currentMIPS->r[29]); //Fixed 9th parameter, thanks to Kingcom
|
||||
u32 retval = func(PARAM(0), PARAM(1), PARAM(2), PARAM(3), PARAM(4), PARAM(5), PARAM(6), PARAM(7), param8);
|
||||
RETURN(retval);
|
||||
}
|
||||
|
||||
@ -520,6 +521,12 @@ template<int func(const char *, int, int, u32, int, int)> void WrapI_CIIUII() {
|
||||
RETURN(retval);
|
||||
}
|
||||
|
||||
template<int func(const char *, int, int, int, u32, u32, int)> void WrapI_CIIIUUI() {
|
||||
int retval = func(Memory::GetCharPointer(PARAM(0)), PARAM(1), PARAM(2),
|
||||
PARAM(3), PARAM(4), PARAM(5), PARAM(6));
|
||||
RETURN(retval);
|
||||
}
|
||||
|
||||
template<int func(const char *, int, u32, u32, u32)> void WrapI_CIUUU() {
|
||||
int retval = func(Memory::GetCharPointer(PARAM(0)), PARAM(1), PARAM(2),
|
||||
PARAM(3), PARAM(4));
|
||||
@ -792,3 +799,8 @@ template<int func(int, const char *, u32, void *, int, int, int)> void WrapI_ICU
|
||||
u32 retval = func(PARAM(0), Memory::GetCharPointer(PARAM(1)), PARAM(2), Memory::GetPointer(PARAM(3)), PARAM(4), PARAM(5), PARAM(6));
|
||||
RETURN(retval);
|
||||
}
|
||||
|
||||
template<int func(void *, u32, int)> void WrapI_VUI(){
|
||||
u32 retval = func(Memory::GetPointer(PARAM(0)), PARAM(1), PARAM(2));
|
||||
RETURN(retval);
|
||||
}
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,14 +1,34 @@
|
||||
// Copyright (c) 2013- PPSSPP Project.
|
||||
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, version 2.0 or later versions.
|
||||
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License 2.0 for more details.
|
||||
|
||||
// A copy of the GPL 2.0 should have been included with the program.
|
||||
// If not, see http://www.gnu.org/licenses/
|
||||
|
||||
// Official git repository and contact information can be found at
|
||||
// https://github.com/hrydgard/ppsspp and http://www.ppsspp.org/.
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "base/timeutil.h"
|
||||
#include "base/mutex.h"
|
||||
#include "thread/thread.h"
|
||||
#include "net/resolve.h"
|
||||
#include "Common/ChunkFile.h"
|
||||
|
||||
#include "Core/Config.h"
|
||||
#include "Core/CoreTiming.h"
|
||||
#include "Core/MemMap.h"
|
||||
#include "Core/HLE/HLE.h"
|
||||
#include "Core/HLE/sceNetAdhoc.h"
|
||||
#include "Core/HLE/sceKernelThread.h"
|
||||
#include "Core/HLE/sceKernel.h"
|
||||
#include "Core/HLE/sceKernelMutex.h"
|
||||
#include "Core/HLE/sceUtility.h"
|
||||
@ -22,8 +42,10 @@ typedef int socklen_t;
|
||||
#elif defined(_MSC_VER)
|
||||
#include <WS2tcpip.h>
|
||||
#else
|
||||
#include <unistd.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
#include <sys/select.h>
|
||||
#include <netinet/in.h>
|
||||
#include <netdb.h>
|
||||
#include <arpa/inet.h>
|
||||
@ -33,13 +55,21 @@ typedef int socklen_t;
|
||||
#ifdef _MSC_VER
|
||||
#define PACK
|
||||
#undef errno
|
||||
#undef ECONNABORTED
|
||||
#undef ECONNRESET
|
||||
#undef ENOTCONN
|
||||
#undef EAGAIN
|
||||
#undef EINPROGRESS
|
||||
#undef EISCONN
|
||||
#undef EALREADY
|
||||
#define errno WSAGetLastError()
|
||||
#define ECONNABORTED WSAECONNABORTED
|
||||
#define ECONNRESET WSAECONNRESET
|
||||
#define ENOTCONN WSAENOTCONN
|
||||
#define EAGAIN WSAEWOULDBLOCK
|
||||
#define EINPROGRESS WSAEWOULDBLOCK
|
||||
#define EISCONN WSAEISCONN
|
||||
#define EALREADY WSAEALREADY
|
||||
inline bool connectInProgress(int errcode){ return (errcode == WSAEWOULDBLOCK || errcode == WSAEINVAL || errcode == WSAEALREADY); }
|
||||
#else
|
||||
#define INVALID_SOCKET -1
|
||||
@ -49,8 +79,25 @@ inline bool connectInProgress(int errcode){ return (errcode == WSAEWOULDBLOCK ||
|
||||
inline bool connectInProgress(int errcode){ return (errcode == EINPROGRESS); }
|
||||
#endif
|
||||
|
||||
#ifndef POLL_ERR
|
||||
#define POLL_ERR 0x008 /* Error condition. */
|
||||
#endif
|
||||
#ifndef POLLERR
|
||||
#define POLLERR POLL_ERR
|
||||
#endif
|
||||
|
||||
#ifndef POLL_PRI
|
||||
#define POLL_PRI 0x002 /* There is urgent data to read. */
|
||||
#endif
|
||||
#ifndef POLLPRI
|
||||
#define POLLPRI POLL_PRI
|
||||
#endif
|
||||
|
||||
#define IsMatch(buf1, buf2) (memcmp(&buf1, &buf2, sizeof(buf1)) == 0)
|
||||
|
||||
// Server Listening Port
|
||||
#define SERVER_PORT 27312
|
||||
|
||||
// psp strutcs and definitions
|
||||
#define ADHOCCTL_MODE_ADHOC 0
|
||||
#define ADHOCCTL_MODE_GAMEMODE 1
|
||||
@ -78,10 +125,50 @@ inline bool connectInProgress(int errcode){ return (errcode == EINPROGRESS); }
|
||||
#define UTILITY_NETCONF_STATUS_FINISHED 3
|
||||
#define UTILITY_NETCONF_STATUS_SHUTDOWN 4
|
||||
|
||||
// Event Flags
|
||||
#define ADHOC_EV_SEND 0x0001
|
||||
#define ADHOC_EV_RECV 0x0002
|
||||
#define ADHOC_EV_CONNECT 0x0004
|
||||
#define ADHOC_EV_ACCEPT 0x0008
|
||||
#define ADHOC_EV_FLUSH 0x0010
|
||||
#define ADHOC_EV_INVALID 0x0100
|
||||
#define ADHOC_EV_DELETE 0x0200
|
||||
#define ADHOC_EV_ALERT 0x0400
|
||||
#define ADHOC_EV_DISCONNECT 0x0800
|
||||
|
||||
// PTP Connection States
|
||||
#define PTP_STATE_CLOSED 0
|
||||
#define PTP_STATE_LISTEN 1
|
||||
#define PTP_STATE_ESTABLISHED 4
|
||||
#define ADHOC_PTP_STATE_CLOSED 0
|
||||
#define ADHOC_PTP_STATE_LISTEN 1
|
||||
#define ADHOC_PTP_STATE_SYN_SENT 2
|
||||
#define ADHOC_PTP_STATE_SYN_RCVD 3
|
||||
#define ADHOC_PTP_STATE_ESTABLISHED 4
|
||||
|
||||
// Nonblocking Flag for Adhoc socket API
|
||||
#define ADHOC_F_NONBLOCK 0x0001
|
||||
// Alert Flags
|
||||
#define ADHOC_F_ALERTSEND 0x0010
|
||||
#define ADHOC_F_ALERTRECV 0x0020
|
||||
#define ADHOC_F_ALERTPOLL 0x0040
|
||||
#define ADHOC_F_ALERTCONNECT 0x0080
|
||||
#define ADHOC_F_ALERTACCEPT 0x0100
|
||||
#define ADHOC_F_ALERTFLUSH 0x0200
|
||||
#define ADHOC_F_ALERTALL (ADHOC_F_ALERTSEND | ADHOC_F_ALERTRECV | ADHOC_F_ALERTPOLL | ADHOC_F_ALERTCONNECT | ADHOC_F_ALERTACCEPT | ADHOC_F_ALERTFLUSH)
|
||||
|
||||
/* PDP Maximum Fragment Size */
|
||||
#define PSP_ADHOC_PDP_MFS 1444
|
||||
|
||||
/* PDP Maximum Transfer Unit */
|
||||
#define PSP_ADHOC_PDP_MTU 65523
|
||||
|
||||
/* PTP Maximum Segment Size */
|
||||
#define PSP_ADHOC_PTP_MSS 1444
|
||||
|
||||
/* GameMode Optional Data */
|
||||
#define ADHOC_GAMEMODE_F_UPDATE 0x00000001
|
||||
|
||||
// Timeouts
|
||||
#define PSP_ADHOCCTL_RECV_TIMEOUT 100000
|
||||
#define PSP_ADHOCCTL_PING_TIMEOUT 2000000
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#pragma pack(push, 1)
|
||||
@ -92,6 +179,15 @@ typedef struct SceNetEtherAddr {
|
||||
uint8_t data[ETHER_ADDR_LEN];
|
||||
} PACK SceNetEtherAddr;
|
||||
|
||||
// Broadcast MAC
|
||||
extern uint8_t broadcastMAC[ETHER_ADDR_LEN];
|
||||
|
||||
// Malloc Pool Information
|
||||
typedef struct SceNetMallocStat {
|
||||
s32_le pool; // Pointer to the pool?
|
||||
s32_le maximum; // Maximum size of the pool?
|
||||
s32_le free; // How much memory is free
|
||||
} PACK SceNetMallocStat;
|
||||
|
||||
// Adhoc Virtual Network Name
|
||||
#define ADHOCCTL_GROUPNAME_LEN 8
|
||||
@ -144,7 +240,7 @@ typedef struct SceNetAdhocctlPeerInfo {
|
||||
SceNetEtherAddr mac_addr;
|
||||
u32_le ip_addr;
|
||||
uint8_t padding[2];
|
||||
u64_le last_recv;
|
||||
u64_le last_recv; // Need to use the same method with sceKernelGetSystemTimeWide (ie. CoreTiming::GetGlobalTimeUsScaled) to prevent timing issue (ie. in game timeout)
|
||||
} PACK SceNetAdhocctlPeerInfo;
|
||||
|
||||
// Peer Information with u32 pointers
|
||||
@ -152,9 +248,9 @@ typedef struct SceNetAdhocctlPeerInfoEmu {
|
||||
u32_le next; // Changed the pointer to u32
|
||||
SceNetAdhocctlNickname nickname;
|
||||
SceNetEtherAddr mac_addr;
|
||||
u32_le ip_addr;
|
||||
u32 padding; // Changed the pointer to u32
|
||||
u64_le last_recv;
|
||||
u32_le ip_addr; //jpcsp wrote 6bytes of 0x11 for this & padding
|
||||
u16 padding; // Changed the padding to u16
|
||||
u64_le last_recv; // Need to use the same method with sceKernelGetSystemTimeWide (ie. CoreTiming::GetGlobalTimeUsScaled) to prevent timing issue (ie. in game timeout)
|
||||
} PACK SceNetAdhocctlPeerInfoEmu;
|
||||
|
||||
// Member Information
|
||||
@ -177,6 +273,52 @@ typedef struct SceNetAdhocctlGameModeInfo {
|
||||
s32_le num;
|
||||
SceNetEtherAddr member[ADHOCCTL_GAMEMODE_MAX_MEMBERS];
|
||||
} PACK SceNetAdhocctlGameModeInfo;
|
||||
|
||||
// Socket Polling Event Listener
|
||||
typedef struct SceNetAdhocPollSd{
|
||||
s32_le id;
|
||||
s32_le events;
|
||||
s32_le revents;
|
||||
} PACK SceNetAdhocPollSd;
|
||||
|
||||
// PDP Socket Status
|
||||
typedef struct SceNetAdhocPdpStat{
|
||||
u32_le next; // struct SceNetAdhocPdpStat * next;
|
||||
s32_le id;
|
||||
SceNetEtherAddr laddr;
|
||||
u16_le lport;
|
||||
u32_le rcv_sb_cc;
|
||||
} PACK SceNetAdhocPdpStat;
|
||||
|
||||
// PTP Socket Status
|
||||
typedef struct SceNetAdhocPtpStat {
|
||||
u32_le next; // Changed the pointer to u32
|
||||
s32_le id;
|
||||
SceNetEtherAddr laddr;
|
||||
SceNetEtherAddr paddr;
|
||||
u16_le lport;
|
||||
u16_le pport;
|
||||
s32_le snd_sb_cc;
|
||||
s32_le rcv_sb_cc;
|
||||
s32_le state;
|
||||
} PACK SceNetAdhocPtpStat;
|
||||
|
||||
// Gamemode Optional Peer Buffer Data
|
||||
typedef struct SceNetAdhocGameModeOptData {
|
||||
u32_le size;
|
||||
u32_le flag;
|
||||
u64_le last_recv; // Need to use the same method with sceKernelGetSystemTimeWide (ie. CoreTiming::GetGlobalTimeUsScaled) to prevent timing issue (ie. in game timeout)
|
||||
} PACK SceNetAdhocGameModeOptData;
|
||||
|
||||
// Gamemode Buffer Status
|
||||
typedef struct SceNetAdhocGameModeBufferStat {
|
||||
struct SceNetAdhocGameModeBufferStat * next; //should be u32_le ?
|
||||
s32_le id;
|
||||
void * ptr; //should be u32_le ?
|
||||
u32_le size;
|
||||
u32_le master;
|
||||
SceNetAdhocGameModeOptData opt;
|
||||
} PACK SceNetAdhocGameModeBufferStat;
|
||||
#ifdef _MSC_VER
|
||||
#pragma pack(pop)
|
||||
#endif
|
||||
@ -184,57 +326,10 @@ typedef struct SceNetAdhocctlGameModeInfo {
|
||||
// Adhoc ID (Game Product Key)
|
||||
#define ADHOCCTL_ADHOCID_LEN 9
|
||||
typedef struct SceNetAdhocctlAdhocId {
|
||||
s32_le type;
|
||||
uint8_t data[ADHOCCTL_ADHOCID_LEN];
|
||||
uint8_t padding[3];
|
||||
} SceNetAdhocctlAdhocId;
|
||||
|
||||
// Socket Polling Event Listener
|
||||
struct SceNetAdhocPollSd {
|
||||
s32_le id;
|
||||
s32_le events;
|
||||
s32_le revents;
|
||||
};
|
||||
|
||||
// PDP Socket Status
|
||||
struct SceNetAdhocPdpStat {
|
||||
struct SceNetAdhocPdpStat * next;
|
||||
s32_le id;
|
||||
SceNetEtherAddr laddr;
|
||||
u16_le lport;
|
||||
u32_le rcv_sb_cc;
|
||||
};
|
||||
|
||||
// PTP Socket Status
|
||||
struct SceNetAdhocPtpStat {
|
||||
u32_le next; // Changed the pointer to u32
|
||||
s32_le id;
|
||||
SceNetEtherAddr laddr;
|
||||
SceNetEtherAddr paddr;
|
||||
u16_le lport;
|
||||
u16_le pport;
|
||||
u32_le snd_sb_cc;
|
||||
u32_le rcv_sb_cc;
|
||||
s32_le state;
|
||||
};
|
||||
|
||||
// Gamemode Optional Peer Buffer Data
|
||||
struct SceNetAdhocGameModeOptData {
|
||||
u32_le size;
|
||||
u32_le flag;
|
||||
u64_le last_recv;
|
||||
};
|
||||
|
||||
// Gamemode Buffer Status
|
||||
struct SceNetAdhocGameModeBufferStat {
|
||||
struct SceNetAdhocGameModeBufferStat * next;
|
||||
s32_le id;
|
||||
void * ptr;
|
||||
u32_le size;
|
||||
u32_le master;
|
||||
SceNetAdhocGameModeOptData opt;
|
||||
};
|
||||
|
||||
s32_le type;
|
||||
uint8_t data[ADHOCCTL_ADHOCID_LEN];
|
||||
uint8_t padding[3];
|
||||
} SceNetAdhocctlAdhocId; // should this be packed?
|
||||
|
||||
// Internal Matching Peer Information
|
||||
typedef struct SceNetAdhocMatchingMemberInternal {
|
||||
@ -251,23 +346,28 @@ typedef struct SceNetAdhocMatchingMemberInternal {
|
||||
s32_le sending;
|
||||
|
||||
// Last Heartbeat
|
||||
u64_le lastping;
|
||||
u64_le lastping; // May need to use the same method with sceKernelGetSystemTimeWide (ie. CoreTiming::GetGlobalTimeUsScaled) to prevent timing issue (ie. in game timeout)
|
||||
} SceNetAdhocMatchingMemberInternal;
|
||||
|
||||
|
||||
// Matching handler
|
||||
struct SceNetAdhocMatchingHandlerArgs {
|
||||
s32_le id;
|
||||
s32_le event;
|
||||
SceNetEtherAddr * peer;
|
||||
s32_le opcode; // event;
|
||||
SceNetEtherAddr mac; // peer //u32_le macaddr;
|
||||
s32_le optlen;
|
||||
void * opt;
|
||||
void * opt; //u32_le optaddr
|
||||
};
|
||||
|
||||
struct SceNetAdhocMatchingHandler {
|
||||
u32_le entryPoint;
|
||||
};
|
||||
|
||||
struct AdhocctlHandler {
|
||||
u32 entryPoint;
|
||||
u32 argument;
|
||||
};
|
||||
|
||||
// Thread Message Stack Item
|
||||
typedef struct ThreadMessage {
|
||||
// Next Thread Message
|
||||
@ -288,7 +388,7 @@ typedef struct ThreadMessage {
|
||||
// Context Information
|
||||
typedef struct SceNetAdhocMatchingContext {
|
||||
// Next Context
|
||||
struct SceNetAdhocMatchingContext * next;
|
||||
struct SceNetAdhocMatchingContext *next;
|
||||
|
||||
// Externally Visible ID
|
||||
s32_le id;
|
||||
@ -306,19 +406,21 @@ typedef struct SceNetAdhocMatchingContext {
|
||||
SceNetEtherAddr mac;
|
||||
|
||||
// Peer List for Connectees
|
||||
SceNetAdhocMatchingMemberInternal * peerlist; // SceNetAdhocMatchingMemberInfo[Emu]
|
||||
SceNetAdhocMatchingMemberInternal *peerlist; // SceNetAdhocMatchingMemberInfo[Emu]
|
||||
|
||||
// Local PDP Port
|
||||
u16_le port;
|
||||
|
||||
// Local PDP Socket
|
||||
s32_le socket;
|
||||
// Socket Lock
|
||||
recursive_mutex *socketlock;
|
||||
|
||||
// Receive Buffer Length
|
||||
s32_le rxbuflen;
|
||||
|
||||
// Receive Buffer
|
||||
uint8_t * rxbuf;
|
||||
uint8_t *rxbuf;
|
||||
|
||||
// Hello Broadcast Interval (Microseconds)
|
||||
u32_le hello_int;
|
||||
@ -338,35 +440,228 @@ typedef struct SceNetAdhocMatchingContext {
|
||||
// Event Handler
|
||||
SceNetAdhocMatchingHandler handler;
|
||||
|
||||
// Socket Connectivity
|
||||
//bool connected;
|
||||
// Event Handler Args
|
||||
u32_le handlerArgs[6]; // actual arguments only 5, the 6th one is just for borrowing a space to store the callback address to use later
|
||||
//SceNetAdhocMatchingHandlerArgs handlerArgs;
|
||||
|
||||
// Hello Data Length
|
||||
u32_le hellolen;
|
||||
s32_le hellolen;
|
||||
|
||||
// Hello Data Address
|
||||
u32_le helloAddr;
|
||||
|
||||
// Hello Data
|
||||
void * hello;
|
||||
uint8_t *hello;
|
||||
|
||||
// Timeout
|
||||
u64_le timeout;
|
||||
|
||||
// Helper Thread (fake PSP Thread) needed to execute callback
|
||||
//HLEHelperThread *matchingThread;
|
||||
//SceUID matching_thid;
|
||||
|
||||
// Event Caller Thread
|
||||
s32_le event_thid;
|
||||
std::thread eventThread; // s32_le event_thid;
|
||||
bool eventRunning = false;
|
||||
bool IsMatchingInCB = false;
|
||||
|
||||
// IO Handler Thread
|
||||
s32_le input_thid;
|
||||
std::thread inputThread; // s32_le input_thid;
|
||||
bool inputRunning = false;
|
||||
|
||||
// Event Caller Thread Message Stack
|
||||
s32_le event_stack_lock;
|
||||
ThreadMessage * event_stack;
|
||||
recursive_mutex *eventlock; // s32_le event_stack_lock;
|
||||
ThreadMessage *event_stack;
|
||||
|
||||
// IO Handler Thread Message Stack
|
||||
s32_le input_stack_lock;
|
||||
ThreadMessage * input_stack;
|
||||
recursive_mutex *inputlock; // s32_le input_stack_lock;
|
||||
ThreadMessage *input_stack;
|
||||
|
||||
// Socket Connectivity
|
||||
//bool connected = false;
|
||||
//bool InConnection = false;
|
||||
//u32_le handlerid = -1;
|
||||
//int eventMatchingHandlerUpdate = -1;
|
||||
} SceNetAdhocMatchingContext;
|
||||
|
||||
// End of psp definitions
|
||||
|
||||
enum {
|
||||
ERROR_NET_ADHOC_INVALID_SOCKET_ID = 0x80410701,
|
||||
ERROR_NET_ADHOC_INVALID_ADDR = 0x80410702,
|
||||
ERROR_NET_ADHOC_INVALID_PORT = 0x80410703,
|
||||
ERROR_NET_ADHOC_INVALID_DATALEN = 0x80410705,
|
||||
ERROR_NET_ADHOC_NOT_ENOUGH_SPACE = 0x80400706,
|
||||
ERROR_NET_ADHOC_SOCKET_DELETED = 0x80410707,
|
||||
ERROR_NET_ADHOC_SOCKET_ALERTED = 0x80410708,
|
||||
ERROR_NET_ADHOC_WOULD_BLOCK = 0x80410709, //ERROR_NET_ADHOC_NO_DATA_AVAILABLE
|
||||
ERROR_NET_ADHOC_PORT_IN_USE = 0x8041070a,
|
||||
ERROR_NET_ADHOC_NOT_CONNECTED = 0x8041070B,
|
||||
ERROR_NET_ADHOC_DISCONNECTED = 0x8041070c,
|
||||
ERROR_NET_ADHOC_NOT_OPENED = 0x8040070D,
|
||||
ERROR_NET_ADHOC_NOT_LISTENED = 0x8040070E,
|
||||
ERROR_NET_ADHOC_SOCKET_ID_NOT_AVAIL = 0x8041070F,
|
||||
ERROR_NET_ADHOC_PORT_NOT_AVAIL = 0x80410710,
|
||||
ERROR_NET_ADHOC_INVALID_ARG = 0x80410711,
|
||||
ERROR_NET_ADHOC_NOT_INITIALIZED = 0x80410712,
|
||||
ERROR_NET_ADHOC_ALREADY_INITIALIZED = 0x80410713,
|
||||
ERROR_NET_ADHOC_BUSY = 0x80410714,
|
||||
ERROR_NET_ADHOC_TIMEOUT = 0x80410715,
|
||||
ERROR_NET_ADHOC_NO_ENTRY = 0x80410716,
|
||||
ERROR_NET_ADHOC_EXCEPTION_EVENT = 0x80410717,
|
||||
ERROR_NET_ADHOC_CONNECTION_REFUSED = 0x80410718,
|
||||
ERROR_NET_ADHOC_THREAD_ABORTED = 0x80410719,
|
||||
ERROR_NET_ADHOC_ALREADY_CREATED = 0x8041071A,
|
||||
ERROR_NET_ADHOC_NOT_IN_GAMEMODE = 0x8041071B,
|
||||
ERROR_NET_ADHOC_NOT_CREATED = 0x8041071C,
|
||||
|
||||
ERROR_NET_ADHOC_MATCHING_INVALID_MODE = 0x80410801,
|
||||
ERROR_NET_ADHOC_MATCHING_INVALID_MAXNUM = 0x80410803,
|
||||
ERROR_NET_ADHOC_MATCHING_RXBUF_TOO_SHORT = 0x80410804,
|
||||
ERROR_NET_ADHOC_MATCHING_INVALID_OPTLEN = 0x80410805,
|
||||
ERROR_NET_ADHOC_MATCHING_INVALID_ARG = 0x80410806,
|
||||
ERROR_NET_ADHOC_MATCHING_INVALID_ID = 0x80410807,
|
||||
ERROR_NET_ADHOC_MATCHING_ID_NOT_AVAIL = 0x80410808,
|
||||
ERROR_NET_ADHOC_MATCHING_NO_SPACE = 0x80410809,
|
||||
ERROR_NET_ADHOC_MATCHING_IS_RUNNING = 0x8041080A,
|
||||
ERROR_NET_ADHOC_MATCHING_NOT_RUNNING = 0x8041080B,
|
||||
ERROR_NET_ADHOC_MATCHING_UNKNOWN_TARGET = 0x8041080C,
|
||||
ERROR_NET_ADHOC_MATCHING_TARGET_NOT_READY = 0x8041080D,
|
||||
ERROR_NET_ADHOC_MATCHING_EXCEED_MAXNUM = 0x8041080E,
|
||||
ERROR_NET_ADHOC_MATCHING_REQUEST_IN_PROGRESS = 0x8041080F,
|
||||
ERROR_NET_ADHOC_MATCHING_ALREADY_ESTABLISHED = 0x80410810,
|
||||
ERROR_NET_ADHOC_MATCHING_BUSY = 0x80410811,
|
||||
ERROR_NET_ADHOC_MATCHING_ALREADY_INITIALIZED = 0x80410812,
|
||||
ERROR_NET_ADHOC_MATCHING_NOT_INITIALIZED = 0x80410813,
|
||||
ERROR_NET_ADHOC_MATCHING_PORT_IN_USE = 0x80410814,
|
||||
ERROR_NET_ADHOC_MATCHING_STACKSIZE_TOO_SHORT = 0x80410815,
|
||||
ERROR_NET_ADHOC_MATCHING_INVALID_DATALEN = 0x80410816,
|
||||
ERROR_NET_ADHOC_MATCHING_NOT_ESTABLISHED = 0x80410817,
|
||||
ERROR_NET_ADHOC_MATCHING_DATA_BUSY = 0x80410818,
|
||||
|
||||
ERROR_NET_ADHOCCTL_WLAN_SWITCH_OFF = 0x80410b03,
|
||||
ERROR_NET_ADHOCCTL_INVALID_ARG = 0x80410B04,
|
||||
ERROR_NET_ADHOCCTL_ID_NOT_FOUND = 0x80410B06,
|
||||
ERROR_NET_ADHOCCTL_ALREADY_INITIALIZED = 0x80410b07,
|
||||
ERROR_NET_ADHOCCTL_NOT_INITIALIZED = 0x80410b08,
|
||||
ERROR_NET_ADHOCCTL_DISCONNECTED = 0x80410b09,
|
||||
ERROR_NET_ADHOCCTL_NOT_ENTER_GAMEMODE = 0x80410B0C,
|
||||
ERROR_NET_ADHOCCTL_CHANNEL_NOT_AVAILABLE = 0x80410B0D,
|
||||
ERROR_NET_ADHOCCTL_BUSY = 0x80410b10,
|
||||
ERROR_NET_ADHOCCTL_TOO_MANY_HANDLERS = 0x80410b12,
|
||||
ERROR_NET_ADHOCCTL_STACKSIZE_TOO_SHORT = 0x80410B13,
|
||||
|
||||
ERROR_NET_WLAN_INVALID_ARG = 0x80410D13,
|
||||
|
||||
ERROR_NET_NO_SPACE = 0x80410001
|
||||
};
|
||||
|
||||
const size_t MAX_ADHOCCTL_HANDLERS = 32; //4
|
||||
const size_t MAX_MATCHING_HANDLERS = 32; //4
|
||||
|
||||
enum {
|
||||
/**
|
||||
* Matching events used in pspAdhocMatchingCallback
|
||||
*/
|
||||
/** Hello event. optdata contains data if optlen > 0. */
|
||||
PSP_ADHOC_MATCHING_EVENT_HELLO = 1,
|
||||
/** Join request. optdata contains data if optlen > 0. */
|
||||
PSP_ADHOC_MATCHING_EVENT_JOIN = 2,
|
||||
/** Target left matching. */
|
||||
PSP_ADHOC_MATCHING_EVENT_LEFT = 3,
|
||||
/** Join request rejected. */
|
||||
PSP_ADHOC_MATCHING_EVENT_REJECT = 4,
|
||||
/** Join request cancelled. */
|
||||
PSP_ADHOC_MATCHING_EVENT_CANCEL = 5,
|
||||
/** Join request accepted. optdata contains data if optlen > 0. */
|
||||
PSP_ADHOC_MATCHING_EVENT_ACCEPT = 6,
|
||||
/** Matching is complete. */
|
||||
PSP_ADHOC_MATCHING_EVENT_COMPLETE = 7,
|
||||
/** Ping timeout event. */
|
||||
PSP_ADHOC_MATCHING_EVENT_TIMEOUT = 8,
|
||||
/** Error event. */
|
||||
PSP_ADHOC_MATCHING_EVENT_ERROR = 9,
|
||||
/** Peer disconnect event. */
|
||||
PSP_ADHOC_MATCHING_EVENT_DISCONNECT = 10,
|
||||
/** Data received event. optdata contains data if optlen > 0. */
|
||||
PSP_ADHOC_MATCHING_EVENT_DATA = 11,
|
||||
/** Data acknowledged event. */
|
||||
PSP_ADHOC_MATCHING_EVENT_DATA_CONFIRM = 12,
|
||||
/** Data timeout event. */
|
||||
PSP_ADHOC_MATCHING_EVENT_DATA_TIMEOUT = 13,
|
||||
|
||||
/** Internal ping message. */
|
||||
PSP_ADHOC_MATCHING_EVENT_INTERNAL_PING = 100,
|
||||
|
||||
/**
|
||||
* Matching modes used in sceNetAdhocMatchingCreate
|
||||
*/
|
||||
/** Host */
|
||||
PSP_ADHOC_MATCHING_MODE_HOST = 1,
|
||||
/** Client */
|
||||
PSP_ADHOC_MATCHING_MODE_CLIENT = 2,
|
||||
/** Peer to peer */
|
||||
PSP_ADHOC_MATCHING_MODE_PTP = 3,
|
||||
};
|
||||
|
||||
enum {
|
||||
PSP_ADHOC_POLL_READY_TO_SEND = 1, // POLLIN ?
|
||||
PSP_ADHOC_POLL_DATA_AVAILABLE = 2, // POLLPRI ?
|
||||
PSP_ADHOC_POLL_CAN_CONNECT = 4, // POLLOUT ?
|
||||
PSP_ADHOC_POLL_CAN_ACCEPT = 8, // POLLERR ?
|
||||
};
|
||||
|
||||
// Matching modes
|
||||
#define PSP_ADHOC_MATCHING_MODE_PARENT 1
|
||||
#define PSP_ADHOC_MATCHING_MODE_CHILD 2
|
||||
#define PSP_ADHOC_MATCHING_MODE_P2P 3
|
||||
|
||||
// Matching Events
|
||||
#define PSP_ADHOC_MATCHING_EVENT_HELLO 1
|
||||
#define PSP_ADHOC_MATCHING_EVENT_REQUEST 2
|
||||
#define PSP_ADHOC_MATCHING_EVENT_LEAVE 3
|
||||
#define PSP_ADHOC_MATCHING_EVENT_DENY 4
|
||||
#define PSP_ADHOC_MATCHING_EVENT_CANCEL 5
|
||||
#define PSP_ADHOC_MATCHING_EVENT_ACCEPT 6
|
||||
#define PSP_ADHOC_MATCHING_EVENT_ESTABLISHED 7
|
||||
#define PSP_ADHOC_MATCHING_EVENT_TIMEOUT 8
|
||||
#define PSP_ADHOC_MATCHING_EVENT_ERROR 9
|
||||
#define PSP_ADHOC_MATCHING_EVENT_BYE 10
|
||||
#define PSP_ADHOC_MATCHING_EVENT_DATA 11
|
||||
#define PSP_ADHOC_MATCHING_EVENT_DATA_ACK 12
|
||||
#define PSP_ADHOC_MATCHING_EVENT_DATA_TIMEOUT 13
|
||||
|
||||
// Peer Status
|
||||
// Offer only seen in P2P and PARENT mode after hello
|
||||
// Parent only seen in CHILD mode after connection accept
|
||||
// Child only seen in PARENT and CHILD mode after connection accept
|
||||
// P2P only seen in P2P mode after connection accept
|
||||
// Requester only seen in P2P and PARENT mode after connection request
|
||||
#define PSP_ADHOC_MATCHING_PEER_OFFER 1
|
||||
#define PSP_ADHOC_MATCHING_PEER_PARENT 2
|
||||
#define PSP_ADHOC_MATCHING_PEER_CHILD 3
|
||||
#define PSP_ADHOC_MATCHING_PEER_P2P 4
|
||||
#define PSP_ADHOC_MATCHING_PEER_INCOMING_REQUEST 5
|
||||
#define PSP_ADHOC_MATCHING_PEER_OUTGOING_REQUEST 6
|
||||
#define PSP_ADHOC_MATCHING_PEER_CANCEL_IN_PROGRESS 7
|
||||
|
||||
// Stack Targets
|
||||
#define PSP_ADHOC_MATCHING_INPUT_STACK 1
|
||||
#define PSP_ADHOC_MATCHING_EVENT_STACK 2
|
||||
|
||||
// Packet Opcodes
|
||||
#define PSP_ADHOC_MATCHING_PACKET_PING 0
|
||||
#define PSP_ADHOC_MATCHING_PACKET_HELLO 1
|
||||
#define PSP_ADHOC_MATCHING_PACKET_JOIN 2
|
||||
#define PSP_ADHOC_MATCHING_PACKET_ACCEPT 3
|
||||
#define PSP_ADHOC_MATCHING_PACKET_CANCEL 4
|
||||
#define PSP_ADHOC_MATCHING_PACKET_BULK 5
|
||||
#define PSP_ADHOC_MATCHING_PACKET_BULK_ABORT 6
|
||||
#define PSP_ADHOC_MATCHING_PACKET_BIRTH 7
|
||||
#define PSP_ADHOC_MATCHING_PACKET_DEATH 8
|
||||
#define PSP_ADHOC_MATCHING_PACKET_BYE 9
|
||||
|
||||
// Pro Adhoc Server Packets Opcodes
|
||||
#define OPCODE_PING 0
|
||||
#define OPCODE_LOGIN 1
|
||||
#define OPCODE_CONNECT 2
|
||||
@ -445,17 +740,60 @@ typedef struct {
|
||||
SceNetAdhocctlChatPacketC2S base;
|
||||
SceNetAdhocctlNickname name;
|
||||
} PACK SceNetAdhocctlChatPacketS2C;
|
||||
|
||||
// P2P Packet
|
||||
typedef struct {
|
||||
SceNetEtherAddr fromMAC;
|
||||
SceNetEtherAddr toMAC;
|
||||
u32_le dataPtr; //void * data
|
||||
} PACK SceNetAdhocMatchingPacketBase;
|
||||
|
||||
// P2P Accept Packet
|
||||
typedef struct {
|
||||
SceNetAdhocctlPacketBase base; //opcode
|
||||
u32_le dataLen;
|
||||
u32_le numMACs; //number of peers
|
||||
u32_le dataPtr; //void * data
|
||||
/*u32_le*/PSPPointer<SceNetEtherAddr> MACsPtr; //peers //SceNetEtherAddr * MACs
|
||||
} PACK SceNetAdhocMatchingPacketAccept;
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#pragma pack(pop)
|
||||
#endif
|
||||
|
||||
class AfterMatchingMipsCall : public Action {
|
||||
public:
|
||||
AfterMatchingMipsCall() {}
|
||||
static Action *Create() { return new AfterMatchingMipsCall(); }
|
||||
void DoState(PointerWrap &p) {
|
||||
auto s = p.Section("AfterMatchingMipsCall", 1, 2);
|
||||
if (!s)
|
||||
return;
|
||||
|
||||
p.Do(EventID);
|
||||
//context = NULL;
|
||||
}
|
||||
void run(MipsCall &call);
|
||||
void SetContextID(u32 ContextID, u32 eventId);
|
||||
void SetContext(SceNetAdhocMatchingContext *Context, u32 eventId) { context = Context; EventID = eventId; }
|
||||
|
||||
private:
|
||||
u32 EventID;
|
||||
SceNetAdhocMatchingContext *context;
|
||||
};
|
||||
|
||||
extern int actionAfterMatchingMipsCall;
|
||||
extern bool IsAdhocctlInCB;
|
||||
|
||||
// Aux vars
|
||||
extern int metasocket;
|
||||
extern SceNetAdhocctlParameter parameter;
|
||||
extern SceNetAdhocctlAdhocId product_code;
|
||||
extern std::thread friendFinderThread;
|
||||
extern recursive_mutex peerlock;
|
||||
extern SceNetAdhocPdpStat * pdp[255];
|
||||
extern SceNetAdhocPtpStat * ptp[255];
|
||||
extern std::map<int, AdhocctlHandler> adhocctlHandlers;
|
||||
|
||||
extern uint32_t fakePoolSize;
|
||||
extern SceNetAdhocMatchingContext * contexts;
|
||||
@ -463,10 +801,14 @@ extern int one;
|
||||
extern bool friendFinderRunning;
|
||||
extern SceNetAdhocctlPeerInfo * friends;
|
||||
extern SceNetAdhocctlScanInfo * networks;
|
||||
extern int eventHandlerUpdate;
|
||||
extern int eventAdhocctlHandlerUpdate;
|
||||
extern int eventMatchingHandlerUpdate;
|
||||
extern int threadStatus;
|
||||
// End of Aux vars
|
||||
|
||||
// Check if Matching callback is running
|
||||
bool IsMatchingInCallback(SceNetAdhocMatchingContext * context);
|
||||
|
||||
/**
|
||||
* Local MAC Check
|
||||
* @param saddr To-be-checked MAC Address
|
||||
@ -491,10 +833,10 @@ int isPTPPortInUse(uint16_t port);
|
||||
/*
|
||||
* Matching Members
|
||||
*/
|
||||
SceNetAdhocMatchingMemberInternal* findMember(SceNetAdhocMatchingContext * context, SceNetEtherAddr * mac);
|
||||
void addMember(SceNetAdhocMatchingContext * context, SceNetEtherAddr * mac);
|
||||
void deleteMember(SceNetAdhocMatchingContext * context, SceNetEtherAddr * mac);
|
||||
void deleteAllMembers(SceNetAdhocMatchingContext * context);
|
||||
//SceNetAdhocMatchingMemberInternal* findMember(SceNetAdhocMatchingContext * context, SceNetEtherAddr * mac); // findPeer
|
||||
SceNetAdhocMatchingMemberInternal* addMember(SceNetAdhocMatchingContext * context, SceNetEtherAddr * mac);
|
||||
//void deleteMember(SceNetAdhocMatchingContext * context, SceNetEtherAddr * mac); // deletePeer
|
||||
//void deleteAllMembers(SceNetAdhocMatchingContext * context); // clearPeerList
|
||||
|
||||
|
||||
/**
|
||||
@ -503,6 +845,11 @@ void deleteAllMembers(SceNetAdhocMatchingContext * context);
|
||||
*/
|
||||
void addFriend(SceNetAdhocctlConnectPacketS2C * packet);
|
||||
|
||||
/*
|
||||
* Find a Peer/Friend by MAC address
|
||||
*/
|
||||
SceNetAdhocctlPeerInfo * findFriend(SceNetEtherAddr * MAC);
|
||||
|
||||
/**
|
||||
* Changes the Blocking Mode of the socket
|
||||
* @param fd File Descriptor of the socket
|
||||
@ -542,19 +889,6 @@ void deleteAllPTP(void);
|
||||
*/
|
||||
void deleteFriendByIP(uint32_t ip);
|
||||
|
||||
/**
|
||||
* Find Free Matching ID
|
||||
* @return First unoccupied Matching ID
|
||||
*/
|
||||
int findFreeMatchingID(void);
|
||||
|
||||
/**
|
||||
* Find Internal Matching Context for Matching ID
|
||||
* @param id Matching ID
|
||||
* @return Matching Context Pointer or... NULL
|
||||
*/
|
||||
SceNetAdhocMatchingContext * findMatchingContext(int id);
|
||||
|
||||
/**
|
||||
* Recursive Memory Freeing-Helper for Friend-Structures
|
||||
* @param node Current Node in List
|
||||
@ -569,6 +903,178 @@ void freeFriendsRecursive(SceNetAdhocctlPeerInfo * node);
|
||||
*/
|
||||
int friendFinder();
|
||||
|
||||
/**
|
||||
* Find Free Matching ID
|
||||
* @return First unoccupied Matching ID
|
||||
*/
|
||||
int findFreeMatchingID(void);
|
||||
|
||||
/**
|
||||
* Find Internal Matching Context for Matching ID
|
||||
* @param id Matching ID
|
||||
* @return Matching Context Pointer or... NULL
|
||||
*/
|
||||
SceNetAdhocMatchingContext * findMatchingContext(int id);
|
||||
|
||||
/*
|
||||
* Notify Matching Event Handler
|
||||
*/
|
||||
void notifyMatchingHandler(SceNetAdhocMatchingContext * context, ThreadMessage * msg, void * opt, u32 &bufAddr, u32 &bufLen, u32_le * args);
|
||||
// Notifiy Adhocctl Handlers
|
||||
void notifyAdhocctlHandlers(int flag, int error);
|
||||
|
||||
/*
|
||||
* Packet Handler
|
||||
*/
|
||||
void postAcceptCleanPeerList(SceNetAdhocMatchingContext * context);
|
||||
void postAcceptAddSiblings(SceNetAdhocMatchingContext * context, int siblingcount, SceNetEtherAddr * siblings);
|
||||
|
||||
/*
|
||||
* Timeout Handler
|
||||
*/
|
||||
void handleTimeout(SceNetAdhocMatchingContext * context);
|
||||
|
||||
/**
|
||||
* Clear Thread Stack
|
||||
* @param context Matching Context Pointer
|
||||
* @param stack ADHOC_MATCHING_EVENT_STACK or ADHOC_MATCHING_INPUT_STACK
|
||||
*/
|
||||
void clearStack(SceNetAdhocMatchingContext * context, int stack);
|
||||
|
||||
/**
|
||||
* Clear Peer List
|
||||
* @param context Matching Context Pointer
|
||||
*/
|
||||
void clearPeerList(SceNetAdhocMatchingContext * context);
|
||||
|
||||
/**
|
||||
* Find Outgoing Request Target Peer
|
||||
* @param context Matching Context Pointer
|
||||
* @return Internal Peer Reference or... NULL
|
||||
*/
|
||||
SceNetAdhocMatchingMemberInternal * findOutgoingRequest(SceNetAdhocMatchingContext * context);
|
||||
|
||||
/**
|
||||
* Send Accept Message from P2P -> P2P or Parent -> Children
|
||||
* @param context Matching Context Pointer
|
||||
* @param peer Target Peer
|
||||
* @param optlen Optional Data Length
|
||||
* @param opt Optional Data
|
||||
*/
|
||||
void sendAcceptMessage(SceNetAdhocMatchingContext * context, SceNetAdhocMatchingMemberInternal * peer, int optlen, const void * opt);
|
||||
|
||||
/**
|
||||
* Send Join Request from P2P -> P2P or Children -> Parent
|
||||
* @param context Matching Context Pointer
|
||||
* @param peer Target Peer
|
||||
* @param optlen Optional Data Length
|
||||
* @param opt Optional Data
|
||||
*/
|
||||
void sendJoinRequest(SceNetAdhocMatchingContext * context, SceNetAdhocMatchingMemberInternal * peer, int optlen, const void * opt);
|
||||
|
||||
/**
|
||||
* Send Cancel Message to Peer (has various effects)
|
||||
* @param context Matching Context Pointer
|
||||
* @param peer Target Peer
|
||||
* @param optlen Optional Data Length
|
||||
* @param opt Optional Data
|
||||
*/
|
||||
void sendCancelMessage(SceNetAdhocMatchingContext * context, SceNetAdhocMatchingMemberInternal * peer, int optlen, const void * opt);
|
||||
|
||||
/**
|
||||
* Send Bulk Data to Peer
|
||||
* @param context Matching Context Pointer
|
||||
* @param peer Target Peer
|
||||
* @param datalen Data Length
|
||||
* @param data Data
|
||||
*/
|
||||
void sendBulkData(SceNetAdhocMatchingContext * context, SceNetAdhocMatchingMemberInternal * peer, int datalen, const void * data);
|
||||
|
||||
/**
|
||||
* Abort Bulk Data Transfer (if in progress)
|
||||
* @param context Matching Context Pointer
|
||||
* @param peer Target Peer
|
||||
*/
|
||||
void abortBulkTransfer(SceNetAdhocMatchingContext * context, SceNetAdhocMatchingMemberInternal * peer);
|
||||
|
||||
/**
|
||||
* Notify all established Peers about new Kid in the Neighborhood
|
||||
* @param context Matching Context Pointer
|
||||
* @param peer New Kid
|
||||
*/
|
||||
void sendBirthMessage(SceNetAdhocMatchingContext * context, SceNetAdhocMatchingMemberInternal * peer);
|
||||
|
||||
/**
|
||||
* Notify all established Peers about abandoned Child
|
||||
* @param context Matching Context Pointer
|
||||
* @param peer Abandoned Child
|
||||
*/
|
||||
void sendDeathMessage(SceNetAdhocMatchingContext * context, SceNetAdhocMatchingMemberInternal * peer);
|
||||
|
||||
/**
|
||||
* Count Children Peers (for Parent)
|
||||
* @param context Matching Context Pointer
|
||||
* @return Number of Children
|
||||
*/
|
||||
s32_le countChildren(SceNetAdhocMatchingContext * context);
|
||||
|
||||
/**
|
||||
* Delete Peer from List
|
||||
* @param context Matching Context Pointer
|
||||
* @param peer Internal Peer Reference
|
||||
*/
|
||||
void deletePeer(SceNetAdhocMatchingContext * context, SceNetAdhocMatchingMemberInternal * peer);
|
||||
|
||||
/**
|
||||
* Find Peer in Context by MAC
|
||||
* @param context Matching Context Pointer
|
||||
* @param mac Peer MAC Address
|
||||
* @return Internal Peer Reference or... NULL
|
||||
*/
|
||||
SceNetAdhocMatchingMemberInternal * findPeer(SceNetAdhocMatchingContext * context, SceNetEtherAddr * mac);
|
||||
|
||||
/**
|
||||
* Find Parent Peer
|
||||
* @param context Matching Context Pointer
|
||||
* @return Internal Peer Reference or... NULL
|
||||
*/
|
||||
SceNetAdhocMatchingMemberInternal * findParent(SceNetAdhocMatchingContext * context);
|
||||
|
||||
/**
|
||||
* Find P2P Buddy Peer
|
||||
* @param context Matching Context Pointer
|
||||
* @return Internal Peer Reference or... NULL
|
||||
*/
|
||||
SceNetAdhocMatchingMemberInternal * findP2P(SceNetAdhocMatchingContext * context);
|
||||
|
||||
/**
|
||||
* Return Number of Connected Peers
|
||||
* @param context Matching Context Pointer
|
||||
* @return Number of Connected Peers
|
||||
*/
|
||||
uint32_t countConnectedPeers(SceNetAdhocMatchingContext * context);
|
||||
|
||||
/**
|
||||
* Spawn Local Event for Event Thread
|
||||
* @param context Matching Context Pointer
|
||||
* @param event Event ID
|
||||
* @param mac Event Source MAC
|
||||
* @param optlen Optional Data Length
|
||||
* @param opt Optional Data
|
||||
*/
|
||||
void spawnLocalEvent(SceNetAdhocMatchingContext * context, int event, SceNetEtherAddr * mac, int optlen, void * opt);
|
||||
|
||||
/*
|
||||
* Matching Event Thread (Send Ping and Hello Data) Part of AdhocMatching
|
||||
*/
|
||||
//int matchingEvent(int matchingId);
|
||||
//int matchingEventThread(int matchingId); //(uint32_t args, void * argp)
|
||||
|
||||
/*
|
||||
* Matching Input Thread (process Members) Part of AdhocMatching
|
||||
*/
|
||||
//int matchingInputThread(int matchingId); //(uint32_t args, void * argp)
|
||||
|
||||
/**
|
||||
* Return Number of active Peers in the same Network as the Local Player
|
||||
* @return Number of active Peers
|
||||
@ -582,6 +1088,24 @@ int getActivePeerCount(void);
|
||||
int getLocalIp(sockaddr_in * SocketAddress);
|
||||
uint32_t getLocalIp(int sock);
|
||||
|
||||
/*
|
||||
* Get Socket Buffer Size (opt = SO_RCVBUF/SO_SNDBUF)
|
||||
*/
|
||||
int getSockBufferSize(int sock, int opt);
|
||||
|
||||
/*
|
||||
* Set Socket Buffer Size (opt = SO_RCVBUF/SO_SNDBUF)
|
||||
*/
|
||||
int setSockBufferSize(int sock, int opt, int size);
|
||||
|
||||
/**
|
||||
* Return the Number of Players with the chosen Nickname in the Local Users current Network
|
||||
* @param nickname To-be-searched Nickname
|
||||
* @return Number of matching Players
|
||||
*/
|
||||
int getNicknameCount(const char * nickname);
|
||||
|
||||
|
||||
/**
|
||||
* Joins two 32 bits number into a 64 bit one
|
||||
* @param num1: first number
|
||||
@ -610,6 +1134,12 @@ void getLocalMac(SceNetEtherAddr * addr);
|
||||
*/
|
||||
uint16_t getLocalPort(int sock);
|
||||
|
||||
/**
|
||||
* PDP Socket Counter
|
||||
* @return Number of internal PDP Sockets
|
||||
*/
|
||||
int getPDPSocketCount(void);
|
||||
|
||||
/**
|
||||
* PTP Socket Counter
|
||||
* @return Number of internal PTP Sockets
|
||||
@ -627,7 +1157,7 @@ int initNetwork(SceNetAdhocctlAdhocId *adhocid);
|
||||
/**
|
||||
* Broadcast MAC Check
|
||||
* @param addr To-be-checked MAC Address
|
||||
* @return true if Broadcast MAC, false otherwise.
|
||||
* @return true if Broadcast MAC or... 0
|
||||
*/
|
||||
bool isBroadcastMAC(const SceNetEtherAddr * addr);
|
||||
|
||||
@ -635,7 +1165,7 @@ bool isBroadcastMAC(const SceNetEtherAddr * addr);
|
||||
* Resolve IP to MAC
|
||||
* @param ip Peer IP Address
|
||||
* @param mac OUT: Peer MAC
|
||||
* @return true on success, false otherwise.
|
||||
* @return true on success
|
||||
*/
|
||||
bool resolveIP(uint32_t ip, SceNetEtherAddr * mac);
|
||||
|
||||
@ -643,13 +1173,19 @@ bool resolveIP(uint32_t ip, SceNetEtherAddr * mac);
|
||||
* Resolve MAC to IP
|
||||
* @param mac Peer MAC Address
|
||||
* @param ip OUT: Peer IP
|
||||
* @return true on success, false otherwise.
|
||||
* @return true on success
|
||||
*/
|
||||
bool resolveMAC(SceNetEtherAddr * mac, uint32_t * ip);
|
||||
|
||||
/**
|
||||
* Check whether Network Name contains only valid symbols
|
||||
* @param group_name To-be-checked Network Name
|
||||
* @return true if valid, false otherwise.
|
||||
* @return 1 if valid or... 0
|
||||
*/
|
||||
bool validNetworkName(const SceNetAdhocctlGroupName * groupname);
|
||||
|
||||
// Convert Matching Event Code to String
|
||||
char* getMatchingEventStr(int code, char* buf);
|
||||
|
||||
// Convert Matching Opcode ID to String
|
||||
char* getMatchingOpcodeStr(int code, char* buf);
|
||||
|
1641
Core/HLE/proAdhocServer.cpp
Normal file
1641
Core/HLE/proAdhocServer.cpp
Normal file
File diff suppressed because it is too large
Load Diff
387
Core/HLE/proAdhocServer.h
Normal file
387
Core/HLE/proAdhocServer.h
Normal file
@ -0,0 +1,387 @@
|
||||
// Copyright (c) 2014- PPSSPP Project.
|
||||
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, version 2.0 or later versions.
|
||||
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License 2.0 for more details.
|
||||
|
||||
// A copy of the GPL 2.0 should have been included with the program.
|
||||
// If not, see http://www.gnu.org/licenses/
|
||||
|
||||
// Official git repository and contact information can be found at
|
||||
// https://github.com/hrydgard/ppsspp and http://www.ppsspp.org/.
|
||||
|
||||
|
||||
// proAdhocServer
|
||||
|
||||
// This is a direct port of Coldbird's code from http://code.google.com/p/aemu/
|
||||
// All credit goes to him!
|
||||
|
||||
#ifndef _PROADHOCSERVER_H_
|
||||
#define _PROADHOCSERVER_H_
|
||||
|
||||
#include <stdint.h>
|
||||
#include <time.h>
|
||||
#include "proAdhoc.h"
|
||||
|
||||
/*#ifdef _MSC_VER
|
||||
#define PACK
|
||||
#undef errno
|
||||
#define errno WSAGetLastError()
|
||||
#else
|
||||
#define INVALID_SOCKET -1
|
||||
#define SOCKET_ERROR -1
|
||||
#define closesocket close
|
||||
#define PACK __attribute__((packed))
|
||||
#endif*/
|
||||
|
||||
// Server Listening Port
|
||||
//#define SERVER_PORT 27312
|
||||
|
||||
// Listener Connection Backlog (aka. Max Concurrent Logins)
|
||||
#define SERVER_LISTEN_BACKLOG 128
|
||||
|
||||
// Server User Maximum
|
||||
#define SERVER_USER_MAXIMUM 1024
|
||||
|
||||
// Server User Timeout (in seconds)
|
||||
#define SERVER_USER_TIMEOUT 15
|
||||
|
||||
// Server SQLite3 Database
|
||||
#define SERVER_DATABASE "database.db"
|
||||
|
||||
// Server Status Logfile
|
||||
#define SERVER_STATUS_XMLOUT "www/status.xml"
|
||||
|
||||
// Server Shutdown Message
|
||||
#define SERVER_SHUTDOWN_MESSAGE "PROMETHEUS HUB IS SHUTTING DOWN!"
|
||||
|
||||
typedef struct db_crosslink{
|
||||
char id_from[PRODUCT_CODE_LENGTH + 1]; //SceNetAdhocctlProductCode id_from;
|
||||
char id_to[PRODUCT_CODE_LENGTH + 1]; //SceNetAdhocctlProductCode id_to;
|
||||
} db_crosslink;
|
||||
|
||||
typedef struct db_productid {
|
||||
char id[PRODUCT_CODE_LENGTH + 1]; //SceNetAdhocctlProductCode id;
|
||||
char name[ADHOCCTL_NICKNAME_LEN]; //Title name
|
||||
} db_productid;
|
||||
|
||||
/* PSPSTRUCTS */
|
||||
|
||||
// Ethernet Address (MAC)
|
||||
/*#define ETHER_ADDR_LEN 6
|
||||
typedef struct SceNetEtherAddr {
|
||||
uint8_t data[ETHER_ADDR_LEN];
|
||||
} SceNetEtherAddr;
|
||||
|
||||
// Adhoc Virtual Network Name (1234ABCD)
|
||||
#define ADHOCCTL_GROUPNAME_LEN 8
|
||||
typedef struct SceNetAdhocctlGroupName {
|
||||
uint8_t data[ADHOCCTL_GROUPNAME_LEN];
|
||||
} SceNetAdhocctlGroupName;
|
||||
|
||||
// Player Nickname
|
||||
#define ADHOCCTL_NICKNAME_LEN 128
|
||||
typedef struct SceNetAdhocctlNickname {
|
||||
uint8_t data[ADHOCCTL_NICKNAME_LEN];
|
||||
} SceNetAdhocctlNickname;*/
|
||||
|
||||
/* PACKETS */
|
||||
|
||||
/*#define OPCODE_PING 0
|
||||
#define OPCODE_LOGIN 1
|
||||
#define OPCODE_CONNECT 2
|
||||
#define OPCODE_DISCONNECT 3
|
||||
#define OPCODE_SCAN 4
|
||||
#define OPCODE_SCAN_COMPLETE 5
|
||||
#define OPCODE_CONNECT_BSSID 6
|
||||
#define OPCODE_CHAT 7
|
||||
|
||||
// PSP Product Code
|
||||
#define PRODUCT_CODE_LENGTH 9
|
||||
typedef struct
|
||||
{
|
||||
// Game Product Code (ex. ULUS12345)
|
||||
char data[PRODUCT_CODE_LENGTH];
|
||||
} PACK SceNetAdhocctlProductCode; // __attribute__((packed))
|
||||
|
||||
// Basic Packet
|
||||
typedef struct
|
||||
{
|
||||
uint8_t opcode;
|
||||
} PACK SceNetAdhocctlPacketBase;
|
||||
|
||||
// C2S Login Packet
|
||||
typedef struct
|
||||
{
|
||||
SceNetAdhocctlPacketBase base;
|
||||
SceNetEtherAddr mac;
|
||||
SceNetAdhocctlNickname name;
|
||||
SceNetAdhocctlProductCode game;
|
||||
} PACK SceNetAdhocctlLoginPacketC2S;
|
||||
|
||||
// C2S Connect Packet
|
||||
typedef struct
|
||||
{
|
||||
SceNetAdhocctlPacketBase base;
|
||||
SceNetAdhocctlGroupName group;
|
||||
} PACK SceNetAdhocctlConnectPacketC2S;
|
||||
|
||||
// C2S Chat Packet
|
||||
typedef struct
|
||||
{
|
||||
SceNetAdhocctlPacketBase base;
|
||||
char message[64];
|
||||
} PACK SceNetAdhocctlChatPacketC2S;
|
||||
|
||||
// S2C Connect Packet
|
||||
typedef struct
|
||||
{
|
||||
SceNetAdhocctlPacketBase base;
|
||||
SceNetAdhocctlNickname name;
|
||||
SceNetEtherAddr mac;
|
||||
uint32_t ip;
|
||||
} PACK SceNetAdhocctlConnectPacketS2C;
|
||||
|
||||
// S2C Disconnect Packet
|
||||
typedef struct
|
||||
{
|
||||
SceNetAdhocctlPacketBase base;
|
||||
uint32_t ip;
|
||||
} PACK SceNetAdhocctlDisconnectPacketS2C;
|
||||
|
||||
// S2C Scan Packet
|
||||
typedef struct
|
||||
{
|
||||
SceNetAdhocctlPacketBase base;
|
||||
SceNetAdhocctlGroupName group;
|
||||
SceNetEtherAddr mac;
|
||||
} PACK SceNetAdhocctlScanPacketS2C;
|
||||
|
||||
// S2C Connect BSSID Packet
|
||||
typedef struct
|
||||
{
|
||||
SceNetAdhocctlPacketBase base;
|
||||
SceNetEtherAddr mac;
|
||||
} PACK SceNetAdhocctlConnectBSSIDPacketS2C;
|
||||
|
||||
// S2C Chat Packet
|
||||
typedef struct
|
||||
{
|
||||
SceNetAdhocctlChatPacketC2S base;
|
||||
SceNetAdhocctlNickname name;
|
||||
} PACK SceNetAdhocctlChatPacketS2C;*/
|
||||
|
||||
/* USER */
|
||||
|
||||
// User States
|
||||
#define USER_STATE_WAITING 0
|
||||
#define USER_STATE_LOGGED_IN 1
|
||||
#define USER_STATE_TIMED_OUT 2
|
||||
|
||||
// PSP Resolver Information
|
||||
typedef struct
|
||||
{
|
||||
// PSP MAC Address
|
||||
SceNetEtherAddr mac;
|
||||
|
||||
// PSP Hotspot IP Address
|
||||
uint32_t ip;
|
||||
|
||||
// PSP Player Name
|
||||
SceNetAdhocctlNickname name;
|
||||
} SceNetAdhocctlResolverInfo;
|
||||
|
||||
// Type Prototypes
|
||||
typedef struct SceNetAdhocctlGameNode SceNetAdhocctlGameNode;
|
||||
typedef struct SceNetAdhocctlGroupNode SceNetAdhocctlGroupNode;
|
||||
|
||||
// Double-Linked User List
|
||||
typedef struct SceNetAdhocctlUserNode {
|
||||
// Next Element
|
||||
struct SceNetAdhocctlUserNode * next;
|
||||
|
||||
// Previous Element
|
||||
struct SceNetAdhocctlUserNode * prev;
|
||||
|
||||
// Next Element (Group)
|
||||
struct SceNetAdhocctlUserNode * group_next;
|
||||
|
||||
// Previous Element
|
||||
struct SceNetAdhocctlUserNode * group_prev;
|
||||
|
||||
// Resolver Information
|
||||
SceNetAdhocctlResolverInfo resolver;
|
||||
|
||||
// Game Link
|
||||
SceNetAdhocctlGameNode * game;
|
||||
|
||||
// Group Link
|
||||
SceNetAdhocctlGroupNode * group;
|
||||
|
||||
// TCP Socket
|
||||
int stream;
|
||||
|
||||
// Last Ping Update
|
||||
time_t last_recv;
|
||||
|
||||
// RX Buffer
|
||||
uint8_t rx[1024];
|
||||
uint32_t rxpos;
|
||||
} SceNetAdhocctlUserNode;
|
||||
|
||||
// Double-Linked Game List
|
||||
struct SceNetAdhocctlGameNode {
|
||||
// Next Element
|
||||
struct SceNetAdhocctlGameNode * next;
|
||||
|
||||
// Previous Element
|
||||
struct SceNetAdhocctlGameNode * prev;
|
||||
|
||||
// PSP Game Product Code
|
||||
SceNetAdhocctlProductCode game;
|
||||
|
||||
// Number of Players
|
||||
uint32_t playercount;
|
||||
|
||||
// Number of Groups
|
||||
uint32_t groupcount;
|
||||
|
||||
// Double-Linked Group List
|
||||
SceNetAdhocctlGroupNode * group;
|
||||
};
|
||||
|
||||
// Double-Linked Group List
|
||||
struct SceNetAdhocctlGroupNode {
|
||||
// Next Element
|
||||
struct SceNetAdhocctlGroupNode * next;
|
||||
|
||||
// Previous Element
|
||||
struct SceNetAdhocctlGroupNode * prev;
|
||||
|
||||
// Game Link
|
||||
SceNetAdhocctlGameNode * game;
|
||||
|
||||
// PSP Adhoc Group Name
|
||||
SceNetAdhocctlGroupName group;
|
||||
|
||||
// Number of Players
|
||||
uint32_t playercount;
|
||||
|
||||
// Double-Linked Player List
|
||||
SceNetAdhocctlUserNode * player;
|
||||
};
|
||||
|
||||
// User Count
|
||||
extern uint32_t _db_user_count;
|
||||
|
||||
// User Database
|
||||
extern SceNetAdhocctlUserNode * _db_user;
|
||||
|
||||
// Game Database
|
||||
extern SceNetAdhocctlGameNode * _db_game;
|
||||
|
||||
void __AdhocServerInit();
|
||||
|
||||
/**
|
||||
* Login User into Database (Stream)
|
||||
* @param fd Socket
|
||||
* @param ip IP Address (Network Order)
|
||||
*/
|
||||
void login_user_stream(int fd, uint32_t ip);
|
||||
|
||||
/**
|
||||
* Login User into Database (Login Data)
|
||||
* @param user User Node
|
||||
* @param data Login Packet
|
||||
*/
|
||||
void login_user_data(SceNetAdhocctlUserNode * user, SceNetAdhocctlLoginPacketC2S * data);
|
||||
|
||||
/**
|
||||
* Logout User from Database
|
||||
* @param user User Node
|
||||
*/
|
||||
void logout_user(SceNetAdhocctlUserNode * user);
|
||||
|
||||
/**
|
||||
* Free Database Memory
|
||||
*/
|
||||
void free_database(void);
|
||||
|
||||
/**
|
||||
* Connect User to Game Group
|
||||
* @param user User Node
|
||||
* @param group Group Name
|
||||
*/
|
||||
void connect_user(SceNetAdhocctlUserNode * user, SceNetAdhocctlGroupName * group);
|
||||
|
||||
/**
|
||||
* Disconnect User from Game Group
|
||||
* @param user User Node
|
||||
*/
|
||||
void disconnect_user(SceNetAdhocctlUserNode * user);
|
||||
|
||||
/**
|
||||
* Send Game Group List
|
||||
* @param user User Node
|
||||
*/
|
||||
void send_scan_results(SceNetAdhocctlUserNode * user);
|
||||
|
||||
/**
|
||||
* Spread Chat Message in P2P Network
|
||||
* @param user Sender User Node
|
||||
* @param message Chat Message
|
||||
*/
|
||||
void spread_message(SceNetAdhocctlUserNode * user, char * message);
|
||||
|
||||
/**
|
||||
* Get User State
|
||||
* @param user User Node
|
||||
*/
|
||||
int get_user_state(SceNetAdhocctlUserNode * user);
|
||||
|
||||
/**
|
||||
* Clear RX Buffer
|
||||
* @param user User Node
|
||||
* @param clear Number of Bytes to clear (-1 for all)
|
||||
*/
|
||||
void clear_user_rxbuf(SceNetAdhocctlUserNode * user, int clear);
|
||||
|
||||
/**
|
||||
* Patch Game Product Code
|
||||
* @param product To-be-patched Product Code
|
||||
* @param from If the Product Code matches this...
|
||||
* @param to ... then change it to this one.
|
||||
*/
|
||||
void game_product_relink(SceNetAdhocctlProductCode * product, char * from, char * to);
|
||||
|
||||
/**
|
||||
* Game Product Override (used for mixing multi-region games)
|
||||
* @param product IN: Source Product OUT: Override Product
|
||||
*/
|
||||
void game_product_override(SceNetAdhocctlProductCode * product);
|
||||
|
||||
/* STATUS */
|
||||
|
||||
/**
|
||||
* Update Status Logfile
|
||||
*/
|
||||
void update_status(void);
|
||||
|
||||
/**
|
||||
* Server Entry Point
|
||||
* @param argc Number of Arguments
|
||||
* @param argv Arguments
|
||||
* @return OS Error Code
|
||||
*/
|
||||
int proAdhocServerThread(int port); // (int argc, char * argv[])
|
||||
|
||||
//extern int _status;
|
||||
extern bool adhocServerRunning;
|
||||
extern std::thread adhocServerThread;
|
||||
|
||||
#endif
|
@ -166,8 +166,8 @@ void __KernelShutdown()
|
||||
__AudioCodecShutdown();
|
||||
__VideoPmpShutdown();
|
||||
__AACShutdown();
|
||||
__NetShutdown();
|
||||
__NetAdhocShutdown();
|
||||
__NetShutdown();
|
||||
__FontShutdown();
|
||||
|
||||
__Mp3Shutdown();
|
||||
|
@ -3309,7 +3309,7 @@ static bool __CanExecuteCallbackNow(Thread *thread) {
|
||||
return g_inCbCount == 0;
|
||||
}
|
||||
|
||||
static void __KernelCallAddress(Thread *thread, u32 entryPoint, Action *afterAction, const u32 args[], int numargs, bool reschedAfter, SceUID cbId)
|
||||
void __KernelCallAddress(Thread *thread, u32 entryPoint, Action *afterAction, const u32 args[], int numargs, bool reschedAfter, SceUID cbId)
|
||||
{
|
||||
hleSkipDeadbeef();
|
||||
_dbg_assert_msg_(SCEKERNEL, numargs <= 6, "MipsCalls can only take 6 args.");
|
||||
|
@ -26,9 +26,12 @@
|
||||
// There's a good description of the thread scheduling rules in:
|
||||
// http://code.google.com/p/jpcsp/source/browse/trunk/src/jpcsp/HLE/modules150/ThreadManForUser.java
|
||||
|
||||
class Thread;
|
||||
|
||||
int sceKernelChangeThreadPriority(SceUID threadID, int priority);
|
||||
SceUID __KernelCreateThreadInternal(const char *threadName, SceUID moduleID, u32 entry, u32 prio, int stacksize, u32 attr);
|
||||
int __KernelCreateThread(const char *threadName, SceUID moduleID, u32 entry, u32 prio, int stacksize, u32 attr, u32 optionAddr);
|
||||
Thread* __KernelCreateThread(SceUID &id, SceUID moduleId, const char *name, u32 entryPoint, u32 priority, int stacksize, u32 attr);
|
||||
int sceKernelCreateThread(const char *threadName, u32 entry, u32 prio, int stacksize, u32 attr, u32 optionAddr);
|
||||
int sceKernelDelayThread(u32 usec);
|
||||
int sceKernelDelayThreadCB(u32 usec);
|
||||
@ -211,6 +214,7 @@ class Action;
|
||||
|
||||
// Not an official Callback object, just calls a mips function on the current thread.
|
||||
void __KernelDirectMipsCall(u32 entryPoint, Action *afterAction, u32 args[], int numargs, bool reschedAfter);
|
||||
void __KernelCallAddress(Thread *thread, u32 entryPoint, Action *afterAction, const u32 args[], int numargs, bool reschedAfter, SceUID cbId);
|
||||
|
||||
void __KernelReturnFromMipsCall(); // Called as HLE function
|
||||
bool __KernelInCallback();
|
||||
@ -219,7 +223,6 @@ bool __KernelInCallback();
|
||||
bool __KernelCheckCallbacks();
|
||||
bool __KernelForceCallbacks();
|
||||
bool __KernelCurHasReadyCallbacks();
|
||||
class Thread;
|
||||
void __KernelSwitchContext(Thread *target, const char *reason);
|
||||
bool __KernelExecutePendingMipsCalls(Thread *currentThread, bool reschedAfter);
|
||||
void __KernelNotifyCallback(SceUID cbId, int notifyArg);
|
||||
|
@ -15,6 +15,7 @@
|
||||
// Official git repository and contact information can be found at
|
||||
// https://github.com/hrydgard/ppsspp and http://www.ppsspp.org/.
|
||||
|
||||
|
||||
#include "net/resolve.h"
|
||||
#include "util/text/parsers.h"
|
||||
|
||||
@ -28,54 +29,18 @@
|
||||
#include "sceKernel.h"
|
||||
#include "sceKernelThread.h"
|
||||
#include "sceKernelMutex.h"
|
||||
#include "sceNet.h"
|
||||
#include "sceUtility.h"
|
||||
|
||||
#include "Core/HLE/proAdhoc.h"
|
||||
#include "Core/HLE/sceNetAdhoc.h"
|
||||
#include "Core/HLE/sceNet.h"
|
||||
|
||||
static bool netInited;
|
||||
static bool netInetInited;
|
||||
static bool netApctlInited;
|
||||
|
||||
// TODO: Determine how many handlers we can actually have
|
||||
const size_t MAX_APCTL_HANDLERS = 32;
|
||||
|
||||
enum {
|
||||
ERROR_NET_BUFFER_TOO_SMALL = 0x80400706,
|
||||
|
||||
ERROR_NET_INET_ALREADY_INITIALIZED = 0x80410201,
|
||||
|
||||
ERROR_NET_RESOLVER_BAD_ID = 0x80410408,
|
||||
ERROR_NET_RESOLVER_ALREADY_STOPPED = 0x8041040a,
|
||||
ERROR_NET_RESOLVER_INVALID_HOST = 0x80410414,
|
||||
|
||||
ERROR_NET_APCTL_ALREADY_INITIALIZED = 0x80410a01,
|
||||
ERROR_NET_ADHOCCTL_TOO_MANY_HANDLERS = 0x80410b12,
|
||||
};
|
||||
|
||||
enum {
|
||||
PSP_NET_APCTL_EVENT_DISCONNECT_REQUEST = 5,
|
||||
};
|
||||
|
||||
struct ProductStruct {
|
||||
s32_le unknown; // Unknown, set to 0
|
||||
char product[9]; // Game ID (Example: ULUS10000)
|
||||
};
|
||||
|
||||
struct SceNetMallocStat {
|
||||
s32_le pool; // Pointer to the pool?
|
||||
s32_le maximum; // Maximum size of the pool?
|
||||
s32_le free; // How much memory is free
|
||||
};
|
||||
|
||||
static struct SceNetMallocStat netMallocStat;
|
||||
|
||||
|
||||
struct ApctlHandler {
|
||||
u32 entryPoint;
|
||||
u32 argument;
|
||||
};
|
||||
|
||||
static std::map<int, ApctlHandler> apctlHandlers;
|
||||
|
||||
static void __ResetInitNetLib() {
|
||||
@ -87,11 +52,23 @@ static void __ResetInitNetLib() {
|
||||
}
|
||||
|
||||
void __NetInit() {
|
||||
//net::Init();
|
||||
#ifdef _MSC_VER
|
||||
WSADATA data;
|
||||
int iResult = WSAStartup(MAKEWORD(2, 2), &data);
|
||||
if (iResult != NOERROR){
|
||||
ERROR_LOG(SCENET, "WSA Failed");
|
||||
}
|
||||
#endif
|
||||
__ResetInitNetLib();
|
||||
}
|
||||
|
||||
void __NetShutdown() {
|
||||
__ResetInitNetLib();
|
||||
//net::Shutdown();
|
||||
#ifdef _MSC_VER
|
||||
WSACleanup();
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@ -127,22 +104,24 @@ static u32 sceNetTerm() {
|
||||
if (netAdhocctlInited) sceNetAdhocctlTerm();
|
||||
if (netAdhocInited) sceNetAdhocTerm();
|
||||
|
||||
WARN_LOG(SCENET, "UNTESTED sceNetTerm()");
|
||||
WARN_LOG(SCENET, "sceNetTerm()");
|
||||
netInited = false;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
// TODO: should that struct actually be initialized here?
|
||||
static u32 sceNetInit(u32 poolSize, u32 calloutPri, u32 calloutStack, u32 netinitPri, u32 netinitStack) {
|
||||
// May need to Terminate old one first since the game (ie. GTA:VCS) might not called sceNetTerm before the next sceNetInit and behave strangely
|
||||
if (netInited) sceNetTerm();
|
||||
if (netInited)
|
||||
sceNetTerm();
|
||||
|
||||
ERROR_LOG(SCENET, "UNIMPL sceNetInit(poolsize=%d, calloutpri=%i, calloutstack=%d, netintrpri=%i, netintrstack=%d) at %08x", poolSize, calloutPri, calloutStack, netinitPri, netinitStack, currentMIPS->pc);
|
||||
WARN_LOG(SCENET, "sceNetInit(poolsize=%d, calloutpri=%i, calloutstack=%d, netintrpri=%i, netintrstack=%d) at %08x", poolSize, calloutPri, calloutStack, netinitPri, netinitStack, currentMIPS->pc);
|
||||
netInited = true;
|
||||
netMallocStat.maximum = poolSize;
|
||||
netMallocStat.free = poolSize;
|
||||
netMallocStat.pool = 0;
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -168,7 +147,7 @@ static u32 sceWlanDevIsPowerOn() {
|
||||
}
|
||||
|
||||
static u32 sceWlanGetSwitchState() {
|
||||
DEBUG_LOG(SCENET, "UNTESTED sceWlanGetSwitchState()");
|
||||
VERBOSE_LOG(SCENET, "sceWlanGetSwitchState()");
|
||||
return g_Config.bEnableWlan ? 1 : 0;
|
||||
}
|
||||
|
||||
@ -253,8 +232,7 @@ static int sceNetGetMallocStat(u32 statPtr) {
|
||||
|
||||
static int sceNetInetInit() {
|
||||
ERROR_LOG(SCENET, "UNIMPL sceNetInetInit()");
|
||||
if (netInetInited)
|
||||
return ERROR_NET_INET_ALREADY_INITIALIZED;
|
||||
if (netInetInited) return ERROR_NET_INET_ALREADY_INITIALIZED;
|
||||
netInetInited = true;
|
||||
|
||||
return 0;
|
||||
@ -313,9 +291,9 @@ static u32 sceNetApctlAddHandler(u32 handlerPtr, u32 handlerArg) {
|
||||
apctlHandlers[retval] = handler;
|
||||
WARN_LOG(SCENET, "UNTESTED sceNetApctlAddHandler(%x, %x): added handler %d", handlerPtr, handlerArg, retval);
|
||||
}
|
||||
else
|
||||
else {
|
||||
ERROR_LOG(SCENET, "UNTESTED sceNetApctlAddHandler(%x, %x): Same handler already exists", handlerPtr, handlerArg);
|
||||
|
||||
}
|
||||
|
||||
// The id to return is the number of handlers currently registered
|
||||
return retval;
|
||||
@ -326,9 +304,9 @@ static int sceNetApctlDelHandler(u32 handlerID) {
|
||||
apctlHandlers.erase(handlerID);
|
||||
WARN_LOG(SCENET, "UNTESTED sceNetapctlDelHandler(%d): deleted handler %d", handlerID, handlerID);
|
||||
}
|
||||
else
|
||||
else {
|
||||
ERROR_LOG(SCENET, "UNTESTED sceNetapctlDelHandler(%d): asked to delete invalid handler %d", handlerID, handlerID);
|
||||
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -337,6 +315,61 @@ static int sceNetInetInetAton(const char *hostname, u32 addrPtr) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
int sceNetInetPoll(void *fds, u32 nfds, int timeout) { // timeout in miliseconds
|
||||
DEBUG_LOG(SCENET, "UNTESTED sceNetInetPoll(%p, %d, %i) at %08x", fds, nfds, timeout, currentMIPS->pc);
|
||||
int retval = -1;
|
||||
SceNetInetPollfd *fdarray = (SceNetInetPollfd *)fds; // SceNetInetPollfd/pollfd, sceNetInetPoll() have similarity to BSD poll() but pollfd have different size on 64bit
|
||||
//#ifdef _MSC_VER
|
||||
//WSAPoll only available for Vista or newer, so we'll use an alternative way for XP since Windows doesn't have poll function like *NIX
|
||||
if (nfds > FD_SETSIZE) return -1;
|
||||
fd_set readfds, writefds, exceptfds;
|
||||
FD_ZERO(&readfds); FD_ZERO(&writefds); FD_ZERO(&exceptfds);
|
||||
for (int i = 0; i < (s32)nfds; i++) {
|
||||
if (fdarray[i].events & (INET_POLLRDNORM)) FD_SET(fdarray[i].fd, &readfds); // (POLLRDNORM | POLLIN)
|
||||
if (fdarray[i].events & (INET_POLLWRNORM)) FD_SET(fdarray[i].fd, &writefds); // (POLLWRNORM | POLLOUT)
|
||||
//if (fdarray[i].events & (ADHOC_EV_ALERT)) // (POLLRDBAND | POLLPRI) // POLLERR
|
||||
FD_SET(fdarray[i].fd, &exceptfds);
|
||||
fdarray[i].revents = 0;
|
||||
}
|
||||
timeval tmout;
|
||||
tmout.tv_sec = timeout / 1000; // seconds
|
||||
tmout.tv_usec = (timeout % 1000) * 1000; // microseconds
|
||||
retval = select(nfds, &readfds, &writefds, &exceptfds, &tmout);
|
||||
if (retval < 0) return -1;
|
||||
retval = 0;
|
||||
for (int i = 0; i < (s32)nfds; i++) {
|
||||
if (FD_ISSET(fdarray[i].fd, &readfds)) fdarray[i].revents |= INET_POLLRDNORM; //POLLIN
|
||||
if (FD_ISSET(fdarray[i].fd, &writefds)) fdarray[i].revents |= INET_POLLWRNORM; //POLLOUT
|
||||
fdarray[i].revents &= fdarray[i].events;
|
||||
if (FD_ISSET(fdarray[i].fd, &exceptfds)) fdarray[i].revents |= ADHOC_EV_ALERT; // POLLPRI; // POLLERR; // can be raised on revents regardless of events bitmask?
|
||||
if (fdarray[i].revents) retval++;
|
||||
}
|
||||
//#else
|
||||
/*
|
||||
// Doesn't work properly yet
|
||||
pollfd *fdtmp = (pollfd *)malloc(sizeof(pollfd) * nfds);
|
||||
// Note: sizeof(pollfd) = 16bytes in 64bit and 8bytes in 32bit, while sizeof(SceNetInetPollfd) is always 8bytes
|
||||
for (int i = 0; i < (s32)nfds; i++) {
|
||||
fdtmp[i].fd = fdarray[i].fd;
|
||||
fdtmp[i].events = 0;
|
||||
if (fdarray[i].events & INET_POLLRDNORM) fdtmp[i].events |= (POLLIN | POLLRDNORM | POLLRDBAND | POLLPRI);
|
||||
if (fdarray[i].events & INET_POLLWRNORM) fdtmp[i].events |= (POLLOUT | POLLWRNORM | POLLWRBAND);
|
||||
fdtmp[i].revents = 0;
|
||||
fdarray[i].revents = 0;
|
||||
}
|
||||
retval = poll(fdtmp, (nfds_t)nfds, timeout); //retval = WSAPoll(fdarray, nfds, timeout);
|
||||
for (int i = 0; i < (s32)nfds; i++) {
|
||||
if (fdtmp[i].revents & (POLLIN | POLLRDNORM | POLLRDBAND | POLLPRI)) fdarray[i].revents |= INET_POLLRDNORM;
|
||||
if (fdtmp[i].revents & (POLLOUT | POLLWRNORM | POLLWRBAND)) fdarray[i].revents |= INET_POLLWRNORM;
|
||||
fdarray[i].revents &= fdarray[i].events;
|
||||
if (fdtmp[i].revents & POLLERR) fdarray[i].revents |= POLLERR; //INET_POLLERR // can be raised on revents regardless of events bitmask?
|
||||
}
|
||||
free(fdtmp);
|
||||
*/
|
||||
//#endif
|
||||
return retval;
|
||||
}
|
||||
|
||||
static int sceNetInetRecv(int socket, u32 bufPtr, u32 bufLen, u32 flags) {
|
||||
ERROR_LOG(SCENET, "UNIMPL sceNetInetRecv(%i, %08x, %i, %08x)", socket, bufPtr, bufLen, flags);
|
||||
return -1;
|
||||
@ -348,8 +381,19 @@ static int sceNetInetSend(int socket, u32 bufPtr, u32 bufLen, u32 flags) {
|
||||
}
|
||||
|
||||
static int sceNetInetGetErrno() {
|
||||
ERROR_LOG(SCENET, "UNIMPL sceNetInetGetErrno()");
|
||||
return -1;
|
||||
ERROR_LOG(SCENET, "UNTESTED sceNetInetGetErrno()");
|
||||
int error = errno;
|
||||
switch (error) {
|
||||
case ETIMEDOUT:
|
||||
return INET_ETIMEDOUT;
|
||||
case EISCONN:
|
||||
return INET_EISCONN;
|
||||
case EINPROGRESS:
|
||||
return INET_EINPROGRESS;
|
||||
//case EAGAIN:
|
||||
// return INET_EAGAIN;
|
||||
}
|
||||
return error; //-1;
|
||||
}
|
||||
|
||||
static int sceNetInetSocket(int domain, int type, int protocol) {
|
||||
@ -417,7 +461,7 @@ const HLEFunction sceNetInet[] = {
|
||||
{0x805502DD, 0, "sceNetInetCloseWithRST"},
|
||||
{0xd10a1a7a, 0, "sceNetInetListen"},
|
||||
{0xdb094e1b, 0, "sceNetInetAccept"},
|
||||
{0xfaabb1dd, 0, "sceNetInetPoll"},
|
||||
{0xfaabb1dd, WrapI_VUI<sceNetInetPoll>, "sceNetInetPoll" },
|
||||
{0x5be8d595, 0, "sceNetInetSelect"},
|
||||
{0x8d7284ea, 0, "sceNetInetClose"},
|
||||
{0xcda85c99, WrapI_IUUU<sceNetInetRecv>, "sceNetInetRecv"},
|
||||
|
@ -17,6 +17,77 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "Core/HLE/proAdhoc.h"
|
||||
|
||||
// Option Names
|
||||
#define PSP_SO_REUSEPORT 0x0200
|
||||
#define PSP_SO_NBIO 0x1009
|
||||
|
||||
// Infrastructure Errno Numbers
|
||||
#define INET_EAGAIN 0x0B
|
||||
#define INET_ETIMEDOUT 0x74
|
||||
#define INET_EINPROGRESS 0x77
|
||||
#define INET_EISCONN 0x7F
|
||||
|
||||
// On-Demand Nonblocking Flag
|
||||
#define INET_MSG_DONTWAIT 0x80
|
||||
|
||||
// Event Flags
|
||||
#define INET_POLLRDNORM 0x0040
|
||||
#define INET_POLLWRNORM 0x0004
|
||||
|
||||
// TODO: Determine how many handlers we can actually have
|
||||
const size_t MAX_APCTL_HANDLERS = 32;
|
||||
|
||||
enum {
|
||||
ERROR_NET_BUFFER_TOO_SMALL = 0x80400706,
|
||||
|
||||
ERROR_NET_INET_ALREADY_INITIALIZED = 0x80410201,
|
||||
|
||||
ERROR_NET_RESOLVER_BAD_ID = 0x80410408,
|
||||
ERROR_NET_RESOLVER_ALREADY_STOPPED = 0x8041040a,
|
||||
ERROR_NET_RESOLVER_INVALID_HOST = 0x80410414,
|
||||
|
||||
ERROR_NET_APCTL_ALREADY_INITIALIZED = 0x80410a01,
|
||||
};
|
||||
|
||||
enum {
|
||||
PSP_NET_APCTL_EVENT_DISCONNECT_REQUEST = 5,
|
||||
};
|
||||
|
||||
// Sockaddr
|
||||
typedef struct SceNetInetSockaddr {
|
||||
uint8_t sa_len;
|
||||
uint8_t sa_family;
|
||||
uint8_t sa_data[14];
|
||||
} SceNetInetSockaddr;
|
||||
|
||||
// Sockaddr_in
|
||||
typedef struct SceNetInetSockaddrIn {
|
||||
uint8_t sin_len;
|
||||
uint8_t sin_family;
|
||||
u16_le sin_port; //uint16_t
|
||||
u32_le sin_addr; //uint32_t
|
||||
uint8_t sin_zero[8];
|
||||
} SceNetInetSockaddrIn;
|
||||
|
||||
// Polling Event Field
|
||||
typedef struct SceNetInetPollfd { //similar format to pollfd in 32bit (pollfd in 64bit have different size)
|
||||
s32_le fd;
|
||||
s16_le events;
|
||||
s16_le revents;
|
||||
} SceNetInetPollfd;
|
||||
|
||||
struct ProductStruct {
|
||||
s32_le unknown; // Unknown, set to 0 // Product Type ?
|
||||
char product[PRODUCT_CODE_LENGTH]; // Game ID (Example: ULUS10000)
|
||||
};
|
||||
|
||||
struct ApctlHandler {
|
||||
u32 entryPoint;
|
||||
u32 argument;
|
||||
};
|
||||
|
||||
class PointerWrap;
|
||||
|
||||
void Register_sceNet();
|
||||
@ -25,3 +96,5 @@ void Register_sceWlanDrv();
|
||||
void __NetInit();
|
||||
void __NetShutdown();
|
||||
void __NetDoState(PointerWrap &p);
|
||||
|
||||
int sceNetInetPoll(void *fds, u32 nfds, int timeout);
|
File diff suppressed because it is too large
Load Diff
@ -23,6 +23,7 @@
|
||||
// Invalid branch target address
|
||||
#define INVALIDTARGET 0xFFFFFFFF
|
||||
|
||||
#define MIPS_MAKE_B(offs) (0x10000000 | ((offs) & 0xFFFF))
|
||||
#define MIPS_MAKE_J(addr) (0x08000000 | ((addr)>>2))
|
||||
#define MIPS_MAKE_JAL(addr) (0x0C000000 | ((addr)>>2))
|
||||
#define MIPS_MAKE_JR_RA() (0x03e00008)
|
||||
|
@ -95,6 +95,7 @@ void GameSettingsScreen::CreateViews() {
|
||||
I18NCategory *c = GetI18NCategory("Controls");
|
||||
I18NCategory *a = GetI18NCategory("Audio");
|
||||
I18NCategory *s = GetI18NCategory("System");
|
||||
I18NCategory *n = GetI18NCategory("System"); // Networking used to be in System - TODO: Move the translations.. (ugh)
|
||||
I18NCategory *ms = GetI18NCategory("MainSettings");
|
||||
I18NCategory *dev = GetI18NCategory("Developer");
|
||||
|
||||
@ -377,6 +378,23 @@ void GameSettingsScreen::CreateViews() {
|
||||
#endif // #if defined(USING_WIN_UI)
|
||||
controlsSettings->Add(new PopupSliderChoiceFloat(&g_Config.fAnalogLimiterDeadzone, 0.0f, 1.0f, c->T("Analog Limiter"), 0.10f, screenManager()));
|
||||
|
||||
ViewGroup *networkingSettingsScroll = new ScrollView(ORIENT_VERTICAL, new LinearLayoutParams(FILL_PARENT, FILL_PARENT));
|
||||
LinearLayout *networkingSettings = new LinearLayout(ORIENT_VERTICAL);
|
||||
networkingSettings->SetSpacing(0);
|
||||
networkingSettingsScroll->Add(networkingSettings);
|
||||
tabHolder->AddTab(s->T("Networking"), networkingSettingsScroll); // TODO: This string was originally just an item header so in the wrong category
|
||||
|
||||
networkingSettings->Add(new ItemHeader(n->T("Networking")));
|
||||
networkingSettings->Add(new CheckBox(&g_Config.bEnableWlan, n->T("Enable networking", "Enable networking/wlan (beta)")));
|
||||
|
||||
#ifdef _WIN32
|
||||
networkingSettings->Add(new PopupTextInputChoice(&g_Config.proAdhocServer, n->T("Change proAdhocServer Address"), "", 255, screenManager()));
|
||||
#else
|
||||
networkingSettings->Add(new ChoiceWithValueDisplay(&g_Config.proAdhocServer, n->T("Change proAdhocServer Address"), nullptr))->OnClick.Handle(this, &GameSettingsScreen::OnChangeproAdhocServerAddress);
|
||||
#endif
|
||||
networkingSettings->Add(new CheckBox(&g_Config.bEnableAdhocServer, n->T("Enable built-in PRO Adhoc Server", "Enable built-in PRO Adhoc Server")));
|
||||
networkingSettings->Add(new ChoiceWithValueDisplay(&g_Config.sMACAddress, s->T("Change Mac Address"), nullptr))->OnClick.Handle(this, &GameSettingsScreen::OnChangeMacAddress);
|
||||
|
||||
// System
|
||||
ViewGroup *systemSettingsScroll = new ScrollView(ORIENT_VERTICAL, new LinearLayoutParams(FILL_PARENT, FILL_PARENT));
|
||||
LinearLayout *systemSettings = new LinearLayout(ORIENT_VERTICAL);
|
||||
@ -479,17 +497,6 @@ void GameSettingsScreen::CreateViews() {
|
||||
enableReportsCheckbox_->SetEnabled(Reporting::IsSupported());
|
||||
systemSettings->Add(enableReportsCheckbox_);
|
||||
|
||||
systemSettings->Add(new ItemHeader(s->T("Networking")));
|
||||
systemSettings->Add(new CheckBox(&g_Config.bEnableWlan, s->T("Enable networking", "Enable networking/wlan (beta)")));
|
||||
|
||||
#ifdef _WIN32
|
||||
systemSettings->Add(new PopupTextInputChoice(&g_Config.proAdhocServer, s->T("Change proAdhocServer Address"), "", 255, screenManager()));
|
||||
#else
|
||||
systemSettings->Add(new ChoiceWithValueDisplay(&g_Config.proAdhocServer, s->T("Change proAdhocServer Address"), nullptr))->OnClick.Handle(this, &GameSettingsScreen::OnChangeproAdhocServerAddress);
|
||||
#endif
|
||||
|
||||
systemSettings->Add(new ChoiceWithValueDisplay(&g_Config.sMACAddress, s->T("Change Mac Address"), nullptr))->OnClick.Handle(this, &GameSettingsScreen::OnChangeMacAddress);
|
||||
|
||||
//#ifndef ANDROID
|
||||
systemSettings->Add(new ItemHeader(s->T("Cheats", "Cheats (experimental, see forums)")));
|
||||
systemSettings->Add(new CheckBox(&g_Config.bEnableCheats, s->T("Enable Cheats")));
|
||||
|
@ -255,6 +255,7 @@ EXEC_AND_LIB_FILES := \
|
||||
$(SRC)/Core/HLE/sceMp3.cpp \
|
||||
$(SRC)/Core/HLE/sceNet.cpp \
|
||||
$(SRC)/Core/HLE/proAdhoc.cpp \
|
||||
$(SRC)/Core/HLE/proAdhocServer.cpp \
|
||||
$(SRC)/Core/HLE/sceNetAdhoc.cpp \
|
||||
$(SRC)/Core/HLE/sceOpenPSID.cpp \
|
||||
$(SRC)/Core/HLE/sceP3da.cpp \
|
||||
|
Loading…
x
Reference in New Issue
Block a user