mirror of https://github.com/PCSX2/pcsx2.git
DEV9: windows support mostly done, unicode thingies to fix
This commit is contained in:
parent
149bcea2d8
commit
eea4e383f9
|
@ -87,7 +87,7 @@ private:
|
|||
HANDLE hOverlappedFile;
|
||||
OVERLAPPED asyncOperationContext;
|
||||
bool asyncInProgress;
|
||||
byte mDummyAsyncPrefetchTarget[GZFILE_READ_CHUNK_SIZE];
|
||||
char mDummyAsyncPrefetchTarget[GZFILE_READ_CHUNK_SIZE];
|
||||
#endif
|
||||
|
||||
void AsyncPrefetchReset();
|
||||
|
|
|
@ -13,11 +13,12 @@
|
|||
* If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "PrecompiledHeader.h"
|
||||
#define WINVER 0x0600
|
||||
#define _WIN32_WINNT 0x0600
|
||||
|
||||
#ifdef _WIN32
|
||||
#include <winsock2.h>
|
||||
//#include <winsock2.h>
|
||||
#include <Winioctl.h>
|
||||
#include <windows.h>
|
||||
#elif defined(__linux__)
|
||||
|
@ -206,7 +207,7 @@ s32 DEV9init()
|
|||
|
||||
#ifdef _WIN32
|
||||
hEeprom = CreateFile(
|
||||
"eeprom.dat",
|
||||
L"eeprom.dat",
|
||||
GENERIC_READ | GENERIC_WRITE,
|
||||
0,
|
||||
NULL,
|
||||
|
|
|
@ -14,19 +14,20 @@
|
|||
*/
|
||||
|
||||
|
||||
#include "PrecompiledHeader.h"
|
||||
#include <stdlib.h>
|
||||
|
||||
#include <winsock2.h>
|
||||
//#include <winsock2.h>
|
||||
#include "..\DEV9.h"
|
||||
#include "AppConfig.h"
|
||||
|
||||
BOOL WritePrivateProfileInt(LPCSTR lpAppName, LPCSTR lpKeyName, int intvar, LPCSTR lpFileName)
|
||||
{
|
||||
return WritePrivateProfileString(lpAppName, lpKeyName, std::to_string(intvar).c_str(), lpFileName);
|
||||
return WritePrivateProfileStringA(lpAppName, lpKeyName, std::to_string(intvar).c_str(), lpFileName);
|
||||
}
|
||||
bool FileExists(std::string szPath)
|
||||
{
|
||||
DWORD dwAttrib = GetFileAttributes(szPath.c_str());
|
||||
DWORD dwAttrib = GetFileAttributesA(szPath.c_str());
|
||||
return (dwAttrib != INVALID_FILE_ATTRIBUTES &&
|
||||
!(dwAttrib & FILE_ATTRIBUTE_DIRECTORY));
|
||||
}
|
||||
|
@ -34,10 +35,10 @@ bool FileExists(std::string szPath)
|
|||
void SaveConf()
|
||||
{
|
||||
const std::string file(GetSettingsFolder().Combine(wxString("DEV9.cfg")).GetFullPath());
|
||||
DeleteFile(file.c_str());
|
||||
DeleteFileA(file.c_str());
|
||||
|
||||
WritePrivateProfileString("DEV9", "Eth", config.Eth, file.c_str());
|
||||
WritePrivateProfileString("DEV9", "Hdd", config.Hdd, file.c_str());
|
||||
WritePrivateProfileStringA("DEV9", "Eth", config.Eth, file.c_str());
|
||||
WritePrivateProfileStringA("DEV9", "Hdd", config.Hdd, file.c_str());
|
||||
WritePrivateProfileInt("DEV9", "HddSize", config.HddSize, file.c_str());
|
||||
WritePrivateProfileInt("DEV9", "ethEnable", config.ethEnable, file.c_str());
|
||||
WritePrivateProfileInt("DEV9", "hddEnable", config.hddEnable, file.c_str());
|
||||
|
@ -49,9 +50,9 @@ void LoadConf()
|
|||
if (FileExists(file.c_str()) == false)
|
||||
return;
|
||||
|
||||
GetPrivateProfileString("DEV9", "Eth", ETH_DEF, config.Eth, sizeof(config.Eth), file.c_str());
|
||||
GetPrivateProfileString("DEV9", "Hdd", HDD_DEF, config.Hdd, sizeof(config.Hdd), file.c_str());
|
||||
config.HddSize = GetPrivateProfileInt("DEV9", "HddSize", config.HddSize, file.c_str());
|
||||
config.ethEnable = GetPrivateProfileInt("DEV9", "ethEnable", config.ethEnable, file.c_str());
|
||||
config.hddEnable = GetPrivateProfileInt("DEV9", "hddEnable", config.hddEnable, file.c_str());
|
||||
GetPrivateProfileStringA("DEV9", "Eth", ETH_DEF, config.Eth, sizeof(config.Eth), file.c_str());
|
||||
GetPrivateProfileStringA("DEV9", "Hdd", HDD_DEF, config.Hdd, sizeof(config.Hdd), file.c_str());
|
||||
config.HddSize = GetPrivateProfileIntA("DEV9", "HddSize", config.HddSize, file.c_str());
|
||||
config.ethEnable = GetPrivateProfileIntA("DEV9", "ethEnable", config.ethEnable, file.c_str());
|
||||
config.hddEnable = GetPrivateProfileIntA("DEV9", "hddEnable", config.hddEnable, file.c_str());
|
||||
}
|
||||
|
|
|
@ -13,10 +13,10 @@
|
|||
* If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "PrecompiledHeader.h"
|
||||
#include <stdio.h>
|
||||
#include <winsock2.h>
|
||||
#include <windows.h>
|
||||
#include <windowsx.h>
|
||||
//#include <windows.h>
|
||||
//#include <windowsx.h>
|
||||
|
||||
#include "..\Config.h"
|
||||
#include "resource.h"
|
||||
|
@ -38,7 +38,7 @@ void SysMessage(char* fmt, ...)
|
|||
va_start(list, fmt);
|
||||
vsprintf(tmp, fmt, list);
|
||||
va_end(list);
|
||||
MessageBox(0, tmp, "Dev9 Msg", 0);
|
||||
MessageBoxA(0, tmp, "Dev9 Msg", 0);
|
||||
}
|
||||
|
||||
void OnInitDialog(HWND hW)
|
||||
|
@ -71,7 +71,7 @@ void OnInitDialog(HWND hW)
|
|||
}
|
||||
}
|
||||
|
||||
Edit_SetText(GetDlgItem(hW, IDC_HDDFILE), config.Hdd);
|
||||
SetWindowTextA(GetDlgItem(hW, IDC_HDDFILE), config.Hdd);
|
||||
|
||||
Button_SetCheck(GetDlgItem(hW, IDC_ETHENABLED), config.ethEnable);
|
||||
Button_SetCheck(GetDlgItem(hW, IDC_HDDENABLED), config.hddEnable);
|
||||
|
@ -104,7 +104,7 @@ void OnOk(HWND hW)
|
|||
strcpy(config.Eth, ptr);
|
||||
}
|
||||
|
||||
Edit_GetText(GetDlgItem(hW, IDC_HDDFILE), config.Hdd, 256);
|
||||
GetWindowTextA(GetDlgItem(hW, IDC_HDDFILE), config.Hdd, 256);
|
||||
|
||||
config.ethEnable = Button_GetCheck(GetDlgItem(hW, IDC_ETHENABLED));
|
||||
config.hddEnable = Button_GetCheck(GetDlgItem(hW, IDC_HDDENABLED));
|
||||
|
@ -175,13 +175,6 @@ DEV9about()
|
|||
(DLGPROC)AboutDlgProc);
|
||||
}
|
||||
|
||||
BOOL APIENTRY DllMain(HANDLE hModule, // DLL INIT
|
||||
DWORD dwReason,
|
||||
LPVOID lpReserved)
|
||||
{
|
||||
hInst = (HINSTANCE)hModule;
|
||||
return TRUE; // very quick :)
|
||||
}
|
||||
/*
|
||||
UINT DEV9ThreadProc() {
|
||||
DEV9thread();
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
* If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "PrecompiledHeader.h"
|
||||
#include "..\net.h"
|
||||
#include "..\Dev9.h"
|
||||
|
||||
|
|
|
@ -1,206 +0,0 @@
|
|||
/* PCSX2 - PS2 Emulator for PCs
|
||||
* Copyright (C) 2002-2010 PCSX2 Dev Team
|
||||
*
|
||||
* PCSX2 is free software: you can redistribute it and/or modify it under the terms
|
||||
* of the GNU Lesser General Public License as published by the Free Software Found-
|
||||
* ation, either version 3 of the License, or (at your option) any later version.
|
||||
*
|
||||
* PCSX2 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 for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with PCSX2.
|
||||
* If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <conio.h>
|
||||
|
||||
#include "packet32.h"
|
||||
#include "ntddndis.h"
|
||||
|
||||
#include "socks.h"
|
||||
#include "DEV9.h"
|
||||
|
||||
#define BUFFER_SIZE (2048)
|
||||
|
||||
LPADAPTER lpAdapter;
|
||||
LPPACKET lpSendPacket;
|
||||
LPPACKET lpRecvPacket;
|
||||
u8 buffer[BUFFER_SIZE];
|
||||
u8 *buf;
|
||||
int lbytes;
|
||||
int tbytes;
|
||||
typedef struct {
|
||||
char name[256];
|
||||
char desc[256];
|
||||
} _Adapter;
|
||||
|
||||
_Adapter AdapterList[16];
|
||||
|
||||
long sockOpen(char *Device) {
|
||||
lpAdapter = PacketOpenAdapter(Device);
|
||||
if (lpAdapter == NULL) return -1;
|
||||
|
||||
#ifdef DEV9_LOG
|
||||
DEV9_LOG("PacketOpenAdapter %s: %p\n", Device, lpAdapter);
|
||||
#endif
|
||||
|
||||
if(PacketSetHwFilter(lpAdapter,NDIS_PACKET_TYPE_PROMISCUOUS)==FALSE){
|
||||
SysMessage("Warning: unable to set promiscuous mode!");
|
||||
}
|
||||
|
||||
if(PacketSetBuff(lpAdapter,512000)==FALSE){
|
||||
SysMessage("Unable to set the kernel buffer!");
|
||||
return -1;
|
||||
}
|
||||
|
||||
if(PacketSetReadTimeout(lpAdapter,100)==FALSE){
|
||||
SysMessage("Warning: unable to set the read tiemout!");
|
||||
}
|
||||
|
||||
if((lpRecvPacket = PacketAllocatePacket())==NULL){
|
||||
SysMessage("Error: failed to allocate the LPPACKET structure.");
|
||||
return (-1);
|
||||
}
|
||||
if((lpSendPacket = PacketAllocatePacket())==NULL){
|
||||
SysMessage("Error: failed to allocate the LPPACKET structure.");
|
||||
return (-1);
|
||||
}
|
||||
|
||||
lbytes=0;
|
||||
tbytes=0;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
void sockClose() {
|
||||
PacketCloseAdapter(lpAdapter);
|
||||
}
|
||||
|
||||
long sockSendData(void *pData, int Size) {
|
||||
u8 *data = (u8*)pData;
|
||||
// printf("_sendPacket %d (time=%d)\n", Size, timeGetTime());
|
||||
while (Size > 0) {
|
||||
PacketInitPacket(lpSendPacket, data, Size > 1024 ? 1024 : Size);
|
||||
if(PacketSendPacket(lpAdapter,lpSendPacket,FALSE)==FALSE){
|
||||
printf("Error: PacketSendPacket failed\n");
|
||||
return (-1);
|
||||
}
|
||||
data+= 1024; Size-= 1024;
|
||||
PacketFreePacket(lpSendPacket);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int _filterPacket(u8 *_buf) {
|
||||
/* DEV9_LOG("%2.2x:%2.2x:%2.2x:%2.2x:%2.2x:%2.2x\n", _buf[5], _buf[4], _buf[3], _buf[2], _buf[1], _buf[0]);
|
||||
DEV9_LOG("%2.2x:%2.2x:%2.2x:%2.2x:%2.2x:%2.2x\n", _buf[11], _buf[10], _buf[9], _buf[8], _buf[7], _buf[6]);
|
||||
DEV9_LOG("%2.2x:%2.2x:%2.2x:%2.2x:%2.2x:%2.2x\n", _buf[17], _buf[16], _buf[15], _buf[14], _buf[13], _buf[12]);
|
||||
DEV9_LOG("%2.2x:%2.2x:%2.2x:%2.2x:%2.2x:%2.2x\n", _buf[23], _buf[22], _buf[21], _buf[20], _buf[19], _buf[18]);
|
||||
*/
|
||||
if (_buf[0] == 0xff && _buf[1] == 0xff && _buf[2] == 0xff &&
|
||||
_buf[3] == 0xff && _buf[4] == 0xff && _buf[5] == 0xff) {
|
||||
return 1;
|
||||
} else
|
||||
if (_buf[0] == 0x00 && _buf[1] == 0x00 && _buf[2] == 0x00 &&
|
||||
_buf[3] == 0x00 && _buf[4] == 0x00 && _buf[5] == 0x00) {
|
||||
return 1;
|
||||
} else
|
||||
if (*((u16*)&_buf[12]) == 0x0806) {
|
||||
printf("ARP\n");
|
||||
return 1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int _recvPacket(void *pData) {
|
||||
struct bpf_hdr *hdr;
|
||||
u8 *data;
|
||||
int ret=0;
|
||||
int size;
|
||||
|
||||
while (lbytes > 0) {
|
||||
hdr = (struct bpf_hdr *)buf;
|
||||
// DEV9_LOG("hdr %d,%d,%d\n", hdr->bh_hdrlen, hdr->bh_caplen, hdr->bh_datalen);
|
||||
// DEV9_LOG("lbytes %d\n", lbytes);
|
||||
data = buf+hdr->bh_hdrlen;
|
||||
size = Packet_WORDALIGN(hdr->bh_hdrlen+hdr->bh_datalen);
|
||||
buf+= size; lbytes-= size;
|
||||
if (_filterPacket(data)) {
|
||||
struct bpf_stat stat;
|
||||
|
||||
ret = hdr->bh_datalen;
|
||||
memcpy(pData, data, ret);
|
||||
if(PacketGetStats(lpAdapter,&stat)==FALSE){
|
||||
printf("Warning: unable to get stats from the kernel!\n");
|
||||
}
|
||||
// printf("_recvPacket %d (tbytes=%d, packets=%d, lost=%d, time=%d)\n", ret, tbytes, stat.bs_recv,stat.bs_drop, timeGetTime());
|
||||
// printf("%2.2x:%2.2x:%2.2x:%2.2x:%2.2x:%2.2x\n", data[5], data[4], data[3], data[2], data[1], data[0]);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
long sockRecvData(void *pData, int Size) {
|
||||
int ret;
|
||||
|
||||
ret = _recvPacket(pData);
|
||||
if (ret > 0) return ret;
|
||||
|
||||
PacketInitPacket(lpRecvPacket, buffer, BUFFER_SIZE);
|
||||
if(PacketReceivePacket(lpAdapter,lpRecvPacket,TRUE)==FALSE){
|
||||
printf("Error: PacketReceivePacket failed");
|
||||
return (-1);
|
||||
}
|
||||
lbytes = lpRecvPacket->ulBytesReceived;
|
||||
tbytes+= lbytes;
|
||||
// DEV9_LOG("PacketReceivePacket %d:\n", lbytes);
|
||||
if (lbytes == 0) return 0;
|
||||
memcpy(buffer, lpRecvPacket->Buffer, lbytes);
|
||||
buf = buffer;
|
||||
PacketFreePacket(lpRecvPacket);
|
||||
|
||||
return _recvPacket(pData);
|
||||
}
|
||||
|
||||
long sockGetDevicesNum() {
|
||||
char AdapterName[8192]; // string that contains a list of the network adapters
|
||||
ULONG AdapterLength;
|
||||
char *temp,*temp1;
|
||||
int i;
|
||||
|
||||
AdapterLength = sizeof(AdapterName);
|
||||
if(PacketGetAdapterNames(AdapterName,&AdapterLength)==FALSE){
|
||||
printf("Unable to retrieve the list of the adapters!\n");
|
||||
return -1;
|
||||
}
|
||||
temp=AdapterName;
|
||||
temp1=AdapterName;
|
||||
|
||||
i=0;
|
||||
while (temp[0] != 0) {
|
||||
strcpy(AdapterList[i++].name, temp);
|
||||
temp+= strlen(temp)+1;
|
||||
}
|
||||
i=0; temp++;
|
||||
while (temp[0] != 0) {
|
||||
strcpy(AdapterList[i++].desc, temp);
|
||||
temp+= strlen(temp)+1;
|
||||
}
|
||||
|
||||
return i;
|
||||
}
|
||||
|
||||
char *sockGetDevice(int index) {
|
||||
return AdapterList[index].name;
|
||||
}
|
||||
|
||||
char *sockGetDeviceDesc(int index) {
|
||||
return AdapterList[index].desc;
|
||||
}
|
||||
|
|
@ -1,27 +0,0 @@
|
|||
/* PCSX2 - PS2 Emulator for PCs
|
||||
* Copyright (C) 2002-2010 PCSX2 Dev Team
|
||||
*
|
||||
* PCSX2 is free software: you can redistribute it and/or modify it under the terms
|
||||
* of the GNU Lesser General Public License as published by the Free Software Found-
|
||||
* ation, either version 3 of the License, or (at your option) any later version.
|
||||
*
|
||||
* PCSX2 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 for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with PCSX2.
|
||||
* If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __SOCKS_H__
|
||||
#define __SOCKS_H__
|
||||
|
||||
long sockOpen(char* Device);
|
||||
void sockClose();
|
||||
long sockSendData(void* pData, int Size);
|
||||
long sockRecvData(void* pData, int Size);
|
||||
long sockGetDevicesNum();
|
||||
char* sockGetDevice(int index);
|
||||
char* sockGetDeviceDesc(int index);
|
||||
|
||||
#endif /* __SOCKS_H__*/
|
|
@ -1,18 +1,34 @@
|
|||
/* PCSX2 - PS2 Emulator for PCs
|
||||
* Copyright (C) 2002-2010 PCSX2 Dev Team
|
||||
/*
|
||||
* TAP-Win32 -- A kernel driver to provide virtual tap device functionality
|
||||
* on Windows. Originally derived from the CIPE-Win32
|
||||
* project by Damion K. Wilson, with extensive modifications by
|
||||
* James Yonan.
|
||||
*
|
||||
* PCSX2 is free software: you can redistribute it and/or modify it under the terms
|
||||
* of the GNU Lesser General Public License as published by the Free Software Found-
|
||||
* ation, either version 3 of the License, or (at your option) any later version.
|
||||
* All source code which derives from the CIPE-Win32 project is
|
||||
* Copyright (C) Damion K. Wilson, 2003, and is released under the
|
||||
* GPL version 2 (see below).
|
||||
*
|
||||
* PCSX2 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 for more details.
|
||||
* All other source code is Copyright (C) James Yonan, 2003-2004,
|
||||
* and is released under the GPL version 2 (see below).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with PCSX2.
|
||||
* If not, see <http://www.gnu.org/licenses/>.
|
||||
* 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; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* 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 for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program (see the file COPYING included with this
|
||||
* distribution); if not, write to the Free Software Foundation, Inc.,
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#include "PrecompiledHeader.h"
|
||||
|
||||
#include <stdio.h>
|
||||
#include <windows.h>
|
||||
#include <tchar.h>
|
||||
|
@ -41,9 +57,9 @@
|
|||
// Registry keys
|
||||
//=================
|
||||
|
||||
#define ADAPTER_KEY "SYSTEM\\CurrentControlSet\\Control\\Class\\{4D36E972-E325-11CE-BFC1-08002BE10318}"
|
||||
#define ADAPTER_KEY L"SYSTEM\\CurrentControlSet\\Control\\Class\\{4D36E972-E325-11CE-BFC1-08002BE10318}"
|
||||
|
||||
#define NETWORK_CONNECTIONS_KEY "SYSTEM\\CurrentControlSet\\Control\\Network\\{4D36E972-E325-11CE-BFC1-08002BE10318}"
|
||||
#define NETWORK_CONNECTIONS_KEY L"SYSTEM\\CurrentControlSet\\Control\\Network\\{4D36E972-E325-11CE-BFC1-08002BE10318}"
|
||||
|
||||
//======================
|
||||
// Filesystem prefixes
|
||||
|
@ -108,7 +124,7 @@ bool IsTAPDevice(const TCHAR* guid)
|
|||
if (status == ERROR_SUCCESS && data_type == REG_SZ)
|
||||
{
|
||||
// tap_ovpnconnect, tap0901 or root\tap, no clue why
|
||||
if ((!strncmp(component_id, "tap", 3) || !strncmp(component_id, "root\\tap", 8)) && !_tcscmp(net_cfg_instance_id, guid))
|
||||
if ((!wcsncmp(component_id, L"tap", 3) || !wcsncmp(component_id, L"root\\tap", 8)) && !_tcscmp(net_cfg_instance_id, guid))
|
||||
{
|
||||
RegCloseKey(unit_key);
|
||||
RegCloseKey(netcard_key);
|
||||
|
@ -179,8 +195,8 @@ vector<tap_adapter>* GetTapAdapters()
|
|||
{
|
||||
if (IsTAPDevice(enum_name))
|
||||
{
|
||||
std::string tmp = name_data;
|
||||
std::string tmp2 = enum_name;
|
||||
std::string tmp("hello");
|
||||
std::string tmp2("hello");
|
||||
tap_adapter t = {tmp, tmp2};
|
||||
tap_nic->push_back(t);
|
||||
}
|
||||
|
@ -222,7 +238,7 @@ HANDLE TAPOpen(const char* device_guid)
|
|||
device_guid,
|
||||
TAPSUFFIX);
|
||||
|
||||
HANDLE handle = CreateFile(
|
||||
HANDLE handle = CreateFileA(
|
||||
device_path,
|
||||
GENERIC_READ | GENERIC_WRITE,
|
||||
0,
|
||||
|
|
|
@ -13,6 +13,8 @@
|
|||
* If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "PrecompiledHeader.h"
|
||||
|
||||
// The code has been designed for 64Mb flash and uses as file support the second memory card
|
||||
#include <stdio.h>
|
||||
//#include <winsock2.h>
|
||||
|
|
|
@ -13,17 +13,19 @@
|
|||
* If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "PrecompiledHeader.h"
|
||||
|
||||
#ifdef _WIN32
|
||||
#include <winsock2.h>
|
||||
#include <iphlpapi.h>
|
||||
#include <ws2tcpip.h>
|
||||
#include <windows.h>
|
||||
#include <comdef.h>
|
||||
#include <iphlpapi.h>
|
||||
//#include <ws2tcpip.h>
|
||||
//#include <comdef.h>
|
||||
#elif defined(__linux__)
|
||||
#include <sys/ioctl.h>
|
||||
#include <net/if.h>
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdarg.h>
|
||||
#include "pcap_io.h"
|
||||
|
|
|
@ -13,10 +13,12 @@
|
|||
* If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "PrecompiledHeader.h"
|
||||
|
||||
#define WINVER 0x0600
|
||||
#define _WIN32_WINNT 0x0600
|
||||
#ifdef _WIN32
|
||||
#include <winsock2.h>
|
||||
//#include <winsock2.h>
|
||||
#include <Winioctl.h>
|
||||
#include <windows.h>
|
||||
#endif
|
||||
|
|
|
@ -24,6 +24,7 @@
|
|||
#define write_portable(a, b, c) (send(a, b, c, 0))
|
||||
#define close_portable(a) (closesocket(a))
|
||||
#define bzero(b, len) (memset((b), '\0', (len)), (void)0)
|
||||
#include <WinSock2.h>
|
||||
#include <windows.h>
|
||||
#else
|
||||
#define read_portable(a, b, c) (read(a, b, c))
|
||||
|
|
|
@ -20,6 +20,8 @@
|
|||
|
||||
#include "Utilities/PersistentThread.h"
|
||||
#include "System/SysThreads.h"
|
||||
#include <WinSock2.h>
|
||||
#include <windows.h>
|
||||
|
||||
using namespace Threading;
|
||||
|
||||
|
|
|
@ -62,21 +62,22 @@
|
|||
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||
<PrecompiledHeaderFile>PrecompiledHeader.h</PrecompiledHeaderFile>
|
||||
<EnableEnhancedInstructionSet>NoExtensions</EnableEnhancedInstructionSet>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">PCSX2_DEBUG;PCSX2_DEVBUILD;_SECURE_SCL_=1;SPU2X_PORTAUDIO;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Devel|Win32'">PCSX2_DEVEL;PCSX2_DEVBUILD;NDEBUG;_SECURE_SCL_=1;SPU2X_PORTAUDIO;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">NDEBUG;_SECURE_SCL_=0;SPU2X_PORTAUDIO;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">NDEBUG;_SECURE_SCL_=0;SPU2X_PORTAUDIO;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Devel|x64'">PCSX2_DEVEL;PCSX2_DEVBUILD;NDEBUG;_SECURE_SCL_=1;SPU2X_PORTAUDIO;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">PCSX2_DEBUG;PCSX2_DEVBUILD;_SECURE_SCL_=1;SPU2X_PORTAUDIO;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ShowIncludes Condition="'$(Configuration)|$(Platform)'=='Devel|x64'">false</ShowIncludes>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Devel|x64'">PCSX2_DEVEL;PCSX2_DEVBUILD;NDEBUG;_SECURE_SCL_=1;WIN32_LEAN_AND_MEAN;SPU2X_PORTAUDIO;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">PCSX2_DEBUG;PCSX2_DEVBUILD;_SECURE_SCL_=1;WIN32_LEAN_AND_MEAN;SPU2X_PORTAUDIO;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">PCSX2_DEBUG;PCSX2_DEVBUILD;_SECURE_SCL_=1;WIN32_LEAN_AND_MEAN;SPU2X_PORTAUDIO;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Devel|Win32'">PCSX2_DEVEL;PCSX2_DEVBUILD;NDEBUG;_SECURE_SCL_=1;WIN32_LEAN_AND_MEAN;SPU2X_PORTAUDIO;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">NDEBUG;_SECURE_SCL_=0;WIN32_LEAN_AND_MEAN;SPU2X_PORTAUDIO;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">NDEBUG;_SECURE_SCL_=0;WIN32_LEAN_AND_MEAN;SPU2X_PORTAUDIO;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<LargeAddressAware>Yes</LargeAddressAware>
|
||||
<AdditionalDependencies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">comctl32.lib;ws2_32.lib;shlwapi.lib;winmm.lib;rpcrt4.lib;dsound.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies Condition="'$(Configuration)|$(Platform)'=='Devel|Win32'">comctl32.lib;ws2_32.lib;shlwapi.lib;winmm.lib;rpcrt4.lib;dsound.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">comctl32.lib;ws2_32.lib;shlwapi.lib;winmm.lib;rpcrt4.lib;dsound.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">comctl32.lib;ws2_32.lib;shlwapi.lib;winmm.lib;rpcrt4.lib;dsound.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies Condition="'$(Configuration)|$(Platform)'=='Devel|x64'">comctl32.lib;ws2_32.lib;shlwapi.lib;winmm.lib;rpcrt4.lib;dsound.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies Condition="'$(Configuration)|$(Platform)'=='Release|x64'">comctl32.lib;ws2_32.lib;shlwapi.lib;winmm.lib;rpcrt4.lib;dsound.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">comctl32.lib;ws2_32.lib;shlwapi.lib;winmm.lib;rpcrt4.lib;iphlpapi.lib;dsound.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies Condition="'$(Configuration)|$(Platform)'=='Devel|Win32'">comctl32.lib;ws2_32.lib;shlwapi.lib;winmm.lib;rpcrt4.lib;iphlpapi.lib;dsound.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">comctl32.lib;ws2_32.lib;shlwapi.lib;winmm.lib;rpcrt4.lib;iphlpapi.lib;dsound.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">comctl32.lib;ws2_32.lib;shlwapi.lib;winmm.lib;rpcrt4.lib;iphlpapi.lib;dsound.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies Condition="'$(Configuration)|$(Platform)'=='Devel|x64'">comctl32.lib;ws2_32.lib;shlwapi.lib;winmm.lib;rpcrt4.lib;iphlpapi.lib;dsound.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies Condition="'$(Configuration)|$(Platform)'=='Release|x64'">comctl32.lib;ws2_32.lib;shlwapi.lib;winmm.lib;rpcrt4.lib;iphlpapi.lib;dsound.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
|
@ -261,6 +262,14 @@
|
|||
<ClCompile Include="..\..\DebugTools\MipsAssemblerTables.cpp" />
|
||||
<ClCompile Include="..\..\DebugTools\MipsStackWalk.cpp" />
|
||||
<ClCompile Include="..\..\DebugTools\SymbolMap.cpp" />
|
||||
<ClCompile Include="..\..\DEV9\DEV9.cpp" />
|
||||
<ClCompile Include="..\..\DEV9\flash.cpp" />
|
||||
<ClCompile Include="..\..\DEV9\pcap_io.cpp" />
|
||||
<ClCompile Include="..\..\DEV9\smap.cpp" />
|
||||
<ClCompile Include="..\..\DEV9\Win32\Config.cpp" />
|
||||
<ClCompile Include="..\..\DEV9\Win32\net.cpp" />
|
||||
<ClCompile Include="..\..\DEV9\Win32\tap-win32.cpp" />
|
||||
<ClCompile Include="..\..\DEV9\Win32\Win32.cpp" />
|
||||
<ClCompile Include="..\..\GameDatabase.cpp" />
|
||||
<ClCompile Include="..\..\Gif_Logger.cpp" />
|
||||
<ClCompile Include="..\..\Gif_Unit.cpp" />
|
||||
|
@ -551,6 +560,14 @@
|
|||
<ClInclude Include="..\..\DebugTools\MipsAssemblerTables.h" />
|
||||
<ClInclude Include="..\..\DebugTools\MipsStackWalk.h" />
|
||||
<ClInclude Include="..\..\DebugTools\SymbolMap.h" />
|
||||
<ClInclude Include="..\..\DEV9\ata.h" />
|
||||
<ClInclude Include="..\..\DEV9\Config.h" />
|
||||
<ClInclude Include="..\..\DEV9\DEV9.h" />
|
||||
<ClInclude Include="..\..\DEV9\net.h" />
|
||||
<ClInclude Include="..\..\DEV9\pcap_io.h" />
|
||||
<ClInclude Include="..\..\DEV9\smap.h" />
|
||||
<ClInclude Include="..\..\DEV9\Win32\resource.h" />
|
||||
<ClInclude Include="..\..\DEV9\Win32\tap.h" />
|
||||
<ClInclude Include="..\..\GameDatabase.h" />
|
||||
<ClInclude Include="..\..\Gif_Unit.h" />
|
||||
<ClInclude Include="..\..\gui\AppGameDatabase.h" />
|
||||
|
@ -737,6 +754,7 @@
|
|||
<AdditionalIncludeDirectories>$(SolutionDir)3rdparty\wxwidgets3.0\$(PlatformName);$(SolutionDir)3rdparty\wxwidgets3.0\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ResourceCompile>
|
||||
<ResourceCompile Include="..\..\SPU2\Windows\SPU2.rc" />
|
||||
<ResourceCompile Include="..\..\DEV9\Win32\DEV9ghzdrk.rc" />
|
||||
<ResourceCompile Include="..\wxResources.rc" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
|
|
|
@ -169,6 +169,9 @@
|
|||
<Filter Include="Recording\VirtualPad\Images">
|
||||
<UniqueIdentifier>{ad528458-08eb-49a2-aefa-3c2b86ab8896}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="System\DEV9">
|
||||
<UniqueIdentifier>{8d5454f9-590c-4c53-aae1-8391c6465e50}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="..\..\Utilities\folderdesc.txt">
|
||||
|
@ -1003,6 +1006,30 @@
|
|||
<ClCompile Include="..\..\SPU2\SndOut_Portaudio.cpp">
|
||||
<Filter>System\Ps2\SPU2</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\DEV9\DEV9.cpp">
|
||||
<Filter>System\DEV9</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\DEV9\flash.cpp">
|
||||
<Filter>System\DEV9</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\DEV9\pcap_io.cpp">
|
||||
<Filter>System\DEV9</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\DEV9\smap.cpp">
|
||||
<Filter>System\DEV9</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\DEV9\Win32\Config.cpp">
|
||||
<Filter>System\DEV9</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\DEV9\Win32\net.cpp">
|
||||
<Filter>System\DEV9</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\DEV9\Win32\tap-win32.cpp">
|
||||
<Filter>System\DEV9</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\DEV9\Win32\Win32.cpp">
|
||||
<Filter>System\DEV9</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\..\Patch.h">
|
||||
|
@ -1524,6 +1551,30 @@
|
|||
<ClInclude Include="..\..\Recording\Utilities\InputRecordingLogger.h">
|
||||
<Filter>Recording\Utilities</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\DEV9\ata.h">
|
||||
<Filter>System\DEV9</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\DEV9\Config.h">
|
||||
<Filter>System\DEV9</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\DEV9\DEV9.h">
|
||||
<Filter>System\DEV9</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\DEV9\net.h">
|
||||
<Filter>System\DEV9</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\DEV9\pcap_io.h">
|
||||
<Filter>System\DEV9</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\DEV9\smap.h">
|
||||
<Filter>System\DEV9</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\DEV9\Win32\resource.h">
|
||||
<Filter>System\DEV9</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\DEV9\Win32\tap.h">
|
||||
<Filter>System\DEV9</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="..\wxResources.rc">
|
||||
|
@ -1535,6 +1586,9 @@
|
|||
<ResourceCompile Include="..\..\SPU2\Windows\SPU2.rc">
|
||||
<Filter>System\Ps2\SPU2</Filter>
|
||||
</ResourceCompile>
|
||||
<ResourceCompile Include="..\..\DEV9\Win32\DEV9ghzdrk.rc">
|
||||
<Filter>System\DEV9</Filter>
|
||||
</ResourceCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<CustomBuildStep Include="..\..\rdebug\deci2.h">
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
|
||||
#include "PrecompiledHeader.h"
|
||||
#include "Win32.h"
|
||||
#include <winioctl.h>
|
||||
|
||||
// Throws an exception based on the value returned from GetLastError.
|
||||
// Performs an option return value success/fail check on hresult.
|
||||
|
|
Loading…
Reference in New Issue