WiFi: Do a big refactor of the client interface code for better code cleanliness, organization, and stability. There are also some minor behavior changes.
- EXPERIMENTAL_WIFI_COMM no longer disables all of the WiFi-related code. Instead, the WiFi code is always enabled and actually running the code is now controlled using WifiHandler::SetEmulationLevel(). - On the Windows port, EXPERIMENTAL_WIFI_COMM no longer hides all of the WiFi options. Instead, it only affects the user's ability to control the WiFi emulation. (Forces the WiFi emulation level to WifiEmulationLevel_Off if EXPERIMENTAL_WIFI_COMM is undefined.) - The Cocoa port (and probably other POSIX-based ports) should now work better with the WiFi code. - WiFi comm interfaces no longer initialize only once upon app startup. Instead, they initialize each time the emulator resets, and then uninitialize each time a ROM is unloaded. Now, users no longer have to restart the app in order to apply any changed WiFi settings. Instead, users only need to reset the emulator or load a new ROM. - Previously, the SoftAP comm interface wouldn't run if libpcap was unavailable or if a network device wasn't found. Now, the SoftAP comm interface will now run without libpcap or a network device, albeit with significantly reduced functionality. - Previously, saving pcap files required WIFI_LOGGING_LEVEL >= 3. Now, saving pcap files no longer relies on WIFI_LOGGING_LEVEL, instead relying on WIFI_SAVE_PCAP_TO_FILE to enable the functionality.
This commit is contained in:
parent
65901c77c0
commit
5e67e9ca7c
|
@ -102,8 +102,6 @@ int TotalLagFrames;
|
||||||
|
|
||||||
TSCalInfo TSCal;
|
TSCalInfo TSCal;
|
||||||
|
|
||||||
WifiEmulationLevel wifiEmulationLevel = WifiEmulationLevel_Off;
|
|
||||||
|
|
||||||
namespace DLDI
|
namespace DLDI
|
||||||
{
|
{
|
||||||
bool tryPatch(void* data, size_t size, unsigned int device);
|
bool tryPatch(void* data, size_t size, unsigned int device);
|
||||||
|
@ -181,8 +179,9 @@ int NDS_Init()
|
||||||
|
|
||||||
if (SPU_Init(SNDCORE_DUMMY, 740) != 0)
|
if (SPU_Init(SNDCORE_DUMMY, 740) != 0)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
WIFI_Init() ;
|
delete wifiHandler;
|
||||||
|
wifiHandler = new WifiHandler;
|
||||||
|
|
||||||
cheats = new CHEATS();
|
cheats = new CHEATS();
|
||||||
cheatSearch = new CHEATSEARCH();
|
cheatSearch = new CHEATSEARCH();
|
||||||
|
@ -199,7 +198,9 @@ void NDS_DeInit(void)
|
||||||
GPU = NULL;
|
GPU = NULL;
|
||||||
|
|
||||||
MMU_DeInit();
|
MMU_DeInit();
|
||||||
WIFI_DeInit();
|
|
||||||
|
delete wifiHandler;
|
||||||
|
wifiHandler = NULL;
|
||||||
|
|
||||||
delete cheats;
|
delete cheats;
|
||||||
cheats = NULL;
|
cheats = NULL;
|
||||||
|
@ -572,6 +573,9 @@ bool GameInfo::loadROM(std::string fname, u32 type)
|
||||||
|
|
||||||
void GameInfo::closeROM()
|
void GameInfo::closeROM()
|
||||||
{
|
{
|
||||||
|
if (wifiHandler != NULL)
|
||||||
|
wifiHandler->CommStop();
|
||||||
|
|
||||||
if (GPU != NULL)
|
if (GPU != NULL)
|
||||||
GPU->ForceFrameStop();
|
GPU->ForceFrameStop();
|
||||||
|
|
||||||
|
@ -1333,19 +1337,16 @@ void Sequencer::init()
|
||||||
dma_1_1.controller = &MMU_new.dma[1][1];
|
dma_1_1.controller = &MMU_new.dma[1][1];
|
||||||
dma_1_2.controller = &MMU_new.dma[1][2];
|
dma_1_2.controller = &MMU_new.dma[1][2];
|
||||||
dma_1_3.controller = &MMU_new.dma[1][3];
|
dma_1_3.controller = &MMU_new.dma[1][3];
|
||||||
|
|
||||||
|
if (wifiHandler->GetCurrentEmulationLevel() != WifiEmulationLevel_Off)
|
||||||
#ifdef EXPERIMENTAL_WIFI_COMM
|
|
||||||
if(wifiEmulationLevel > WifiEmulationLevel_Off)
|
|
||||||
{
|
{
|
||||||
wifi.enabled = true;
|
wifi.enabled = true;
|
||||||
wifi.timestamp = kWifiCycles;
|
wifi.timestamp = kWifiCycles;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
wifi.enabled = false;
|
wifi.enabled = false;
|
||||||
#else
|
}
|
||||||
wifi.enabled = false;
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void execHardware_hblank()
|
static void execHardware_hblank()
|
||||||
|
@ -1670,10 +1671,7 @@ u64 Sequencer::findNext()
|
||||||
if(sqrtunit.isEnabled()) next = _fast_min(next,sqrtunit.next());
|
if(sqrtunit.isEnabled()) next = _fast_min(next,sqrtunit.next());
|
||||||
if(gxfifo.enabled) next = _fast_min(next,gxfifo.next());
|
if(gxfifo.enabled) next = _fast_min(next,gxfifo.next());
|
||||||
if(readslot1.isEnabled()) next = _fast_min(next,readslot1.next());
|
if(readslot1.isEnabled()) next = _fast_min(next,readslot1.next());
|
||||||
|
if (wifi.enabled) next = _fast_min(next,wifi.next());
|
||||||
#ifdef EXPERIMENTAL_WIFI_COMM
|
|
||||||
if (wifiEmulationLevel > WifiEmulationLevel_Off) next = _fast_min(next,wifi.next());
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define test(X,Y) if(dma_##X##_##Y .isEnabled()) next = _fast_min(next,dma_##X##_##Y .next());
|
#define test(X,Y) if(dma_##X##_##Y .isEnabled()) next = _fast_min(next,dma_##X##_##Y .next());
|
||||||
test(0,0); test(0,1); test(0,2); test(0,3);
|
test(0,0); test(0,1); test(0,2); test(0,3);
|
||||||
|
@ -1729,16 +1727,14 @@ void Sequencer::execHardware()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef EXPERIMENTAL_WIFI_COMM
|
if (wifiHandler->GetCurrentEmulationLevel() != WifiEmulationLevel_Off)
|
||||||
if(wifiEmulationLevel > WifiEmulationLevel_Off)
|
|
||||||
{
|
{
|
||||||
if(wifi.isTriggered())
|
if (wifi.isTriggered())
|
||||||
{
|
{
|
||||||
WIFI_usTrigger();
|
WIFI_usTrigger();
|
||||||
wifi.timestamp += kWifiCycles;
|
wifi.timestamp += kWifiCycles;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
if(divider.isTriggered()) divider.exec();
|
if(divider.isTriggered()) divider.exec();
|
||||||
if(sqrtunit.isTriggered()) sqrtunit.exec();
|
if(sqrtunit.isTriggered()) sqrtunit.exec();
|
||||||
|
@ -2671,8 +2667,8 @@ void NDS_Reset()
|
||||||
|
|
||||||
GPU->Reset();
|
GPU->Reset();
|
||||||
|
|
||||||
WIFI_Reset();
|
wifiHandler->Reset();
|
||||||
memcpy(FW_Mac, (MMU.fw.data + 0x36), 6);
|
wifiHandler->CommStart();
|
||||||
|
|
||||||
SPU_DeInit();
|
SPU_DeInit();
|
||||||
SPU_ReInit(!canBootFromFirmware && bootResult);
|
SPU_ReInit(!canBootFromFirmware && bootResult);
|
||||||
|
@ -3088,6 +3084,7 @@ void emu_halt(EmuHaltReasonCode reasonCode, NDSErrorTag errorTag)
|
||||||
|
|
||||||
NDS_CurrentCPUInfoToNDSError(_lastNDSError);
|
NDS_CurrentCPUInfoToNDSError(_lastNDSError);
|
||||||
|
|
||||||
|
wifiHandler->CommStop();
|
||||||
GPU->ForceFrameStop();
|
GPU->ForceFrameStop();
|
||||||
execute = false;
|
execute = false;
|
||||||
|
|
||||||
|
|
|
@ -217,14 +217,6 @@ enum NDS_CONSOLE_TYPE
|
||||||
NDS_CONSOLE_TYPE_DSI = 0xFE
|
NDS_CONSOLE_TYPE_DSI = 0xFE
|
||||||
};
|
};
|
||||||
|
|
||||||
enum WifiEmulationLevel
|
|
||||||
{
|
|
||||||
WifiEmulationLevel_Off = 0,
|
|
||||||
WifiEmulationLevel_Normal = 10000,
|
|
||||||
WifiEmulationLevel_Compatibility = 65535,
|
|
||||||
};
|
|
||||||
extern WifiEmulationLevel wifiEmulationLevel;
|
|
||||||
|
|
||||||
struct NDSSystem
|
struct NDSSystem
|
||||||
{
|
{
|
||||||
s32 wifiCycle;
|
s32 wifiCycle;
|
||||||
|
@ -573,8 +565,7 @@ extern struct TCommonSettings
|
||||||
strcpy(ARM7BIOS, "biosnds7.bin");
|
strcpy(ARM7BIOS, "biosnds7.bin");
|
||||||
strcpy(Firmware, "firmware.bin");
|
strcpy(Firmware, "firmware.bin");
|
||||||
|
|
||||||
/* WIFI mode: adhoc = 0, infrastructure = 1 */
|
wifi.mode = WifiCommInterfaceID_Infrastructure;
|
||||||
wifi.mode = 1;
|
|
||||||
wifi.infraBridgeAdapter = 0;
|
wifi.infraBridgeAdapter = 0;
|
||||||
|
|
||||||
for(int i=0;i<16;i++)
|
for(int i=0;i<16;i++)
|
||||||
|
@ -656,7 +647,7 @@ extern struct TCommonSettings
|
||||||
u32 jit_max_block_size;
|
u32 jit_max_block_size;
|
||||||
|
|
||||||
struct _Wifi {
|
struct _Wifi {
|
||||||
int mode;
|
WifiCommInterfaceID mode;
|
||||||
int infraBridgeAdapter;
|
int infraBridgeAdapter;
|
||||||
} wifi;
|
} wifi;
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
Copyright (C) 2009-2015 DeSmuME team
|
Copyright (C) 2009-2018 DeSmuME team
|
||||||
|
|
||||||
This file is free software: you can redistribute it and/or modify
|
This file is free software: you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
|
@ -22,9 +22,6 @@
|
||||||
#include "types.h"
|
#include "types.h"
|
||||||
#include "debug.h"
|
#include "debug.h"
|
||||||
|
|
||||||
#ifdef EXPERIMENTAL_WIFI_COMM
|
|
||||||
#include <pcap.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
class VIEW3D_Driver
|
class VIEW3D_Driver
|
||||||
{
|
{
|
||||||
|
@ -39,53 +36,7 @@ class BaseDriver {
|
||||||
public:
|
public:
|
||||||
BaseDriver();
|
BaseDriver();
|
||||||
~BaseDriver();
|
~BaseDriver();
|
||||||
|
|
||||||
#ifdef EXPERIMENTAL_WIFI_COMM
|
|
||||||
#ifdef HOST_WINDOWS
|
|
||||||
virtual bool WIFI_SocketsAvailable() { return true; }
|
|
||||||
virtual bool WIFI_PCapAvailable() { return false; }
|
|
||||||
|
|
||||||
virtual void WIFI_GetUniqueMAC(u8* mac) {}
|
|
||||||
|
|
||||||
virtual bool WIFI_WFCWarning() { return false; }
|
|
||||||
|
|
||||||
virtual int PCAP_findalldevs(pcap_if_t** alldevs, char* errbuf) { return -1; }
|
|
||||||
virtual void PCAP_freealldevs(pcap_if_t* alldevs) {}
|
|
||||||
virtual pcap_t* PCAP_open(const char* source, int snaplen, int flags, int readtimeout, char* errbuf) { return NULL; }
|
|
||||||
virtual void PCAP_close(pcap_t* dev) {}
|
|
||||||
virtual int PCAP_setnonblock(pcap_t* dev, int nonblock, char* errbuf) { return -1; }
|
|
||||||
virtual int PCAP_sendpacket(pcap_t* dev, const u_char* data, int len) { return -1; }
|
|
||||||
virtual int PCAP_dispatch(pcap_t* dev, int num, pcap_handler callback, u_char* userdata) { return -1; }
|
|
||||||
#else
|
|
||||||
virtual bool WIFI_SocketsAvailable() { return true; }
|
|
||||||
virtual bool WIFI_PCapAvailable() { return true; }
|
|
||||||
|
|
||||||
virtual void WIFI_GetUniqueMAC(u8* mac) {}
|
|
||||||
|
|
||||||
virtual bool WIFI_WFCWarning() { return false; }
|
|
||||||
|
|
||||||
virtual int PCAP_findalldevs(pcap_if_t** alldevs, char* errbuf) {
|
|
||||||
return pcap_findalldevs(alldevs, errbuf); }
|
|
||||||
|
|
||||||
virtual void PCAP_freealldevs(pcap_if_t* alldevs) {
|
|
||||||
pcap_freealldevs(alldevs); }
|
|
||||||
|
|
||||||
virtual pcap_t* PCAP_open(const char* source, int snaplen, int flags, int readtimeout, char* errbuf) {
|
|
||||||
return pcap_open_live(source, snaplen, flags, readtimeout, errbuf); }
|
|
||||||
|
|
||||||
virtual void PCAP_close(pcap_t* dev) {
|
|
||||||
pcap_close(dev); }
|
|
||||||
|
|
||||||
virtual int PCAP_setnonblock(pcap_t* dev, int nonblock, char* errbuf) {
|
|
||||||
return pcap_setnonblock(dev, nonblock, errbuf); }
|
|
||||||
|
|
||||||
virtual int PCAP_sendpacket(pcap_t* dev, const u_char* data, int len) {
|
|
||||||
return pcap_sendpacket(dev, data, len); }
|
|
||||||
|
|
||||||
virtual int PCAP_dispatch(pcap_t* dev, int num, pcap_handler callback, u_char* userdata) {
|
|
||||||
return pcap_dispatch(dev, num, callback, userdata); }
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
virtual void AVI_SoundUpdate(void* soundData, int soundLen) {}
|
virtual void AVI_SoundUpdate(void* soundData, int soundLen) {}
|
||||||
virtual bool AVI_IsRecording() { return FALSE; }
|
virtual bool AVI_IsRecording() { return FALSE; }
|
||||||
virtual bool WAV_IsRecording() { return FALSE; }
|
virtual bool WAV_IsRecording() { return FALSE; }
|
||||||
|
|
|
@ -86,6 +86,8 @@ ClientExecutionControl::ClientExecutionControl()
|
||||||
_settingsPending.enableFirmwareBoot = false;
|
_settingsPending.enableFirmwareBoot = false;
|
||||||
_settingsPending.enableDebugConsole = false;
|
_settingsPending.enableDebugConsole = false;
|
||||||
_settingsPending.enableEnsataEmulation = false;
|
_settingsPending.enableEnsataEmulation = false;
|
||||||
|
_settingsPending.wifiMode = WifiCommInterfaceID_AdHoc;
|
||||||
|
_settingsPending.wifiBridgeDeviceIndex = 0;
|
||||||
|
|
||||||
_settingsPending.enableExecutionSpeedLimiter = true;
|
_settingsPending.enableExecutionSpeedLimiter = true;
|
||||||
_settingsPending.executionSpeed = SPEED_SCALAR_NORMAL;
|
_settingsPending.executionSpeed = SPEED_SCALAR_NORMAL;
|
||||||
|
@ -560,6 +562,60 @@ void ClientExecutionControl::SetEnableEnsataEmulation(bool enable)
|
||||||
pthread_mutex_unlock(&this->_mutexSettingsPendingOnNDSExec);
|
pthread_mutex_unlock(&this->_mutexSettingsPendingOnNDSExec);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int ClientExecutionControl::GetWifiMode()
|
||||||
|
{
|
||||||
|
pthread_mutex_lock(&this->_mutexSettingsPendingOnReset);
|
||||||
|
const int wifiMode = this->_settingsPending.wifiMode;
|
||||||
|
pthread_mutex_unlock(&this->_mutexSettingsPendingOnReset);
|
||||||
|
|
||||||
|
return wifiMode;
|
||||||
|
}
|
||||||
|
|
||||||
|
void ClientExecutionControl::SetWifiMode(int wifiMode)
|
||||||
|
{
|
||||||
|
pthread_mutex_lock(&this->_mutexSettingsPendingOnReset);
|
||||||
|
this->_settingsPending.wifiMode = wifiMode;
|
||||||
|
|
||||||
|
this->_newSettingsPendingOnReset = true;
|
||||||
|
pthread_mutex_unlock(&this->_mutexSettingsPendingOnReset);
|
||||||
|
}
|
||||||
|
|
||||||
|
int ClientExecutionControl::GetWifiBridgeDeviceIndex()
|
||||||
|
{
|
||||||
|
pthread_mutex_lock(&this->_mutexSettingsPendingOnReset);
|
||||||
|
const int wifiBridgeDeviceIndex = this->_settingsPending.wifiBridgeDeviceIndex;
|
||||||
|
pthread_mutex_unlock(&this->_mutexSettingsPendingOnReset);
|
||||||
|
|
||||||
|
return wifiBridgeDeviceIndex;
|
||||||
|
}
|
||||||
|
|
||||||
|
void ClientExecutionControl::SetWifiBridgeDeviceIndex(int wifiBridgeDeviceIndex)
|
||||||
|
{
|
||||||
|
pthread_mutex_lock(&this->_mutexSettingsPendingOnReset);
|
||||||
|
this->_settingsPending.wifiBridgeDeviceIndex = wifiBridgeDeviceIndex;
|
||||||
|
|
||||||
|
this->_newSettingsPendingOnReset = true;
|
||||||
|
pthread_mutex_unlock(&this->_mutexSettingsPendingOnReset);
|
||||||
|
}
|
||||||
|
|
||||||
|
uint32_t ClientExecutionControl::GetWifiIP4Address()
|
||||||
|
{
|
||||||
|
pthread_mutex_lock(&this->_mutexSettingsPendingOnReset);
|
||||||
|
const uint32_t ip4Address = this->_settingsPending.wifiIP4Address;
|
||||||
|
pthread_mutex_unlock(&this->_mutexSettingsPendingOnReset);
|
||||||
|
|
||||||
|
return ip4Address;
|
||||||
|
}
|
||||||
|
|
||||||
|
void ClientExecutionControl::SetWifiIP4Address(uint32_t ip4Address)
|
||||||
|
{
|
||||||
|
pthread_mutex_lock(&this->_mutexSettingsPendingOnReset);
|
||||||
|
this->_settingsPending.wifiIP4Address = ip4Address;
|
||||||
|
|
||||||
|
this->_newSettingsPendingOnReset = true;
|
||||||
|
pthread_mutex_unlock(&this->_mutexSettingsPendingOnReset);
|
||||||
|
}
|
||||||
|
|
||||||
bool ClientExecutionControl::GetEnableCheats()
|
bool ClientExecutionControl::GetEnableCheats()
|
||||||
{
|
{
|
||||||
pthread_mutex_lock(&this->_mutexSettingsPendingOnNDSExec);
|
pthread_mutex_lock(&this->_mutexSettingsPendingOnNDSExec);
|
||||||
|
@ -903,6 +959,10 @@ void ClientExecutionControl::ApplySettingsOnReset()
|
||||||
this->_settingsApplied.enableExternalFirmware = this->_settingsPending.enableExternalFirmware;
|
this->_settingsApplied.enableExternalFirmware = this->_settingsPending.enableExternalFirmware;
|
||||||
this->_settingsApplied.enableFirmwareBoot = this->_settingsPending.enableFirmwareBoot;
|
this->_settingsApplied.enableFirmwareBoot = this->_settingsPending.enableFirmwareBoot;
|
||||||
|
|
||||||
|
this->_settingsApplied.wifiMode = this->_settingsPending.wifiMode;
|
||||||
|
this->_settingsApplied.wifiBridgeDeviceIndex = this->_settingsPending.wifiBridgeDeviceIndex;
|
||||||
|
this->_settingsApplied.wifiIP4Address = this->_settingsPending.wifiIP4Address;
|
||||||
|
|
||||||
this->_settingsApplied.cpuEmulationEngineName = this->_settingsPending.cpuEmulationEngineName;
|
this->_settingsApplied.cpuEmulationEngineName = this->_settingsPending.cpuEmulationEngineName;
|
||||||
this->_settingsApplied.slot1DeviceName = this->_settingsPending.slot1DeviceName;
|
this->_settingsApplied.slot1DeviceName = this->_settingsPending.slot1DeviceName;
|
||||||
this->_ndsFrameInfo.cpuEmulationEngineName = this->_settingsApplied.cpuEmulationEngineName;
|
this->_ndsFrameInfo.cpuEmulationEngineName = this->_settingsApplied.cpuEmulationEngineName;
|
||||||
|
@ -921,8 +981,15 @@ void ClientExecutionControl::ApplySettingsOnReset()
|
||||||
CommonSettings.jit_max_block_size = this->_settingsApplied.JITMaxBlockSize;
|
CommonSettings.jit_max_block_size = this->_settingsApplied.JITMaxBlockSize;
|
||||||
CommonSettings.UseExtBIOS = this->_settingsApplied.enableExternalBIOS;
|
CommonSettings.UseExtBIOS = this->_settingsApplied.enableExternalBIOS;
|
||||||
CommonSettings.UseExtFirmware = this->_settingsApplied.enableExternalFirmware;
|
CommonSettings.UseExtFirmware = this->_settingsApplied.enableExternalFirmware;
|
||||||
CommonSettings.UseExtFirmwareSettings = this->_settingsApplied.enableExternalFirmware;
|
//CommonSettings.UseExtFirmwareSettings = this->_settingsApplied.enableExternalFirmware;
|
||||||
|
CommonSettings.UseExtFirmwareSettings = false;
|
||||||
CommonSettings.BootFromFirmware = this->_settingsApplied.enableFirmwareBoot;
|
CommonSettings.BootFromFirmware = this->_settingsApplied.enableFirmwareBoot;
|
||||||
|
CommonSettings.wifi.mode = (WifiCommInterfaceID)this->_settingsApplied.wifiMode;
|
||||||
|
CommonSettings.wifi.infraBridgeAdapter = this->_settingsApplied.wifiBridgeDeviceIndex;
|
||||||
|
|
||||||
|
wifiHandler->SetIP4Address(this->_settingsApplied.wifiIP4Address);
|
||||||
|
wifiHandler->SetCommInterfaceID((WifiCommInterfaceID)this->_settingsApplied.wifiMode);
|
||||||
|
wifiHandler->SetBridgeDeviceIndex(this->_settingsApplied.wifiBridgeDeviceIndex);
|
||||||
|
|
||||||
if (this->_settingsApplied.filePathARM9BIOS.length() == 0)
|
if (this->_settingsApplied.filePathARM9BIOS.length() == 0)
|
||||||
{
|
{
|
||||||
|
|
|
@ -92,6 +92,10 @@ struct ClientExecutionControlSettings
|
||||||
bool enableDebugConsole;
|
bool enableDebugConsole;
|
||||||
bool enableEnsataEmulation;
|
bool enableEnsataEmulation;
|
||||||
|
|
||||||
|
int wifiMode;
|
||||||
|
int wifiBridgeDeviceIndex;
|
||||||
|
uint32_t wifiIP4Address;
|
||||||
|
|
||||||
bool enableCheats;
|
bool enableCheats;
|
||||||
|
|
||||||
bool enableExecutionSpeedLimiter;
|
bool enableExecutionSpeedLimiter;
|
||||||
|
@ -295,6 +299,15 @@ public:
|
||||||
bool GetEnableEnsataEmulation();
|
bool GetEnableEnsataEmulation();
|
||||||
void SetEnableEnsataEmulation(bool enable);
|
void SetEnableEnsataEmulation(bool enable);
|
||||||
|
|
||||||
|
int GetWifiMode();
|
||||||
|
void SetWifiMode(int wifiMode);
|
||||||
|
|
||||||
|
int GetWifiBridgeDeviceIndex();
|
||||||
|
void SetWifiBridgeDeviceIndex(int wifiBridgeDeviceIndex);
|
||||||
|
|
||||||
|
uint32_t GetWifiIP4Address();
|
||||||
|
void SetWifiIP4Address(uint32_t ip4Address);
|
||||||
|
|
||||||
bool GetEnableCheats();
|
bool GetEnableCheats();
|
||||||
void SetEnableCheats(bool enable);
|
void SetEnableCheats(bool enable);
|
||||||
|
|
||||||
|
|
|
@ -253,7 +253,6 @@
|
||||||
AB405694169F5DCC0016AC3E /* x86util.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB405676169F5DCC0016AC3E /* x86util.cpp */; };
|
AB405694169F5DCC0016AC3E /* x86util.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB405676169F5DCC0016AC3E /* x86util.cpp */; };
|
||||||
AB405695169F5DCC0016AC3E /* x86util.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB405676169F5DCC0016AC3E /* x86util.cpp */; };
|
AB405695169F5DCC0016AC3E /* x86util.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB405676169F5DCC0016AC3E /* x86util.cpp */; };
|
||||||
AB407F371A6206FB00313213 /* xbrz.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB47B52C18A3F722009A42AF /* xbrz.cpp */; };
|
AB407F371A6206FB00313213 /* xbrz.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB47B52C18A3F722009A42AF /* xbrz.cpp */; };
|
||||||
AB4676F314AB12D60002FF94 /* libz.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = AB0A0D1914AACA9600E83E91 /* libz.dylib */; };
|
|
||||||
AB47B52E18A3F722009A42AF /* xbrz.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB47B52C18A3F722009A42AF /* xbrz.cpp */; };
|
AB47B52E18A3F722009A42AF /* xbrz.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB47B52C18A3F722009A42AF /* xbrz.cpp */; };
|
||||||
AB47B52F18A45C35009A42AF /* xbrz.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB47B52C18A3F722009A42AF /* xbrz.cpp */; };
|
AB47B52F18A45C35009A42AF /* xbrz.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB47B52C18A3F722009A42AF /* xbrz.cpp */; };
|
||||||
AB4C81E41B21676C00ACECD5 /* hq3x.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB4C81E31B21676C00ACECD5 /* hq3x.cpp */; };
|
AB4C81E41B21676C00ACECD5 /* hq3x.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB4C81E31B21676C00ACECD5 /* hq3x.cpp */; };
|
||||||
|
@ -263,6 +262,16 @@
|
||||||
AB4FCEBD1692AB82000F498F /* Accelerate.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AB4FCEBC1692AB82000F498F /* Accelerate.framework */; };
|
AB4FCEBD1692AB82000F498F /* Accelerate.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AB4FCEBC1692AB82000F498F /* Accelerate.framework */; };
|
||||||
AB4FCEBE1692AB82000F498F /* Accelerate.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AB4FCEBC1692AB82000F498F /* Accelerate.framework */; };
|
AB4FCEBE1692AB82000F498F /* Accelerate.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AB4FCEBC1692AB82000F498F /* Accelerate.framework */; };
|
||||||
AB4FCEBF1692AB82000F498F /* Accelerate.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AB4FCEBC1692AB82000F498F /* Accelerate.framework */; };
|
AB4FCEBF1692AB82000F498F /* Accelerate.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AB4FCEBC1692AB82000F498F /* Accelerate.framework */; };
|
||||||
|
AB53B0BE211E63FE003D0ED9 /* libpcap.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = AB53B0BC211E63E4003D0ED9 /* libpcap.tbd */; };
|
||||||
|
AB53B0BF211E63FF003D0ED9 /* libpcap.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = AB53B0BC211E63E4003D0ED9 /* libpcap.tbd */; };
|
||||||
|
AB53B0C0211E6400003D0ED9 /* libpcap.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = AB53B0BC211E63E4003D0ED9 /* libpcap.tbd */; };
|
||||||
|
AB53B0C1211E6400003D0ED9 /* libpcap.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = AB53B0BC211E63E4003D0ED9 /* libpcap.tbd */; };
|
||||||
|
AB53B0C2211E6401003D0ED9 /* libpcap.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = AB53B0BC211E63E4003D0ED9 /* libpcap.tbd */; };
|
||||||
|
AB53B0C3211E6405003D0ED9 /* libz.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = AB53B0BD211E63E8003D0ED9 /* libz.tbd */; };
|
||||||
|
AB53B0C4211E6405003D0ED9 /* libz.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = AB53B0BD211E63E8003D0ED9 /* libz.tbd */; };
|
||||||
|
AB53B0C5211E6406003D0ED9 /* libz.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = AB53B0BD211E63E8003D0ED9 /* libz.tbd */; };
|
||||||
|
AB53B0C6211E6407003D0ED9 /* libz.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = AB53B0BD211E63E8003D0ED9 /* libz.tbd */; };
|
||||||
|
AB53B0C7211E6407003D0ED9 /* libz.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = AB53B0BD211E63E8003D0ED9 /* libz.tbd */; };
|
||||||
AB54718B1E27610500508C5C /* MacMetalDisplayViewShaders.metal in Sources */ = {isa = PBXBuildFile; fileRef = AB54718A1E27610500508C5C /* MacMetalDisplayViewShaders.metal */; };
|
AB54718B1E27610500508C5C /* MacMetalDisplayViewShaders.metal in Sources */ = {isa = PBXBuildFile; fileRef = AB54718A1E27610500508C5C /* MacMetalDisplayViewShaders.metal */; };
|
||||||
AB54718C1E27610500508C5C /* MacMetalDisplayViewShaders.metal in Sources */ = {isa = PBXBuildFile; fileRef = AB54718A1E27610500508C5C /* MacMetalDisplayViewShaders.metal */; };
|
AB54718C1E27610500508C5C /* MacMetalDisplayViewShaders.metal in Sources */ = {isa = PBXBuildFile; fileRef = AB54718A1E27610500508C5C /* MacMetalDisplayViewShaders.metal */; };
|
||||||
AB54718D1E27610500508C5C /* MacMetalDisplayViewShaders.metal in Sources */ = {isa = PBXBuildFile; fileRef = AB54718A1E27610500508C5C /* MacMetalDisplayViewShaders.metal */; };
|
AB54718D1E27610500508C5C /* MacMetalDisplayViewShaders.metal in Sources */ = {isa = PBXBuildFile; fileRef = AB54718A1E27610500508C5C /* MacMetalDisplayViewShaders.metal */; };
|
||||||
|
@ -489,7 +498,6 @@
|
||||||
AB796D6915CDCBA200C59155 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 29B97325FDCFA39411CA2CEA /* Foundation.framework */; };
|
AB796D6915CDCBA200C59155 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 29B97325FDCFA39411CA2CEA /* Foundation.framework */; };
|
||||||
AB796D6A15CDCBA200C59155 /* IOKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AB350BA41478AC96007165AC /* IOKit.framework */; };
|
AB796D6A15CDCBA200C59155 /* IOKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AB350BA41478AC96007165AC /* IOKit.framework */; };
|
||||||
AB796D6B15CDCBA200C59155 /* OpenGL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = ABC570D4134431DA00E7B0B1 /* OpenGL.framework */; };
|
AB796D6B15CDCBA200C59155 /* OpenGL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = ABC570D4134431DA00E7B0B1 /* OpenGL.framework */; };
|
||||||
AB796D6C15CDCBA200C59155 /* libz.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = AB0A0D1914AACA9600E83E91 /* libz.dylib */; };
|
|
||||||
AB7EC7F4189B2B92009D198A /* Icon_AutoholdClear_420x420.png in Resources */ = {isa = PBXBuildFile; fileRef = AB7EC7F2189B2B92009D198A /* Icon_AutoholdClear_420x420.png */; };
|
AB7EC7F4189B2B92009D198A /* Icon_AutoholdClear_420x420.png in Resources */ = {isa = PBXBuildFile; fileRef = AB7EC7F2189B2B92009D198A /* Icon_AutoholdClear_420x420.png */; };
|
||||||
AB7EC7F5189B2B92009D198A /* Icon_AutoholdClear_420x420.png in Resources */ = {isa = PBXBuildFile; fileRef = AB7EC7F2189B2B92009D198A /* Icon_AutoholdClear_420x420.png */; };
|
AB7EC7F5189B2B92009D198A /* Icon_AutoholdClear_420x420.png in Resources */ = {isa = PBXBuildFile; fileRef = AB7EC7F2189B2B92009D198A /* Icon_AutoholdClear_420x420.png */; };
|
||||||
AB7EC7F6189B2B92009D198A /* Icon_AutoholdSet_420x420.png in Resources */ = {isa = PBXBuildFile; fileRef = AB7EC7F3189B2B92009D198A /* Icon_AutoholdSet_420x420.png */; };
|
AB7EC7F6189B2B92009D198A /* Icon_AutoholdSet_420x420.png in Resources */ = {isa = PBXBuildFile; fileRef = AB7EC7F3189B2B92009D198A /* Icon_AutoholdSet_420x420.png */; };
|
||||||
|
@ -789,7 +797,6 @@
|
||||||
AB8F3D261A53AC2600A80BF6 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 29B97325FDCFA39411CA2CEA /* Foundation.framework */; };
|
AB8F3D261A53AC2600A80BF6 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 29B97325FDCFA39411CA2CEA /* Foundation.framework */; };
|
||||||
AB8F3D271A53AC2600A80BF6 /* IOKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AB350BA41478AC96007165AC /* IOKit.framework */; };
|
AB8F3D271A53AC2600A80BF6 /* IOKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AB350BA41478AC96007165AC /* IOKit.framework */; };
|
||||||
AB8F3D281A53AC2600A80BF6 /* OpenGL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = ABC570D4134431DA00E7B0B1 /* OpenGL.framework */; };
|
AB8F3D281A53AC2600A80BF6 /* OpenGL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = ABC570D4134431DA00E7B0B1 /* OpenGL.framework */; };
|
||||||
AB8F3D291A53AC2600A80BF6 /* libz.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = AB0A0D1914AACA9600E83E91 /* libz.dylib */; };
|
|
||||||
AB901BDE1420706100348EEC /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = AB901BDD1420706100348EEC /* Localizable.strings */; };
|
AB901BDE1420706100348EEC /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = AB901BDD1420706100348EEC /* Localizable.strings */; };
|
||||||
AB9038A617C5ECFD00F410BD /* advanscene.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB9038A517C5ECFD00F410BD /* advanscene.cpp */; };
|
AB9038A617C5ECFD00F410BD /* advanscene.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB9038A517C5ECFD00F410BD /* advanscene.cpp */; };
|
||||||
AB9038A717C5ECFD00F410BD /* advanscene.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB9038A517C5ECFD00F410BD /* advanscene.cpp */; };
|
AB9038A717C5ECFD00F410BD /* advanscene.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB9038A517C5ECFD00F410BD /* advanscene.cpp */; };
|
||||||
|
@ -895,7 +902,6 @@
|
||||||
ABB3C6661501BF8A00E0C22E /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */; };
|
ABB3C6661501BF8A00E0C22E /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */; };
|
||||||
ABB3C6671501BF8A00E0C22E /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 29B97325FDCFA39411CA2CEA /* Foundation.framework */; };
|
ABB3C6671501BF8A00E0C22E /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 29B97325FDCFA39411CA2CEA /* Foundation.framework */; };
|
||||||
ABB3C6691501BF8A00E0C22E /* OpenGL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = ABC570D4134431DA00E7B0B1 /* OpenGL.framework */; };
|
ABB3C6691501BF8A00E0C22E /* OpenGL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = ABC570D4134431DA00E7B0B1 /* OpenGL.framework */; };
|
||||||
ABB3C66A1501BF8A00E0C22E /* libz.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = AB0A0D1914AACA9600E83E91 /* libz.dylib */; };
|
|
||||||
ABB3C66C1501C04F00E0C22E /* NDSGameCore.mm in Sources */ = {isa = PBXBuildFile; fileRef = ABB3C63E1501BB8300E0C22E /* NDSGameCore.mm */; };
|
ABB3C66C1501C04F00E0C22E /* NDSGameCore.mm in Sources */ = {isa = PBXBuildFile; fileRef = ABB3C63E1501BB8300E0C22E /* NDSGameCore.mm */; };
|
||||||
ABB3C6701501C04F00E0C22E /* videofilter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB817A35143EE2DB00A7DFE9 /* videofilter.cpp */; };
|
ABB3C6701501C04F00E0C22E /* videofilter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB817A35143EE2DB00A7DFE9 /* videofilter.cpp */; };
|
||||||
ABB3C6721501C04F00E0C22E /* cocoa_file.mm in Sources */ = {isa = PBXBuildFile; fileRef = AB58F32C1364F44B0074C376 /* cocoa_file.mm */; };
|
ABB3C6721501C04F00E0C22E /* cocoa_file.mm in Sources */ = {isa = PBXBuildFile; fileRef = AB58F32C1364F44B0074C376 /* cocoa_file.mm */; };
|
||||||
|
@ -1428,7 +1434,6 @@
|
||||||
ABE145AF1FBBA71A0097A4A8 /* IOKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AB350BA41478AC96007165AC /* IOKit.framework */; };
|
ABE145AF1FBBA71A0097A4A8 /* IOKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AB350BA41478AC96007165AC /* IOKit.framework */; };
|
||||||
ABE145B11FBBA71A0097A4A8 /* OpenGL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = ABC570D4134431DA00E7B0B1 /* OpenGL.framework */; };
|
ABE145B11FBBA71A0097A4A8 /* OpenGL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = ABC570D4134431DA00E7B0B1 /* OpenGL.framework */; };
|
||||||
ABE145B21FBBA71A0097A4A8 /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AB3BF4321E2562F2003E2B24 /* QuartzCore.framework */; };
|
ABE145B21FBBA71A0097A4A8 /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AB3BF4321E2562F2003E2B24 /* QuartzCore.framework */; };
|
||||||
ABE145B31FBBA71A0097A4A8 /* libz.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = AB0A0D1914AACA9600E83E91 /* libz.dylib */; };
|
|
||||||
ABE145B41FBBA71A0097A4A8 /* CoreVideo.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = ABAE1F6E1F6873E70080EFE3 /* CoreVideo.framework */; };
|
ABE145B41FBBA71A0097A4A8 /* CoreVideo.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = ABAE1F6E1F6873E70080EFE3 /* CoreVideo.framework */; };
|
||||||
ABE5DE95143F781900835AD8 /* videofilter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB817A35143EE2DB00A7DFE9 /* videofilter.cpp */; };
|
ABE5DE95143F781900835AD8 /* videofilter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB817A35143EE2DB00A7DFE9 /* videofilter.cpp */; };
|
||||||
ABE5DFE5143FB1DA00835AD8 /* cocoa_videofilter.mm in Sources */ = {isa = PBXBuildFile; fileRef = ABE5DFE4143FB1DA00835AD8 /* cocoa_videofilter.mm */; };
|
ABE5DFE5143FB1DA00835AD8 /* cocoa_videofilter.mm in Sources */ = {isa = PBXBuildFile; fileRef = ABE5DFE4143FB1DA00835AD8 /* cocoa_videofilter.mm */; };
|
||||||
|
@ -1542,7 +1547,6 @@
|
||||||
AB01005D170D07B000D70FBE /* InputProfileController.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = InputProfileController.mm; sourceTree = "<group>"; };
|
AB01005D170D07B000D70FBE /* InputProfileController.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = InputProfileController.mm; sourceTree = "<group>"; };
|
||||||
AB02475B13886BF300E9F9AB /* KeyNames.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = KeyNames.plist; sourceTree = "<group>"; };
|
AB02475B13886BF300E9F9AB /* KeyNames.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = KeyNames.plist; sourceTree = "<group>"; };
|
||||||
AB02791814415E4C0075E58C /* Info (Debug).plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "Info (Debug).plist"; sourceTree = "<group>"; };
|
AB02791814415E4C0075E58C /* Info (Debug).plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "Info (Debug).plist"; sourceTree = "<group>"; };
|
||||||
AB0A0D1914AACA9600E83E91 /* libz.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libz.dylib; path = usr/lib/libz.dylib; sourceTree = SDKROOT; };
|
|
||||||
AB0F28FE14BE6E68009ABC6F /* Icon_Execute_420x420.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = Icon_Execute_420x420.png; path = images/Icon_Execute_420x420.png; sourceTree = "<group>"; };
|
AB0F28FE14BE6E68009ABC6F /* Icon_Execute_420x420.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = Icon_Execute_420x420.png; path = images/Icon_Execute_420x420.png; sourceTree = "<group>"; };
|
||||||
AB0F28FF14BE6E68009ABC6F /* Icon_Pause_420x420.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = Icon_Pause_420x420.png; path = images/Icon_Pause_420x420.png; sourceTree = "<group>"; };
|
AB0F28FF14BE6E68009ABC6F /* Icon_Pause_420x420.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = Icon_Pause_420x420.png; path = images/Icon_Pause_420x420.png; sourceTree = "<group>"; };
|
||||||
AB0F290014BE6E68009ABC6F /* Icon_Speed1x_420x420.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = Icon_Speed1x_420x420.png; path = images/Icon_Speed1x_420x420.png; sourceTree = "<group>"; };
|
AB0F290014BE6E68009ABC6F /* Icon_Speed1x_420x420.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = Icon_Speed1x_420x420.png; path = images/Icon_Speed1x_420x420.png; sourceTree = "<group>"; };
|
||||||
|
@ -1785,6 +1789,8 @@
|
||||||
AB47B52C18A3F722009A42AF /* xbrz.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = xbrz.cpp; sourceTree = "<group>"; };
|
AB47B52C18A3F722009A42AF /* xbrz.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = xbrz.cpp; sourceTree = "<group>"; };
|
||||||
AB4C81E31B21676C00ACECD5 /* hq3x.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = hq3x.cpp; sourceTree = "<group>"; };
|
AB4C81E31B21676C00ACECD5 /* hq3x.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = hq3x.cpp; sourceTree = "<group>"; };
|
||||||
AB4FCEBC1692AB82000F498F /* Accelerate.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Accelerate.framework; path = System/Library/Frameworks/Accelerate.framework; sourceTree = SDKROOT; };
|
AB4FCEBC1692AB82000F498F /* Accelerate.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Accelerate.framework; path = System/Library/Frameworks/Accelerate.framework; sourceTree = SDKROOT; };
|
||||||
|
AB53B0BC211E63E4003D0ED9 /* libpcap.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libpcap.tbd; path = usr/lib/libpcap.tbd; sourceTree = SDKROOT; };
|
||||||
|
AB53B0BD211E63E8003D0ED9 /* libz.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libz.tbd; path = usr/lib/libz.tbd; sourceTree = SDKROOT; };
|
||||||
AB54718A1E27610500508C5C /* MacMetalDisplayViewShaders.metal */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.metal; path = MacMetalDisplayViewShaders.metal; sourceTree = "<group>"; };
|
AB54718A1E27610500508C5C /* MacMetalDisplayViewShaders.metal */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.metal; path = MacMetalDisplayViewShaders.metal; sourceTree = "<group>"; };
|
||||||
AB5648FD186E6EA8002740F4 /* cocoa_slot2.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = cocoa_slot2.h; sourceTree = "<group>"; };
|
AB5648FD186E6EA8002740F4 /* cocoa_slot2.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = cocoa_slot2.h; sourceTree = "<group>"; };
|
||||||
AB5648FE186E6EA8002740F4 /* cocoa_slot2.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = cocoa_slot2.mm; sourceTree = "<group>"; };
|
AB5648FE186E6EA8002740F4 /* cocoa_slot2.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = cocoa_slot2.mm; sourceTree = "<group>"; };
|
||||||
|
@ -2301,6 +2307,8 @@
|
||||||
buildActionMask = 2147483647;
|
buildActionMask = 2147483647;
|
||||||
files = (
|
files = (
|
||||||
AB4FCEBE1692AB82000F498F /* Accelerate.framework in Frameworks */,
|
AB4FCEBE1692AB82000F498F /* Accelerate.framework in Frameworks */,
|
||||||
|
AB53B0C5211E6406003D0ED9 /* libz.tbd in Frameworks */,
|
||||||
|
AB53B0BE211E63FE003D0ED9 /* libpcap.tbd in Frameworks */,
|
||||||
ABC5720D1344346600E7B0B1 /* AppKit.framework in Frameworks */,
|
ABC5720D1344346600E7B0B1 /* AppKit.framework in Frameworks */,
|
||||||
ABACB8DD1710B656003B845D /* AudioToolbox.framework in Frameworks */,
|
ABACB8DD1710B656003B845D /* AudioToolbox.framework in Frameworks */,
|
||||||
ABC570D1134431CE00E7B0B1 /* AudioUnit.framework in Frameworks */,
|
ABC570D1134431CE00E7B0B1 /* AudioUnit.framework in Frameworks */,
|
||||||
|
@ -2313,7 +2321,6 @@
|
||||||
AB3BF4421E262959003E2B24 /* Metal.framework in Frameworks */,
|
AB3BF4421E262959003E2B24 /* Metal.framework in Frameworks */,
|
||||||
ABC570D5134431DA00E7B0B1 /* OpenGL.framework in Frameworks */,
|
ABC570D5134431DA00E7B0B1 /* OpenGL.framework in Frameworks */,
|
||||||
AB3BF4341E256309003E2B24 /* QuartzCore.framework in Frameworks */,
|
AB3BF4341E256309003E2B24 /* QuartzCore.framework in Frameworks */,
|
||||||
AB4676F314AB12D60002FF94 /* libz.dylib in Frameworks */,
|
|
||||||
ABAE1F711F6874090080EFE3 /* CoreVideo.framework in Frameworks */,
|
ABAE1F711F6874090080EFE3 /* CoreVideo.framework in Frameworks */,
|
||||||
);
|
);
|
||||||
runOnlyForDeploymentPostprocessing = 0;
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
|
@ -2323,6 +2330,8 @@
|
||||||
buildActionMask = 2147483647;
|
buildActionMask = 2147483647;
|
||||||
files = (
|
files = (
|
||||||
AB4FCEBD1692AB82000F498F /* Accelerate.framework in Frameworks */,
|
AB4FCEBD1692AB82000F498F /* Accelerate.framework in Frameworks */,
|
||||||
|
AB53B0C7211E6407003D0ED9 /* libz.tbd in Frameworks */,
|
||||||
|
AB53B0C1211E6400003D0ED9 /* libpcap.tbd in Frameworks */,
|
||||||
AB796D6615CDCBA200C59155 /* AppKit.framework in Frameworks */,
|
AB796D6615CDCBA200C59155 /* AppKit.framework in Frameworks */,
|
||||||
ABACB8DC1710B621003B845D /* AudioToolbox.framework in Frameworks */,
|
ABACB8DC1710B621003B845D /* AudioToolbox.framework in Frameworks */,
|
||||||
AB796D6715CDCBA200C59155 /* AudioUnit.framework in Frameworks */,
|
AB796D6715CDCBA200C59155 /* AudioUnit.framework in Frameworks */,
|
||||||
|
@ -2336,7 +2345,6 @@
|
||||||
AB78B5C21E384F2200297FED /* Metal.framework in Frameworks */,
|
AB78B5C21E384F2200297FED /* Metal.framework in Frameworks */,
|
||||||
AB796D6B15CDCBA200C59155 /* OpenGL.framework in Frameworks */,
|
AB796D6B15CDCBA200C59155 /* OpenGL.framework in Frameworks */,
|
||||||
AB3BF4331E2562F2003E2B24 /* QuartzCore.framework in Frameworks */,
|
AB3BF4331E2562F2003E2B24 /* QuartzCore.framework in Frameworks */,
|
||||||
AB796D6C15CDCBA200C59155 /* libz.dylib in Frameworks */,
|
|
||||||
);
|
);
|
||||||
runOnlyForDeploymentPostprocessing = 0;
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
};
|
};
|
||||||
|
@ -2345,6 +2353,8 @@
|
||||||
buildActionMask = 2147483647;
|
buildActionMask = 2147483647;
|
||||||
files = (
|
files = (
|
||||||
AB8F3D1F1A53AC2600A80BF6 /* Accelerate.framework in Frameworks */,
|
AB8F3D1F1A53AC2600A80BF6 /* Accelerate.framework in Frameworks */,
|
||||||
|
AB53B0C6211E6407003D0ED9 /* libz.tbd in Frameworks */,
|
||||||
|
AB53B0C0211E6400003D0ED9 /* libpcap.tbd in Frameworks */,
|
||||||
AB8F3D201A53AC2600A80BF6 /* AppKit.framework in Frameworks */,
|
AB8F3D201A53AC2600A80BF6 /* AppKit.framework in Frameworks */,
|
||||||
AB8F3D211A53AC2600A80BF6 /* AudioToolbox.framework in Frameworks */,
|
AB8F3D211A53AC2600A80BF6 /* AudioToolbox.framework in Frameworks */,
|
||||||
AB8F3D221A53AC2600A80BF6 /* AudioUnit.framework in Frameworks */,
|
AB8F3D221A53AC2600A80BF6 /* AudioUnit.framework in Frameworks */,
|
||||||
|
@ -2357,7 +2367,6 @@
|
||||||
AB78B5C11E384F2100297FED /* Metal.framework in Frameworks */,
|
AB78B5C11E384F2100297FED /* Metal.framework in Frameworks */,
|
||||||
AB8F3D281A53AC2600A80BF6 /* OpenGL.framework in Frameworks */,
|
AB8F3D281A53AC2600A80BF6 /* OpenGL.framework in Frameworks */,
|
||||||
AB3BF4351E256309003E2B24 /* QuartzCore.framework in Frameworks */,
|
AB3BF4351E256309003E2B24 /* QuartzCore.framework in Frameworks */,
|
||||||
AB8F3D291A53AC2600A80BF6 /* libz.dylib in Frameworks */,
|
|
||||||
ABAE1F701F6874090080EFE3 /* CoreVideo.framework in Frameworks */,
|
ABAE1F701F6874090080EFE3 /* CoreVideo.framework in Frameworks */,
|
||||||
);
|
);
|
||||||
runOnlyForDeploymentPostprocessing = 0;
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
|
@ -2367,13 +2376,14 @@
|
||||||
buildActionMask = 2147483647;
|
buildActionMask = 2147483647;
|
||||||
files = (
|
files = (
|
||||||
AB4FCEBF1692AB82000F498F /* Accelerate.framework in Frameworks */,
|
AB4FCEBF1692AB82000F498F /* Accelerate.framework in Frameworks */,
|
||||||
|
AB53B0C3211E6405003D0ED9 /* libz.tbd in Frameworks */,
|
||||||
ABB3C6641501BF8A00E0C22E /* AppKit.framework in Frameworks */,
|
ABB3C6641501BF8A00E0C22E /* AppKit.framework in Frameworks */,
|
||||||
ABACB8DE1710B65F003B845D /* AudioToolbox.framework in Frameworks */,
|
ABACB8DE1710B65F003B845D /* AudioToolbox.framework in Frameworks */,
|
||||||
ABB3C6651501BF8A00E0C22E /* AudioUnit.framework in Frameworks */,
|
ABB3C6651501BF8A00E0C22E /* AudioUnit.framework in Frameworks */,
|
||||||
ABB3C6661501BF8A00E0C22E /* Cocoa.framework in Frameworks */,
|
ABB3C6661501BF8A00E0C22E /* Cocoa.framework in Frameworks */,
|
||||||
ABB3C6671501BF8A00E0C22E /* Foundation.framework in Frameworks */,
|
ABB3C6671501BF8A00E0C22E /* Foundation.framework in Frameworks */,
|
||||||
|
AB53B0C2211E6401003D0ED9 /* libpcap.tbd in Frameworks */,
|
||||||
ABB3C6691501BF8A00E0C22E /* OpenGL.framework in Frameworks */,
|
ABB3C6691501BF8A00E0C22E /* OpenGL.framework in Frameworks */,
|
||||||
ABB3C66A1501BF8A00E0C22E /* libz.dylib in Frameworks */,
|
|
||||||
ABC503B11AAC4355002FCD43 /* CoreAudio.framework in Frameworks */,
|
ABC503B11AAC4355002FCD43 /* CoreAudio.framework in Frameworks */,
|
||||||
AB5785FD17176AFC002C5FC7 /* OpenEmuBase.framework in Frameworks */,
|
AB5785FD17176AFC002C5FC7 /* OpenEmuBase.framework in Frameworks */,
|
||||||
);
|
);
|
||||||
|
@ -2387,15 +2397,16 @@
|
||||||
ABE145A71FBBA71A0097A4A8 /* AppKit.framework in Frameworks */,
|
ABE145A71FBBA71A0097A4A8 /* AppKit.framework in Frameworks */,
|
||||||
ABE145A81FBBA71A0097A4A8 /* AudioToolbox.framework in Frameworks */,
|
ABE145A81FBBA71A0097A4A8 /* AudioToolbox.framework in Frameworks */,
|
||||||
ABE145A91FBBA71A0097A4A8 /* AudioUnit.framework in Frameworks */,
|
ABE145A91FBBA71A0097A4A8 /* AudioUnit.framework in Frameworks */,
|
||||||
|
AB53B0C4211E6405003D0ED9 /* libz.tbd in Frameworks */,
|
||||||
ABE145AA1FBBA71A0097A4A8 /* Carbon.framework in Frameworks */,
|
ABE145AA1FBBA71A0097A4A8 /* Carbon.framework in Frameworks */,
|
||||||
ABE145AB1FBBA71A0097A4A8 /* Cocoa.framework in Frameworks */,
|
ABE145AB1FBBA71A0097A4A8 /* Cocoa.framework in Frameworks */,
|
||||||
ABE145AC1FBBA71A0097A4A8 /* CoreAudio.framework in Frameworks */,
|
ABE145AC1FBBA71A0097A4A8 /* CoreAudio.framework in Frameworks */,
|
||||||
ABE145AD1FBBA71A0097A4A8 /* ForceFeedback.framework in Frameworks */,
|
ABE145AD1FBBA71A0097A4A8 /* ForceFeedback.framework in Frameworks */,
|
||||||
|
AB53B0BF211E63FF003D0ED9 /* libpcap.tbd in Frameworks */,
|
||||||
ABE145AE1FBBA71A0097A4A8 /* Foundation.framework in Frameworks */,
|
ABE145AE1FBBA71A0097A4A8 /* Foundation.framework in Frameworks */,
|
||||||
ABE145AF1FBBA71A0097A4A8 /* IOKit.framework in Frameworks */,
|
ABE145AF1FBBA71A0097A4A8 /* IOKit.framework in Frameworks */,
|
||||||
ABE145B11FBBA71A0097A4A8 /* OpenGL.framework in Frameworks */,
|
ABE145B11FBBA71A0097A4A8 /* OpenGL.framework in Frameworks */,
|
||||||
ABE145B21FBBA71A0097A4A8 /* QuartzCore.framework in Frameworks */,
|
ABE145B21FBBA71A0097A4A8 /* QuartzCore.framework in Frameworks */,
|
||||||
ABE145B31FBBA71A0097A4A8 /* libz.dylib in Frameworks */,
|
|
||||||
ABE145B41FBBA71A0097A4A8 /* CoreVideo.framework in Frameworks */,
|
ABE145B41FBBA71A0097A4A8 /* CoreVideo.framework in Frameworks */,
|
||||||
);
|
);
|
||||||
runOnlyForDeploymentPostprocessing = 0;
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
|
@ -2479,7 +2490,8 @@
|
||||||
AB3BF4401E262943003E2B24 /* Metal.framework */,
|
AB3BF4401E262943003E2B24 /* Metal.framework */,
|
||||||
ABC570D4134431DA00E7B0B1 /* OpenGL.framework */,
|
ABC570D4134431DA00E7B0B1 /* OpenGL.framework */,
|
||||||
AB3BF4321E2562F2003E2B24 /* QuartzCore.framework */,
|
AB3BF4321E2562F2003E2B24 /* QuartzCore.framework */,
|
||||||
AB0A0D1914AACA9600E83E91 /* libz.dylib */,
|
AB53B0BC211E63E4003D0ED9 /* libpcap.tbd */,
|
||||||
|
AB53B0BD211E63E8003D0ED9 /* libz.tbd */,
|
||||||
);
|
);
|
||||||
name = "Linked Frameworks";
|
name = "Linked Frameworks";
|
||||||
sourceTree = "<group>";
|
sourceTree = "<group>";
|
||||||
|
|
12
desmume/src/frontend/cocoa/DeSmuME (XCode 3).xcodeproj/project.pbxproj
Normal file → Executable file
12
desmume/src/frontend/cocoa/DeSmuME (XCode 3).xcodeproj/project.pbxproj
Normal file → Executable file
|
@ -693,6 +693,11 @@
|
||||||
AB37E3781D6188BC004A2C0D /* colorspacehandler.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB37E36C1D6188BC004A2C0D /* colorspacehandler.cpp */; };
|
AB37E3781D6188BC004A2C0D /* colorspacehandler.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB37E36C1D6188BC004A2C0D /* colorspacehandler.cpp */; };
|
||||||
AB37E37C1D6188BC004A2C0D /* colorspacehandler.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB37E36C1D6188BC004A2C0D /* colorspacehandler.cpp */; };
|
AB37E37C1D6188BC004A2C0D /* colorspacehandler.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB37E36C1D6188BC004A2C0D /* colorspacehandler.cpp */; };
|
||||||
AB37E3801D6188BC004A2C0D /* colorspacehandler.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB37E36C1D6188BC004A2C0D /* colorspacehandler.cpp */; };
|
AB37E3801D6188BC004A2C0D /* colorspacehandler.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB37E36C1D6188BC004A2C0D /* colorspacehandler.cpp */; };
|
||||||
|
AB3932C4211E610200DA9D80 /* libpcap.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = AB3932C3211E610200DA9D80 /* libpcap.dylib */; };
|
||||||
|
AB3932C5211E611F00DA9D80 /* libpcap.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = AB3932C3211E610200DA9D80 /* libpcap.dylib */; };
|
||||||
|
AB3932C6211E612400DA9D80 /* libpcap.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = AB3932C3211E610200DA9D80 /* libpcap.dylib */; };
|
||||||
|
AB3932C7211E612A00DA9D80 /* libpcap.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = AB3932C3211E610200DA9D80 /* libpcap.dylib */; };
|
||||||
|
AB3932C8211E612E00DA9D80 /* libpcap.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = AB3932C3211E610200DA9D80 /* libpcap.dylib */; };
|
||||||
AB3ACB7814C2361100D7D192 /* appDelegate.mm in Sources */ = {isa = PBXBuildFile; fileRef = AB3ACB6714C2361100D7D192 /* appDelegate.mm */; };
|
AB3ACB7814C2361100D7D192 /* appDelegate.mm in Sources */ = {isa = PBXBuildFile; fileRef = AB3ACB6714C2361100D7D192 /* appDelegate.mm */; };
|
||||||
AB3ACB7914C2361100D7D192 /* cheatWindowDelegate.mm in Sources */ = {isa = PBXBuildFile; fileRef = AB3ACB6914C2361100D7D192 /* cheatWindowDelegate.mm */; };
|
AB3ACB7914C2361100D7D192 /* cheatWindowDelegate.mm in Sources */ = {isa = PBXBuildFile; fileRef = AB3ACB6914C2361100D7D192 /* cheatWindowDelegate.mm */; };
|
||||||
AB3ACB7C14C2361100D7D192 /* inputPrefsView.mm in Sources */ = {isa = PBXBuildFile; fileRef = AB3ACB6F14C2361100D7D192 /* inputPrefsView.mm */; };
|
AB3ACB7C14C2361100D7D192 /* inputPrefsView.mm in Sources */ = {isa = PBXBuildFile; fileRef = AB3ACB6F14C2361100D7D192 /* inputPrefsView.mm */; };
|
||||||
|
@ -1921,6 +1926,7 @@
|
||||||
AB37E36F1D6188BC004A2C0D /* colorspacehandler_AltiVec.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = colorspacehandler_AltiVec.h; sourceTree = "<group>"; };
|
AB37E36F1D6188BC004A2C0D /* colorspacehandler_AltiVec.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = colorspacehandler_AltiVec.h; sourceTree = "<group>"; };
|
||||||
AB37E3721D6188BC004A2C0D /* colorspacehandler_SSE2.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = colorspacehandler_SSE2.cpp; sourceTree = "<group>"; };
|
AB37E3721D6188BC004A2C0D /* colorspacehandler_SSE2.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = colorspacehandler_SSE2.cpp; sourceTree = "<group>"; };
|
||||||
AB37E3731D6188BC004A2C0D /* colorspacehandler_SSE2.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = colorspacehandler_SSE2.h; sourceTree = "<group>"; };
|
AB37E3731D6188BC004A2C0D /* colorspacehandler_SSE2.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = colorspacehandler_SSE2.h; sourceTree = "<group>"; };
|
||||||
|
AB3932C3211E610200DA9D80 /* libpcap.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libpcap.dylib; path = usr/lib/libpcap.dylib; sourceTree = SDKROOT; };
|
||||||
AB3ACB6614C2361100D7D192 /* appDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = appDelegate.h; sourceTree = "<group>"; };
|
AB3ACB6614C2361100D7D192 /* appDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = appDelegate.h; sourceTree = "<group>"; };
|
||||||
AB3ACB6714C2361100D7D192 /* appDelegate.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = appDelegate.mm; sourceTree = "<group>"; };
|
AB3ACB6714C2361100D7D192 /* appDelegate.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = appDelegate.mm; sourceTree = "<group>"; };
|
||||||
AB3ACB6814C2361100D7D192 /* cheatWindowDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = cheatWindowDelegate.h; sourceTree = "<group>"; };
|
AB3ACB6814C2361100D7D192 /* cheatWindowDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = cheatWindowDelegate.h; sourceTree = "<group>"; };
|
||||||
|
@ -2349,6 +2355,7 @@
|
||||||
AB1CC8001AA509C2008B0A16 /* CoreAudio.framework in Frameworks */,
|
AB1CC8001AA509C2008B0A16 /* CoreAudio.framework in Frameworks */,
|
||||||
AB3E69801E25FB9800D4CC75 /* QuartzCore.framework in Frameworks */,
|
AB3E69801E25FB9800D4CC75 /* QuartzCore.framework in Frameworks */,
|
||||||
AB446DB61F69DB69002F32B6 /* CoreVideo.framework in Frameworks */,
|
AB446DB61F69DB69002F32B6 /* CoreVideo.framework in Frameworks */,
|
||||||
|
AB3932C8211E612E00DA9D80 /* libpcap.dylib in Frameworks */,
|
||||||
);
|
);
|
||||||
runOnlyForDeploymentPostprocessing = 0;
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
};
|
};
|
||||||
|
@ -2370,6 +2377,7 @@
|
||||||
AB1CC80A1AA509DF008B0A16 /* CoreAudio.framework in Frameworks */,
|
AB1CC80A1AA509DF008B0A16 /* CoreAudio.framework in Frameworks */,
|
||||||
AB3E697F1E25FB9700D4CC75 /* QuartzCore.framework in Frameworks */,
|
AB3E697F1E25FB9700D4CC75 /* QuartzCore.framework in Frameworks */,
|
||||||
AB446DB51F69DB69002F32B6 /* CoreVideo.framework in Frameworks */,
|
AB446DB51F69DB69002F32B6 /* CoreVideo.framework in Frameworks */,
|
||||||
|
AB3932C7211E612A00DA9D80 /* libpcap.dylib in Frameworks */,
|
||||||
);
|
);
|
||||||
runOnlyForDeploymentPostprocessing = 0;
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
};
|
};
|
||||||
|
@ -2391,6 +2399,7 @@
|
||||||
AB1CC80D1AA509E1008B0A16 /* CoreAudio.framework in Frameworks */,
|
AB1CC80D1AA509E1008B0A16 /* CoreAudio.framework in Frameworks */,
|
||||||
AB3E69451E25FB8400D4CC75 /* QuartzCore.framework in Frameworks */,
|
AB3E69451E25FB8400D4CC75 /* QuartzCore.framework in Frameworks */,
|
||||||
AB446DA11F69DB56002F32B6 /* CoreVideo.framework in Frameworks */,
|
AB446DA11F69DB56002F32B6 /* CoreVideo.framework in Frameworks */,
|
||||||
|
AB3932C4211E610200DA9D80 /* libpcap.dylib in Frameworks */,
|
||||||
);
|
);
|
||||||
runOnlyForDeploymentPostprocessing = 0;
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
};
|
};
|
||||||
|
@ -2412,6 +2421,7 @@
|
||||||
AB1CC80C1AA509E0008B0A16 /* CoreAudio.framework in Frameworks */,
|
AB1CC80C1AA509E0008B0A16 /* CoreAudio.framework in Frameworks */,
|
||||||
AB3E697D1E25FB9600D4CC75 /* QuartzCore.framework in Frameworks */,
|
AB3E697D1E25FB9600D4CC75 /* QuartzCore.framework in Frameworks */,
|
||||||
AB446DB31F69DB68002F32B6 /* CoreVideo.framework in Frameworks */,
|
AB446DB31F69DB68002F32B6 /* CoreVideo.framework in Frameworks */,
|
||||||
|
AB3932C5211E611F00DA9D80 /* libpcap.dylib in Frameworks */,
|
||||||
);
|
);
|
||||||
runOnlyForDeploymentPostprocessing = 0;
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
};
|
};
|
||||||
|
@ -2433,6 +2443,7 @@
|
||||||
AB1CC80B1AA509E0008B0A16 /* CoreAudio.framework in Frameworks */,
|
AB1CC80B1AA509E0008B0A16 /* CoreAudio.framework in Frameworks */,
|
||||||
AB3E697E1E25FB9700D4CC75 /* QuartzCore.framework in Frameworks */,
|
AB3E697E1E25FB9700D4CC75 /* QuartzCore.framework in Frameworks */,
|
||||||
AB446DB41F69DB68002F32B6 /* CoreVideo.framework in Frameworks */,
|
AB446DB41F69DB68002F32B6 /* CoreVideo.framework in Frameworks */,
|
||||||
|
AB3932C6211E612400DA9D80 /* libpcap.dylib in Frameworks */,
|
||||||
);
|
);
|
||||||
runOnlyForDeploymentPostprocessing = 0;
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
};
|
};
|
||||||
|
@ -2511,6 +2522,7 @@
|
||||||
AB350BA41478AC96007165AC /* IOKit.framework */,
|
AB350BA41478AC96007165AC /* IOKit.framework */,
|
||||||
ABC570D4134431DA00E7B0B1 /* OpenGL.framework */,
|
ABC570D4134431DA00E7B0B1 /* OpenGL.framework */,
|
||||||
AB3E69441E25FB8400D4CC75 /* QuartzCore.framework */,
|
AB3E69441E25FB8400D4CC75 /* QuartzCore.framework */,
|
||||||
|
AB3932C3211E610200DA9D80 /* libpcap.dylib */,
|
||||||
AB0A0D1914AACA9600E83E91 /* libz.dylib */,
|
AB0A0D1914AACA9600E83E91 /* libz.dylib */,
|
||||||
);
|
);
|
||||||
name = "Linked Frameworks";
|
name = "Linked Frameworks";
|
||||||
|
|
|
@ -129,6 +129,9 @@ volatile bool execute = true;
|
||||||
|
|
||||||
threadParam.cdsCore = self;
|
threadParam.cdsCore = self;
|
||||||
|
|
||||||
|
wifiHandler->SetUniqueMACValue((uint32_t)[[NSProcessInfo processInfo] processIdentifier]);
|
||||||
|
wifiHandler->SetEmulationLevel(WifiEmulationLevel_Off);
|
||||||
|
|
||||||
pthread_rwlock_init(&threadParam.rwlockOutputList, NULL);
|
pthread_rwlock_init(&threadParam.rwlockOutputList, NULL);
|
||||||
pthread_mutex_init(&threadParam.mutexThreadExecute, NULL);
|
pthread_mutex_init(&threadParam.mutexThreadExecute, NULL);
|
||||||
pthread_cond_init(&threadParam.condThreadExecute, NULL);
|
pthread_cond_init(&threadParam.condThreadExecute, NULL);
|
||||||
|
@ -794,6 +797,7 @@ volatile bool execute = true;
|
||||||
[self setCoreState:ExecutionBehavior_Pause];
|
[self setCoreState:ExecutionBehavior_Pause];
|
||||||
|
|
||||||
pthread_mutex_lock(&threadParam.mutexThreadExecute);
|
pthread_mutex_lock(&threadParam.mutexThreadExecute);
|
||||||
|
execControl->SetWifiIP4Address([CocoaDSUtil hostIP4AddressAsUInt32]);
|
||||||
execControl->ApplySettingsOnReset();
|
execControl->ApplySettingsOnReset();
|
||||||
NDS_Reset();
|
NDS_Reset();
|
||||||
pthread_mutex_unlock(&threadParam.mutexThreadExecute);
|
pthread_mutex_unlock(&threadParam.mutexThreadExecute);
|
||||||
|
|
|
@ -44,6 +44,7 @@
|
||||||
|
|
||||||
+ (NSString *) operatingSystemString;
|
+ (NSString *) operatingSystemString;
|
||||||
+ (NSString *) modelIdentifierString;
|
+ (NSString *) modelIdentifierString;
|
||||||
|
+ (uint32_t) hostIP4AddressAsUInt32;
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
|
|
|
@ -163,6 +163,60 @@
|
||||||
return modelIdentifierStr;
|
return modelIdentifierStr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
+ (uint32_t) hostIP4AddressAsUInt32
|
||||||
|
{
|
||||||
|
uint32_t ip4Address_u32 = 0;
|
||||||
|
|
||||||
|
NSNumberFormatter *numberFormatter = [[NSNumberFormatter alloc] init];
|
||||||
|
[numberFormatter setAllowsFloats:NO];
|
||||||
|
|
||||||
|
NSArray *ipAddresses = [[NSHost hostWithName:[[NSHost currentHost] name]] addresses];
|
||||||
|
for (NSString *ipAddress in ipAddresses)
|
||||||
|
{
|
||||||
|
if ([ipAddress isEqualToString:@"127.0.0.1"])
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
NSArray *ipParts = [ipAddress componentsSeparatedByString:@"."];
|
||||||
|
|
||||||
|
if ([ipParts count] != 4)
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
NSNumber *ipPartNumber[4] = {
|
||||||
|
[numberFormatter numberFromString:(NSString *)[ipParts objectAtIndex:0]],
|
||||||
|
[numberFormatter numberFromString:(NSString *)[ipParts objectAtIndex:1]],
|
||||||
|
[numberFormatter numberFromString:(NSString *)[ipParts objectAtIndex:2]],
|
||||||
|
[numberFormatter numberFromString:(NSString *)[ipParts objectAtIndex:3]]
|
||||||
|
};
|
||||||
|
|
||||||
|
if ( (ipPartNumber[0] == nil) || (ipPartNumber[1] == nil) || (ipPartNumber[2] == nil) || (ipPartNumber[3] == nil) )
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
const uint8_t ipPart_u8[4] = {
|
||||||
|
[ipPartNumber[0] unsignedCharValue],
|
||||||
|
[ipPartNumber[1] unsignedCharValue],
|
||||||
|
[ipPartNumber[2] unsignedCharValue],
|
||||||
|
[ipPartNumber[3] unsignedCharValue]
|
||||||
|
};
|
||||||
|
|
||||||
|
ip4Address_u32 = (ipPart_u8[0]) | (ipPart_u8[1] << 8) | (ipPart_u8[2] << 16) | (ipPart_u8[3] << 24);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return ip4Address_u32;
|
||||||
|
}
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
@implementation DirectoryURLDragDestTextField
|
@implementation DirectoryURLDragDestTextField
|
||||||
|
|
|
@ -1630,6 +1630,7 @@
|
||||||
[self pauseCore];
|
[self pauseCore];
|
||||||
|
|
||||||
CocoaDSCore *cdsCore = (CocoaDSCore *)[cdsCoreController content];
|
CocoaDSCore *cdsCore = (CocoaDSCore *)[cdsCoreController content];
|
||||||
|
[cdsCore execControl]->SetWifiIP4Address([CocoaDSUtil hostIP4AddressAsUInt32]);
|
||||||
[cdsCore execControl]->ApplySettingsOnReset();
|
[cdsCore execControl]->ApplySettingsOnReset();
|
||||||
[cdsCore updateSlot1DeviceStatus];
|
[cdsCore updateSlot1DeviceStatus];
|
||||||
[self writeDefaultsSlot1Settings:nil];
|
[self writeDefaultsSlot1Settings:nil];
|
||||||
|
@ -1781,6 +1782,7 @@
|
||||||
[[windowController window] displayIfNeeded];
|
[[windowController window] displayIfNeeded];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[cdsCore execControl]->SetWifiIP4Address([CocoaDSUtil hostIP4AddressAsUInt32]);
|
||||||
[cdsCore execControl]->ApplySettingsOnReset();
|
[cdsCore execControl]->ApplySettingsOnReset();
|
||||||
[cdsCore setMasterExecute:YES];
|
[cdsCore setMasterExecute:YES];
|
||||||
|
|
||||||
|
|
|
@ -294,11 +294,7 @@ msgBoxInterface msgBoxWnd = {
|
||||||
};
|
};
|
||||||
//====================== Dialogs end
|
//====================== Dialogs end
|
||||||
|
|
||||||
|
|
||||||
#ifdef EXPERIMENTAL_WIFI_COMM
|
|
||||||
bool bSocketsAvailable = false;
|
|
||||||
#include "winpcap.h"
|
#include "winpcap.h"
|
||||||
#endif
|
|
||||||
|
|
||||||
VideoInfo video;
|
VideoInfo video;
|
||||||
|
|
||||||
|
@ -555,6 +551,50 @@ public:
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
class WinPCapInterface : public ClientPCapInterface
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
virtual int findalldevs(void **alldevs, char *errbuf)
|
||||||
|
{
|
||||||
|
return _pcap_findalldevs((pcap_if_t **)alldevs, errbuf);
|
||||||
|
}
|
||||||
|
|
||||||
|
virtual void freealldevs(void *alldevs)
|
||||||
|
{
|
||||||
|
_pcap_freealldevs((pcap_if_t *)alldevs);
|
||||||
|
}
|
||||||
|
|
||||||
|
virtual void* open(const char *source, int snaplen, int flags, int readtimeout, char *errbuf)
|
||||||
|
{
|
||||||
|
return _pcap_open_live(source, snaplen, flags, readtimeout, errbuf);
|
||||||
|
}
|
||||||
|
|
||||||
|
virtual void close(void *dev)
|
||||||
|
{
|
||||||
|
_pcap_close((pcap_t *)dev);
|
||||||
|
}
|
||||||
|
|
||||||
|
virtual int setnonblock(void *dev, int nonblock, char *errbuf)
|
||||||
|
{
|
||||||
|
return _pcap_setnonblock((pcap_t *)dev, nonblock, errbuf);
|
||||||
|
}
|
||||||
|
|
||||||
|
virtual int sendpacket(void *dev, const void *data, int len)
|
||||||
|
{
|
||||||
|
return _pcap_sendpacket((pcap_t *)dev, (u_char *)data, len);
|
||||||
|
}
|
||||||
|
|
||||||
|
virtual int dispatch(void *dev, int num, void *callback, void *userdata)
|
||||||
|
{
|
||||||
|
if (callback == NULL)
|
||||||
|
{
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
return _pcap_dispatch((pcap_t *)dev, num, (pcap_handler)callback, (u_char *)userdata);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
GPUEventHandlerWindows *WinGPUEvent = NULL;
|
GPUEventHandlerWindows *WinGPUEvent = NULL;
|
||||||
|
|
||||||
LRESULT CALLBACK HUDFontSettingsDlgProc(HWND hw, UINT msg, WPARAM wp, LPARAM lp);
|
LRESULT CALLBACK HUDFontSettingsDlgProc(HWND hw, UINT msg, WPARAM wp, LPARAM lp);
|
||||||
|
@ -562,9 +602,7 @@ LRESULT CALLBACK GFX3DSettingsDlgProc(HWND hw, UINT msg, WPARAM wp, LPARAM lp);
|
||||||
LRESULT CALLBACK SoundSettingsDlgProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
|
LRESULT CALLBACK SoundSettingsDlgProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
|
||||||
LRESULT CALLBACK EmulationSettingsDlgProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
|
LRESULT CALLBACK EmulationSettingsDlgProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
|
||||||
LRESULT CALLBACK MicrophoneSettingsDlgProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
|
LRESULT CALLBACK MicrophoneSettingsDlgProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
|
||||||
#ifdef EXPERIMENTAL_WIFI_COMM
|
|
||||||
LRESULT CALLBACK WifiSettingsDlgProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
|
LRESULT CALLBACK WifiSettingsDlgProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
|
||||||
#endif
|
|
||||||
|
|
||||||
//struct configured_features {
|
//struct configured_features {
|
||||||
// u16 arm9_gdb_port;
|
// u16 arm9_gdb_port;
|
||||||
|
@ -2712,97 +2750,6 @@ static void ExitRunLoop()
|
||||||
|
|
||||||
class WinDriver : public BaseDriver
|
class WinDriver : public BaseDriver
|
||||||
{
|
{
|
||||||
#ifdef EXPERIMENTAL_WIFI_COMM
|
|
||||||
virtual bool WIFI_SocketsAvailable() { return bSocketsAvailable; }
|
|
||||||
virtual bool WIFI_PCapAvailable() { return bWinPCapAvailable; }
|
|
||||||
|
|
||||||
virtual void WIFI_GetUniqueMAC(u8* mac)
|
|
||||||
{
|
|
||||||
if (mac == NULL) return;
|
|
||||||
|
|
||||||
char hostname[256];
|
|
||||||
if (gethostname(hostname, 256) != 0)
|
|
||||||
strncpy(hostname, "127.0.0.1", 256);
|
|
||||||
|
|
||||||
hostent* he = gethostbyname(hostname);
|
|
||||||
unsigned long ipaddr;
|
|
||||||
if (he == NULL || he->h_addr_list[0] == NULL)
|
|
||||||
ipaddr = 0x0100007F; // 127.0.0.1
|
|
||||||
else
|
|
||||||
ipaddr = *(unsigned long*)he->h_addr_list[0];
|
|
||||||
|
|
||||||
unsigned long pid = GetCurrentProcessId();
|
|
||||||
|
|
||||||
unsigned long hash = pid;
|
|
||||||
while ((hash & 0xFF000000) == 0)
|
|
||||||
hash <<= 1;
|
|
||||||
hash >>= 1;
|
|
||||||
hash += ipaddr >> 8;
|
|
||||||
hash &= 0x00FFFFFF;
|
|
||||||
|
|
||||||
mac[3] = hash >> 16;
|
|
||||||
mac[4] = (hash >> 8) & 0xFF;
|
|
||||||
mac[5] = hash & 0xFF;
|
|
||||||
}
|
|
||||||
|
|
||||||
virtual bool WIFI_WFCWarning()
|
|
||||||
{
|
|
||||||
return MessageBox(NULL, "You are trying to connect to the Nintendo WFC servers.\n"
|
|
||||||
"\n"
|
|
||||||
"Please don't do this."
|
|
||||||
"\n"
|
|
||||||
"DeSmuME is not perfect yet, and connecting to WFC will cause unexpected problems\n"
|
|
||||||
"for Nintendo, and for DeSmuME, which neither of us want.\n"
|
|
||||||
"\n"
|
|
||||||
"And you don't want that either, right?\n"
|
|
||||||
"\n"
|
|
||||||
"You may get your IP blocked and then you won't even be able to use your real DS.\n"
|
|
||||||
"You may cause DeSmuME to get blocked, which would be a shame since we wouldn't even\n"
|
|
||||||
"be able to work on it any more.\n"
|
|
||||||
"\n"
|
|
||||||
"By the time you read this, it may have already happened due to irresponsible individuals\n"
|
|
||||||
"ignoring this message.\n"
|
|
||||||
"\n"
|
|
||||||
"So please don't do it.\n"
|
|
||||||
"\n"
|
|
||||||
"We aren't going to try to stop you, since someone will just make a hacked build and you\n"
|
|
||||||
"won't get a chance to read this. So please, stop yourself.\n"
|
|
||||||
"\n"
|
|
||||||
"Do you still want to connect?",
|
|
||||||
"DeSmuME - WFC warning",
|
|
||||||
MB_YESNO | MB_DEFBUTTON2 | MB_ICONWARNING
|
|
||||||
) == IDYES;
|
|
||||||
}
|
|
||||||
|
|
||||||
virtual int PCAP_findalldevs(pcap_if_t** alldevs, char* errbuf) {
|
|
||||||
return _pcap_findalldevs(alldevs, errbuf);
|
|
||||||
}
|
|
||||||
|
|
||||||
virtual void PCAP_freealldevs(pcap_if_t* alldevs) {
|
|
||||||
_pcap_freealldevs(alldevs);
|
|
||||||
}
|
|
||||||
|
|
||||||
virtual pcap_t* PCAP_open(const char* source, int snaplen, int flags, int readtimeout, char* errbuf) {
|
|
||||||
return _pcap_open_live(source, snaplen, flags, readtimeout, errbuf);
|
|
||||||
}
|
|
||||||
|
|
||||||
virtual void PCAP_close(pcap_t* dev) {
|
|
||||||
_pcap_close(dev);
|
|
||||||
}
|
|
||||||
|
|
||||||
virtual int PCAP_setnonblock(pcap_t* dev, int nonblock, char* errbuf) {
|
|
||||||
return _pcap_setnonblock(dev, nonblock, errbuf);
|
|
||||||
}
|
|
||||||
|
|
||||||
virtual int PCAP_sendpacket(pcap_t* dev, const u_char* data, int len) {
|
|
||||||
return _pcap_sendpacket(dev, data, len);
|
|
||||||
}
|
|
||||||
|
|
||||||
virtual int PCAP_dispatch(pcap_t* dev, int num, pcap_handler callback, u_char* userdata) {
|
|
||||||
return _pcap_dispatch(dev, num, callback, userdata);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
virtual bool AVI_IsRecording()
|
virtual bool AVI_IsRecording()
|
||||||
{
|
{
|
||||||
return ::AVI_IsRecording();
|
return ::AVI_IsRecording();
|
||||||
|
@ -2984,16 +2931,27 @@ int _main()
|
||||||
OGLLoadEntryPoints_3_2_Func = OGLLoadEntryPoints_3_2;
|
OGLLoadEntryPoints_3_2_Func = OGLLoadEntryPoints_3_2;
|
||||||
OGLCreateRenderer_3_2_Func = OGLCreateRenderer_3_2;
|
OGLCreateRenderer_3_2_Func = OGLCreateRenderer_3_2;
|
||||||
|
|
||||||
|
bool isSocketsSupported = false;
|
||||||
|
bool isPCapSupported = false;
|
||||||
|
|
||||||
#ifdef EXPERIMENTAL_WIFI_COMM
|
|
||||||
WSADATA wsaData;
|
WSADATA wsaData;
|
||||||
WORD version = MAKEWORD(1,1);
|
WORD version = MAKEWORD(2,2);
|
||||||
|
|
||||||
if (WSAStartup(version, &wsaData) == 0)
|
// Start up Windows Sockets.
|
||||||
bSocketsAvailable = true;
|
if (WSAStartup(version, &wsaData) == 0)
|
||||||
|
{
|
||||||
|
// Check for a matching DLL version. If the version doesn't match, then bail.
|
||||||
|
if ( (LOBYTE(wsaData.wVersion) == 2) && (HIBYTE(wsaData.wVersion) == 2) )
|
||||||
|
{
|
||||||
|
isSocketsSupported = true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
WSACleanup();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
LoadWinPCap();
|
LoadWinPCap(isPCapSupported);
|
||||||
#endif
|
|
||||||
|
|
||||||
driver = new WinDriver();
|
driver = new WinDriver();
|
||||||
WinGPUEvent = new GPUEventHandlerWindows;
|
WinGPUEvent = new GPUEventHandlerWindows;
|
||||||
|
@ -3211,11 +3169,7 @@ int _main()
|
||||||
SetStyle(style);
|
SetStyle(style);
|
||||||
|
|
||||||
DragAcceptFiles(MainWindow->getHWnd(), TRUE);
|
DragAcceptFiles(MainWindow->getHWnd(), TRUE);
|
||||||
|
|
||||||
#ifdef EXPERIMENTAL_WIFI_COMM
|
|
||||||
EnableMenuItem(mainMenu, IDM_WIFISETTINGS, MF_ENABLED);
|
EnableMenuItem(mainMenu, IDM_WIFISETTINGS, MF_ENABLED);
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
InitCustomKeys(&CustomKeys);
|
InitCustomKeys(&CustomKeys);
|
||||||
Hud.reset();
|
Hud.reset();
|
||||||
|
@ -3328,17 +3282,7 @@ int _main()
|
||||||
Piano.Enabled = (slot2_device_type == NDS_SLOT2_EASYPIANO)?true:false;
|
Piano.Enabled = (slot2_device_type == NDS_SLOT2_EASYPIANO)?true:false;
|
||||||
Paddle.Enabled = (slot2_device_type == NDS_SLOT2_PADDLE)?true:false;
|
Paddle.Enabled = (slot2_device_type == NDS_SLOT2_PADDLE)?true:false;
|
||||||
|
|
||||||
if (GetPrivateProfileBool("Wifi", "Enabled", false, IniName))
|
CommonSettings.wifi.mode = (WifiCommInterfaceID)GetPrivateProfileInt("Wifi", "Mode", WifiCommInterfaceID_AdHoc, IniName);
|
||||||
{
|
|
||||||
if (GetPrivateProfileBool("Wifi", "Compatibility Mode", false, IniName))
|
|
||||||
wifiEmulationLevel = WifiEmulationLevel_Compatibility;
|
|
||||||
else
|
|
||||||
wifiEmulationLevel = WifiEmulationLevel_Normal;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
wifiEmulationLevel = WifiEmulationLevel_Off;
|
|
||||||
|
|
||||||
CommonSettings.wifi.mode = GetPrivateProfileInt("Wifi", "Mode", 0, IniName);
|
|
||||||
CommonSettings.wifi.infraBridgeAdapter = GetPrivateProfileInt("Wifi", "BridgeAdapter", 0, IniName);
|
CommonSettings.wifi.infraBridgeAdapter = GetPrivateProfileInt("Wifi", "BridgeAdapter", 0, IniName);
|
||||||
|
|
||||||
osd = new OSDCLASS(-1);
|
osd = new OSDCLASS(-1);
|
||||||
|
@ -3347,6 +3291,37 @@ int _main()
|
||||||
|
|
||||||
GPU->SetEventHandler(WinGPUEvent);
|
GPU->SetEventHandler(WinGPUEvent);
|
||||||
|
|
||||||
|
WinPCapInterface *winpcapInterface = (isPCapSupported) ? new WinPCapInterface : NULL;
|
||||||
|
wifiHandler->SetPCapInterface(winpcapInterface);
|
||||||
|
wifiHandler->SetSocketsSupported(isSocketsSupported);
|
||||||
|
|
||||||
|
// Get the host's IP4 address.
|
||||||
|
char hostname[256];
|
||||||
|
if (gethostname(hostname, 256) != 0)
|
||||||
|
strncpy(hostname, "127.0.0.1", 256);
|
||||||
|
|
||||||
|
hostent *he = gethostbyname(hostname);
|
||||||
|
unsigned long ipaddr;
|
||||||
|
if (he == NULL || he->h_addr_list[0] == NULL)
|
||||||
|
ipaddr = 0x0100007F; // 127.0.0.1
|
||||||
|
else
|
||||||
|
ipaddr = *(unsigned long*)he->h_addr_list[0];
|
||||||
|
|
||||||
|
wifiHandler->SetIP4Address(ipaddr);
|
||||||
|
wifiHandler->SetUniqueMACValue((u32)GetCurrentProcessId());
|
||||||
|
wifiHandler->SetCommInterfaceID(CommonSettings.wifi.mode);
|
||||||
|
wifiHandler->SetBridgeDeviceIndex(CommonSettings.wifi.infraBridgeAdapter);
|
||||||
|
|
||||||
|
if (GetPrivateProfileBool("Wifi", "Enabled", false, IniName))
|
||||||
|
{
|
||||||
|
if (GetPrivateProfileBool("Wifi", "Compatibility Mode", false, IniName))
|
||||||
|
wifiHandler->SetEmulationLevel(WifiEmulationLevel_Compatibility);
|
||||||
|
else
|
||||||
|
wifiHandler->SetEmulationLevel(WifiEmulationLevel_Normal);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
wifiHandler->SetEmulationLevel(WifiEmulationLevel_Off);
|
||||||
|
|
||||||
CommonSettings.GFX3D_Renderer_TextureScalingFactor = (cmdline.texture_upscale != -1) ? cmdline.texture_upscale : GetPrivateProfileInt("3D", "TextureScalingFactor ", 1, IniName);
|
CommonSettings.GFX3D_Renderer_TextureScalingFactor = (cmdline.texture_upscale != -1) ? cmdline.texture_upscale : GetPrivateProfileInt("3D", "TextureScalingFactor ", 1, IniName);
|
||||||
int newPrescaleHD = (cmdline.gpu_resolution_multiplier != -1) ? cmdline.gpu_resolution_multiplier : GetPrivateProfileInt("3D", "PrescaleHD", 1, IniName);
|
int newPrescaleHD = (cmdline.gpu_resolution_multiplier != -1) ? cmdline.gpu_resolution_multiplier : GetPrivateProfileInt("3D", "PrescaleHD", 1, IniName);
|
||||||
|
|
||||||
|
@ -3616,9 +3591,10 @@ int _main()
|
||||||
|
|
||||||
UnregWndClass("DeSmuME");
|
UnregWndClass("DeSmuME");
|
||||||
|
|
||||||
#ifdef EXPERIMENTAL_WIFI_COMM
|
if (wifiHandler->IsSocketsSupported())
|
||||||
WSACleanup();
|
{
|
||||||
#endif
|
WSACleanup();
|
||||||
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -4496,11 +4472,9 @@ void RunConfig(CONFIGSCREEN which)
|
||||||
case CONFIGSCREEN_PATHSETTINGS:
|
case CONFIGSCREEN_PATHSETTINGS:
|
||||||
DialogBoxW(hAppInst, MAKEINTRESOURCEW(IDD_PATHSETTINGS), hwnd, (DLGPROC)PathSettingsDlgProc);
|
DialogBoxW(hAppInst, MAKEINTRESOURCEW(IDD_PATHSETTINGS), hwnd, (DLGPROC)PathSettingsDlgProc);
|
||||||
break;
|
break;
|
||||||
#ifdef EXPERIMENTAL_WIFI_COMM
|
|
||||||
case CONFIGSCREEN_WIFI:
|
case CONFIGSCREEN_WIFI:
|
||||||
DialogBoxW(hAppInst,MAKEINTRESOURCEW(IDD_WIFISETTINGS), hwnd, (DLGPROC) WifiSettingsDlgProc);
|
DialogBoxW(hAppInst,MAKEINTRESOURCEW(IDD_WIFISETTINGS), hwnd, (DLGPROC) WifiSettingsDlgProc);
|
||||||
break;
|
break;
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (tpaused)
|
if (tpaused)
|
||||||
|
@ -4556,15 +4530,10 @@ static void TwiddleLayer(UINT ctlid, int core, int layer)
|
||||||
LRESULT CALLBACK WindowProcedure (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
|
LRESULT CALLBACK WindowProcedure (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
|
||||||
{
|
{
|
||||||
static int tmp_execute;
|
static int tmp_execute;
|
||||||
|
|
||||||
switch (message) // handle the messages
|
switch (message) // handle the messages
|
||||||
{
|
{
|
||||||
case WM_INITMENU:
|
case WM_INITMENU:
|
||||||
{
|
|
||||||
#ifdef EXPERIMENTAL_WIFI_COMM
|
|
||||||
if (!(bSocketsAvailable || bWinPCapAvailable))
|
|
||||||
#endif
|
|
||||||
DeleteMenu(GetMenu(hwnd), IDM_WIFISETTINGS, MF_BYCOMMAND);
|
|
||||||
}
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
case WM_EXITMENULOOP:
|
case WM_EXITMENULOOP:
|
||||||
|
@ -7063,67 +7032,83 @@ LRESULT CALLBACK MicrophoneSettingsDlgProc(HWND hDlg, UINT uMsg, WPARAM wParam,
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef EXPERIMENTAL_WIFI_COMM
|
|
||||||
LRESULT CALLBACK WifiSettingsDlgProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
LRESULT CALLBACK WifiSettingsDlgProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||||
{
|
{
|
||||||
|
const bool isSocketsSupported = wifiHandler->IsSocketsSupported();
|
||||||
|
const bool isPCapSupported = wifiHandler->IsPCapSupported();
|
||||||
|
const WifiEmulationLevel emulationLevel = wifiHandler->GetSelectedEmulationLevel();
|
||||||
|
|
||||||
switch(uMsg)
|
switch(uMsg)
|
||||||
{
|
{
|
||||||
case WM_INITDIALOG:
|
case WM_INITDIALOG:
|
||||||
{
|
{
|
||||||
char errbuf[PCAP_ERRBUF_SIZE];
|
#ifdef EXPERIMENTAL_WIFI_COMM
|
||||||
pcap_if_t *alldevs;
|
if (emulationLevel != WifiEmulationLevel_Off)
|
||||||
pcap_if_t *d;
|
|
||||||
int i;
|
|
||||||
HWND cur;
|
|
||||||
|
|
||||||
if (wifiEmulationLevel > WifiEmulationLevel_Off)
|
|
||||||
{
|
{
|
||||||
CheckDlgItem(hDlg, IDC_WIFI_ENABLED, true);
|
CheckDlgItem(hDlg, IDC_WIFI_ENABLED, TRUE);
|
||||||
CheckDlgItem(hDlg, IDC_WIFI_COMPAT, wifiEmulationLevel == WifiEmulationLevel_Compatibility);
|
CheckDlgItem(hDlg, IDC_WIFI_COMPAT, (emulationLevel == WifiEmulationLevel_Compatibility));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
CheckDlgItem(hDlg, IDC_WIFI_ENABLED, false);
|
CheckDlgItem(hDlg, IDC_WIFI_ENABLED, FALSE);
|
||||||
CheckDlgItem(hDlg, IDC_WIFI_COMPAT, GetPrivateProfileBool("Wifi", "Compatibility Mode", false, IniName));
|
CheckDlgItem(hDlg, IDC_WIFI_COMPAT, GetPrivateProfileBool("Wifi", "Compatibility Mode", FALSE, IniName));
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
if (bSocketsAvailable && bWinPCapAvailable)
|
CheckDlgItem(hDlg, IDC_WIFI_ENABLED, FALSE);
|
||||||
|
CheckDlgItem(hDlg, IDC_WIFI_COMPAT, FALSE);
|
||||||
|
EnableWindow(GetDlgItem(hDlg, IDC_WIFI_ENABLED), FALSE);
|
||||||
|
EnableWindow(GetDlgItem(hDlg, IDC_WIFI_COMPAT), FALSE);
|
||||||
|
#endif
|
||||||
|
if (isSocketsSupported && isPCapSupported)
|
||||||
CheckRadioButton(hDlg, IDC_WIFIMODE0, IDC_WIFIMODE1, IDC_WIFIMODE0 + CommonSettings.wifi.mode);
|
CheckRadioButton(hDlg, IDC_WIFIMODE0, IDC_WIFIMODE1, IDC_WIFIMODE0 + CommonSettings.wifi.mode);
|
||||||
else if(bSocketsAvailable)
|
else if(isSocketsSupported)
|
||||||
CheckRadioButton(hDlg, IDC_WIFIMODE0, IDC_WIFIMODE1, IDC_WIFIMODE0);
|
CheckRadioButton(hDlg, IDC_WIFIMODE0, IDC_WIFIMODE1, IDC_WIFIMODE0);
|
||||||
else if(bWinPCapAvailable)
|
else
|
||||||
CheckRadioButton(hDlg, IDC_WIFIMODE0, IDC_WIFIMODE1, IDC_WIFIMODE1);
|
CheckRadioButton(hDlg, IDC_WIFIMODE0, IDC_WIFIMODE1, IDC_WIFIMODE1);
|
||||||
|
|
||||||
if (bWinPCapAvailable)
|
HWND deviceMenu = GetDlgItem(hDlg, IDC_BRIDGEADAPTER);
|
||||||
|
int menuItemCount = ComboBox_GetCount(deviceMenu);
|
||||||
|
int deviceCount = -1;
|
||||||
|
std::vector<std::string> deviceStringList;
|
||||||
|
|
||||||
|
for (int i = 0; i < menuItemCount; i++)
|
||||||
{
|
{
|
||||||
if(driver->PCAP_findalldevs(&alldevs, errbuf) == -1)
|
ComboBox_DeleteString(deviceMenu, 0);
|
||||||
{
|
}
|
||||||
// TODO: fail more gracefully!
|
|
||||||
EndDialog(hDlg, TRUE);
|
|
||||||
return TRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
cur = GetDlgItem(hDlg, IDC_BRIDGEADAPTER);
|
if (isPCapSupported)
|
||||||
for(i = 0, d = alldevs; d != NULL; i++, d = d->next)
|
{
|
||||||
{
|
deviceCount = wifiHandler->GetBridgeDeviceList(&deviceStringList);
|
||||||
char buf[256] = {0};
|
|
||||||
// on x64 description is empty
|
|
||||||
if (d->description[0] == 0)
|
|
||||||
strcpy(buf, d->name);
|
|
||||||
else
|
|
||||||
strcpy(buf, d->description);
|
|
||||||
|
|
||||||
ComboBox_AddString(cur, buf);
|
|
||||||
}
|
|
||||||
ComboBox_SetCurSel(cur, CommonSettings.wifi.infraBridgeAdapter);
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
EnableWindow(GetDlgItem(hDlg, IDC_WIFIMODE1), FALSE);
|
SetDlgItemText(hDlg, IDC_WIFIMODE1, "Infrastructure (winpcap not loaded)");
|
||||||
EnableWindow(GetDlgItem(hDlg, IDC_BRIDGEADAPTER), FALSE);
|
}
|
||||||
|
|
||||||
|
if (deviceCount < 0)
|
||||||
|
{
|
||||||
|
ComboBox_AddString(deviceMenu, "Error: Cannot find any devices.");
|
||||||
|
ComboBox_SetCurSel(deviceMenu, 0);
|
||||||
|
EnableWindow(deviceMenu, FALSE);
|
||||||
|
}
|
||||||
|
else if (deviceCount == 0)
|
||||||
|
{
|
||||||
|
ComboBox_AddString(deviceMenu, "No devices found.");
|
||||||
|
ComboBox_SetCurSel(deviceMenu, 0);
|
||||||
|
EnableWindow(deviceMenu, FALSE);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
for (size_t i = 0; i < deviceCount; i++)
|
||||||
|
{
|
||||||
|
ComboBox_AddString(deviceMenu, deviceStringList[i].c_str());
|
||||||
|
}
|
||||||
|
|
||||||
|
ComboBox_SetCurSel(deviceMenu, CommonSettings.wifi.infraBridgeAdapter);
|
||||||
|
EnableWindow(deviceMenu, TRUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!bSocketsAvailable)
|
if (!isSocketsSupported)
|
||||||
EnableWindow(GetDlgItem(hDlg, IDC_WIFIMODE0), FALSE);
|
EnableWindow(GetDlgItem(hDlg, IDC_WIFIMODE0), FALSE);
|
||||||
}
|
}
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
@ -7140,27 +7125,33 @@ LRESULT CALLBACK WifiSettingsDlgProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM
|
||||||
if(romloaded)
|
if(romloaded)
|
||||||
val = MessageBox(hDlg, "The current ROM needs to be reset to apply changes.\nReset now ?", "DeSmuME", (MB_YESNO | MB_ICONQUESTION));
|
val = MessageBox(hDlg, "The current ROM needs to be reset to apply changes.\nReset now ?", "DeSmuME", (MB_YESNO | MB_ICONQUESTION));
|
||||||
|
|
||||||
if (IsDlgCheckboxChecked(hDlg, IDC_WIFI_ENABLED))
|
#ifdef EXPERIMENTAL_WIFI_COMM
|
||||||
|
if (IsDlgCheckboxChecked(hDlg, IDC_WIFI_ENABLED))
|
||||||
{
|
{
|
||||||
if (IsDlgCheckboxChecked(hDlg, IDC_WIFI_COMPAT))
|
if (IsDlgCheckboxChecked(hDlg, IDC_WIFI_COMPAT))
|
||||||
wifiEmulationLevel = WifiEmulationLevel_Compatibility;
|
wifiHandler->SetEmulationLevel(WifiEmulationLevel_Compatibility);
|
||||||
else
|
else
|
||||||
wifiEmulationLevel = WifiEmulationLevel_Normal;
|
wifiHandler->SetEmulationLevel(WifiEmulationLevel_Normal);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
wifiEmulationLevel = WifiEmulationLevel_Off;
|
wifiHandler->SetEmulationLevel(WifiEmulationLevel_Off);
|
||||||
|
|
||||||
WritePrivateProfileBool("Wifi", "Enabled", IsDlgCheckboxChecked(hDlg, IDC_WIFI_ENABLED), IniName);
|
WritePrivateProfileBool("Wifi", "Enabled", IsDlgCheckboxChecked(hDlg, IDC_WIFI_ENABLED), IniName);
|
||||||
WritePrivateProfileBool("Wifi", "Compatibility Mode", IsDlgCheckboxChecked(hDlg, IDC_WIFI_COMPAT), IniName);
|
WritePrivateProfileBool("Wifi", "Compatibility Mode", IsDlgCheckboxChecked(hDlg, IDC_WIFI_COMPAT), IniName);
|
||||||
|
#else
|
||||||
|
wifiHandler->SetEmulationLevel(WifiEmulationLevel_Off);
|
||||||
|
#endif
|
||||||
|
|
||||||
if (IsDlgButtonChecked(hDlg, IDC_WIFIMODE0))
|
if (IsDlgButtonChecked(hDlg, IDC_WIFIMODE0))
|
||||||
CommonSettings.wifi.mode = 0;
|
CommonSettings.wifi.mode = WifiCommInterfaceID_AdHoc;
|
||||||
else
|
else
|
||||||
CommonSettings.wifi.mode = 1;
|
CommonSettings.wifi.mode = WifiCommInterfaceID_Infrastructure;
|
||||||
WritePrivateProfileInt("Wifi", "Mode", CommonSettings.wifi.mode, IniName);
|
WritePrivateProfileInt("Wifi", "Mode", CommonSettings.wifi.mode, IniName);
|
||||||
|
wifiHandler->SetCommInterfaceID(CommonSettings.wifi.mode);
|
||||||
|
|
||||||
cur = GetDlgItem(hDlg, IDC_BRIDGEADAPTER);
|
cur = GetDlgItem(hDlg, IDC_BRIDGEADAPTER);
|
||||||
CommonSettings.wifi.infraBridgeAdapter = ComboBox_GetCurSel(cur);
|
CommonSettings.wifi.infraBridgeAdapter = ComboBox_GetCurSel(cur);
|
||||||
|
wifiHandler->SetBridgeDeviceIndex(CommonSettings.wifi.infraBridgeAdapter);
|
||||||
WritePrivateProfileInt("Wifi", "BridgeAdapter", CommonSettings.wifi.infraBridgeAdapter, IniName);
|
WritePrivateProfileInt("Wifi", "BridgeAdapter", CommonSettings.wifi.infraBridgeAdapter, IniName);
|
||||||
|
|
||||||
if(val == IDYES)
|
if(val == IDYES)
|
||||||
|
@ -7180,7 +7171,6 @@ LRESULT CALLBACK WifiSettingsDlgProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM
|
||||||
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
static void SoundSettings_updateVolumeReadout(HWND hDlg)
|
static void SoundSettings_updateVolumeReadout(HWND hDlg)
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
Copyright (C) 2010 DeSmuME team
|
Copyright (C) 2010-2018 DeSmuME team
|
||||||
|
|
||||||
This file is part of DeSmuME
|
This file is part of DeSmuME
|
||||||
|
|
||||||
|
@ -21,14 +21,16 @@
|
||||||
#ifndef WINPCAP_H
|
#ifndef WINPCAP_H
|
||||||
#define WINPCAP_H
|
#define WINPCAP_H
|
||||||
|
|
||||||
#define HAVE_REMOTE
|
#ifndef HAVE_REMOTE
|
||||||
#define WPCAP
|
#define HAVE_REMOTE
|
||||||
#define PACKET_SIZE 65535
|
#endif
|
||||||
|
|
||||||
|
#ifndef WPCAP
|
||||||
|
#define WPCAP
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <pcap.h>
|
#include <pcap.h>
|
||||||
|
|
||||||
static bool bWinPCapAvailable = false;
|
|
||||||
|
|
||||||
typedef int (__cdecl *T_pcap_findalldevs)(pcap_if_t** alldevs, char* errbuf);
|
typedef int (__cdecl *T_pcap_findalldevs)(pcap_if_t** alldevs, char* errbuf);
|
||||||
typedef void (__cdecl *T_pcap_freealldevs)(pcap_if_t* alldevs);
|
typedef void (__cdecl *T_pcap_freealldevs)(pcap_if_t* alldevs);
|
||||||
typedef pcap_t* (__cdecl *T_pcap_open_live)(const char* source, int snaplen, int flags, int readtimeout, char* errbuf);
|
typedef pcap_t* (__cdecl *T_pcap_open_live)(const char* source, int snaplen, int flags, int readtimeout, char* errbuf);
|
||||||
|
@ -51,11 +53,16 @@ T_pcap_dispatch _pcap_dispatch = NULL;
|
||||||
if (_##name == NULL) return;
|
if (_##name == NULL) return;
|
||||||
|
|
||||||
|
|
||||||
static void LoadWinPCap()
|
static void LoadWinPCap(bool &outResult)
|
||||||
{
|
{
|
||||||
|
bool result = false;
|
||||||
|
|
||||||
HMODULE wpcap = LoadLibrary("wpcap.dll");
|
HMODULE wpcap = LoadLibrary("wpcap.dll");
|
||||||
if (wpcap == NULL)
|
if (wpcap == NULL)
|
||||||
|
{
|
||||||
|
outResult = result;
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
LOADSYMBOL(pcap_findalldevs);
|
LOADSYMBOL(pcap_findalldevs);
|
||||||
LOADSYMBOL(pcap_freealldevs);
|
LOADSYMBOL(pcap_freealldevs);
|
||||||
|
@ -65,7 +72,8 @@ static void LoadWinPCap()
|
||||||
LOADSYMBOL(pcap_sendpacket);
|
LOADSYMBOL(pcap_sendpacket);
|
||||||
LOADSYMBOL(pcap_dispatch);
|
LOADSYMBOL(pcap_dispatch);
|
||||||
|
|
||||||
bWinPCapAvailable = true;
|
result = true;
|
||||||
|
outResult = result;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -19,24 +19,15 @@
|
||||||
along with DeSmuME; if not, write to the Free Software
|
along with DeSmuME; if not, write to the Free Software
|
||||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef WIFI_H
|
#ifndef WIFI_H
|
||||||
#define WIFI_H
|
#define WIFI_H
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include "types.h"
|
#include "types.h"
|
||||||
|
|
||||||
#ifdef EXPERIMENTAL_WIFI_COMM
|
#include <string>
|
||||||
|
#include <vector>
|
||||||
#ifndef __APPLE__
|
|
||||||
#define HAVE_REMOTE
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define WPCAP
|
|
||||||
#define PACKET_SIZE 65535
|
|
||||||
#define _INC_STDIO
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
#define REG_WIFI_ID 0x000
|
#define REG_WIFI_ID 0x000
|
||||||
#define REG_WIFI_MODE 0x004
|
#define REG_WIFI_MODE 0x004
|
||||||
|
@ -178,11 +169,6 @@
|
||||||
/* WIFI misc constants */
|
/* WIFI misc constants */
|
||||||
#define WIFI_CHIPID 0x1440 /* emulates "old" wifi chip, new is 0xC340 */
|
#define WIFI_CHIPID 0x1440 /* emulates "old" wifi chip, new is 0xC340 */
|
||||||
|
|
||||||
// SAVE PACKETS HACK FUNCTIONS
|
|
||||||
static void create_packet();
|
|
||||||
static void save_packet(u8* packet, u32 len, u32 seconds, u32 millis, bool isReceived);
|
|
||||||
u32 timeval2millis(struct timeval tv);
|
|
||||||
|
|
||||||
/* Referenced as RF_ in dswifi: rffilter_t */
|
/* Referenced as RF_ in dswifi: rffilter_t */
|
||||||
/* based on the documentation for the RF2958 chip of RF Micro Devices */
|
/* based on the documentation for the RF2958 chip of RF Micro Devices */
|
||||||
/* using the register names as in docs ( http://www.rfmd.com/pdfs/2958.pdf )*/
|
/* using the register names as in docs ( http://www.rfmd.com/pdfs/2958.pdf )*/
|
||||||
|
@ -434,14 +420,34 @@ enum EAPStatus
|
||||||
APStatus_Associated
|
APStatus_Associated
|
||||||
};
|
};
|
||||||
|
|
||||||
|
enum WifiEmulationLevel
|
||||||
|
{
|
||||||
|
WifiEmulationLevel_Off = 0,
|
||||||
|
WifiEmulationLevel_Normal = 10000,
|
||||||
|
WifiEmulationLevel_Compatibility = 65535,
|
||||||
|
};
|
||||||
|
|
||||||
|
enum WifiCommInterfaceID
|
||||||
|
{
|
||||||
|
WifiCommInterfaceID_AdHoc = 0,
|
||||||
|
WifiCommInterfaceID_Infrastructure = 1
|
||||||
|
};
|
||||||
|
|
||||||
|
enum WifiMACMode
|
||||||
|
{
|
||||||
|
WifiMACMode_Automatic = 0,
|
||||||
|
WifiMACMode_Manual = 1,
|
||||||
|
WifiMACMode_ReadFromFirmware = 2
|
||||||
|
};
|
||||||
|
|
||||||
/* wifimac_t: the buildin mac (arm7 addressrange: 0x04800000-0x04FFFFFF )*/
|
/* wifimac_t: the buildin mac (arm7 addressrange: 0x04800000-0x04FFFFFF )*/
|
||||||
/* http://www.akkit.org/info/dswifi.htm#WifiIOMap */
|
/* http://www.akkit.org/info/dswifi.htm#WifiIOMap */
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
/* power */
|
/* power */
|
||||||
BOOL powerOn;
|
bool powerOn;
|
||||||
BOOL powerOnPending;
|
bool powerOnPending;
|
||||||
|
|
||||||
/* status */
|
/* status */
|
||||||
u16 rfStatus;
|
u16 rfStatus;
|
||||||
|
@ -454,7 +460,7 @@ typedef struct
|
||||||
/* modes */
|
/* modes */
|
||||||
u16 macMode;
|
u16 macMode;
|
||||||
u16 wepMode;
|
u16 wepMode;
|
||||||
BOOL WEP_enable;
|
bool WEP_enable;
|
||||||
|
|
||||||
/* sending */
|
/* sending */
|
||||||
u16 TXStatCnt;
|
u16 TXStatCnt;
|
||||||
|
@ -464,7 +470,7 @@ typedef struct
|
||||||
u16 TXOpt;
|
u16 TXOpt;
|
||||||
u16 TXStat;
|
u16 TXStat;
|
||||||
u16 BeaconAddr;
|
u16 BeaconAddr;
|
||||||
BOOL BeaconEnable;
|
bool BeaconEnable;
|
||||||
u16 TXSlotExtra;
|
u16 TXSlotExtra;
|
||||||
u16 TXSeqNo;
|
u16 TXSeqNo;
|
||||||
u8 txCurSlot;
|
u8 txCurSlot;
|
||||||
|
@ -501,13 +507,13 @@ typedef struct
|
||||||
u16 retryLimit;
|
u16 retryLimit;
|
||||||
|
|
||||||
/* timing */
|
/* timing */
|
||||||
BOOL crystalEnabled;
|
bool crystalEnabled;
|
||||||
u64 usec;
|
u64 usec;
|
||||||
BOOL usecEnable;
|
bool usecEnable;
|
||||||
u64 ucmp;
|
u64 ucmp;
|
||||||
BOOL ucmpEnable;
|
bool ucmpEnable;
|
||||||
u32 eCount;
|
u32 eCount;
|
||||||
BOOL eCountEnable;
|
bool eCountEnable;
|
||||||
u16 BeaconInterval;
|
u16 BeaconInterval;
|
||||||
u16 BeaconCount1;
|
u16 BeaconCount1;
|
||||||
u16 BeaconCount2;
|
u16 BeaconCount2;
|
||||||
|
@ -542,7 +548,7 @@ typedef struct
|
||||||
/* tx packets */
|
/* tx packets */
|
||||||
s32 curPacketSize[3];
|
s32 curPacketSize[3];
|
||||||
s32 curPacketPos[3];
|
s32 curPacketPos[3];
|
||||||
BOOL curPacketSending[3];
|
bool curPacketSending[3];
|
||||||
|
|
||||||
/* I/O ports */
|
/* I/O ports */
|
||||||
u16 IOPorts[0x800];
|
u16 IOPorts[0x800];
|
||||||
|
@ -552,40 +558,7 @@ typedef struct
|
||||||
|
|
||||||
} wifimac_t;
|
} wifimac_t;
|
||||||
|
|
||||||
|
|
||||||
typedef struct
|
|
||||||
{
|
|
||||||
u64 usecCounter;
|
|
||||||
|
|
||||||
} Adhoc_t;
|
|
||||||
|
|
||||||
typedef struct
|
|
||||||
{
|
|
||||||
u64 usecCounter;
|
|
||||||
|
|
||||||
u8 curPacket[4096];
|
|
||||||
s32 curPacketSize;
|
|
||||||
s32 curPacketPos;
|
|
||||||
BOOL curPacketSending;
|
|
||||||
|
|
||||||
EAPStatus status;
|
|
||||||
u16 seqNum;
|
|
||||||
|
|
||||||
} SoftAP_t;
|
|
||||||
|
|
||||||
// desmume host communication
|
|
||||||
#ifdef EXPERIMENTAL_WIFI_COMM
|
|
||||||
typedef struct pcap pcap_t;
|
|
||||||
extern pcap_t *wifi_bridge;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
extern wifimac_t wifiMac;
|
extern wifimac_t wifiMac;
|
||||||
extern Adhoc_t Adhoc;
|
|
||||||
extern SoftAP_t SoftAP;
|
|
||||||
|
|
||||||
bool WIFI_Init();
|
|
||||||
void WIFI_DeInit();
|
|
||||||
void WIFI_Reset();
|
|
||||||
|
|
||||||
/* subchip communication IO functions */
|
/* subchip communication IO functions */
|
||||||
void WIFI_setRF_CNT(u16 val);
|
void WIFI_setRF_CNT(u16 val);
|
||||||
|
@ -632,6 +605,199 @@ typedef struct _FW_WFCProfile
|
||||||
|
|
||||||
} FW_WFCProfile;
|
} FW_WFCProfile;
|
||||||
|
|
||||||
|
class ClientPCapInterface
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
virtual int findalldevs(void **alldevs, char *errbuf) = 0;
|
||||||
|
virtual void freealldevs(void *alldevs) = 0;
|
||||||
|
virtual void* open(const char *source, int snaplen, int flags, int readtimeout, char *errbuf) = 0;
|
||||||
|
virtual void close(void *dev) = 0;
|
||||||
|
virtual int setnonblock(void *dev, int nonblock, char *errbuf) = 0;
|
||||||
|
virtual int sendpacket(void *dev, const void *data, int len) = 0;
|
||||||
|
virtual int dispatch(void *dev, int num, void *callback, void *userdata) = 0;
|
||||||
|
};
|
||||||
|
|
||||||
|
class DummyPCapInterface : public ClientPCapInterface
|
||||||
|
{
|
||||||
|
private:
|
||||||
|
void __CopyErrorString(char *errbuf);
|
||||||
|
|
||||||
|
public:
|
||||||
|
virtual int findalldevs(void **alldevs, char *errbuf);
|
||||||
|
virtual void freealldevs(void *alldevs);
|
||||||
|
virtual void* open(const char *source, int snaplen, int flags, int readtimeout, char *errbuf);
|
||||||
|
virtual void close(void *dev);
|
||||||
|
virtual int setnonblock(void *dev, int nonblock, char *errbuf);
|
||||||
|
virtual int sendpacket(void *dev, const void *data, int len);
|
||||||
|
virtual int dispatch(void *dev, int num, void *callback, void *userdata);
|
||||||
|
};
|
||||||
|
|
||||||
|
#ifndef HOST_WINDOWS
|
||||||
|
|
||||||
|
class POSIXPCapInterface : public ClientPCapInterface
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
virtual int findalldevs(void **alldevs, char *errbuf);
|
||||||
|
virtual void freealldevs(void *alldevs);
|
||||||
|
virtual void* open(const char *source, int snaplen, int flags, int readtimeout, char *errbuf);
|
||||||
|
virtual void close(void *dev);
|
||||||
|
virtual int setnonblock(void *dev, int nonblock, char *errbuf);
|
||||||
|
virtual int sendpacket(void *dev, const void *data, int len);
|
||||||
|
virtual int dispatch(void *dev, int num, void *callback, void *userdata);
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
class WifiCommInterface
|
||||||
|
{
|
||||||
|
protected:
|
||||||
|
WifiCommInterfaceID _commInterfaceID;
|
||||||
|
WifiEmulationLevel _emulationLevel;
|
||||||
|
u64 _usecCounter;
|
||||||
|
|
||||||
|
public:
|
||||||
|
WifiCommInterface();
|
||||||
|
virtual ~WifiCommInterface();
|
||||||
|
|
||||||
|
virtual bool Start(WifiEmulationLevel emulationLevel) = 0;
|
||||||
|
virtual void Stop() = 0;
|
||||||
|
virtual void SendPacket(void *data, size_t len) = 0;
|
||||||
|
virtual void Trigger() = 0;
|
||||||
|
};
|
||||||
|
|
||||||
|
class AdhocCommInterface : public WifiCommInterface
|
||||||
|
{
|
||||||
|
protected:
|
||||||
|
void *_wifiSocket;
|
||||||
|
void *_sendAddr;
|
||||||
|
u8 *_packetBuffer;
|
||||||
|
|
||||||
|
public:
|
||||||
|
AdhocCommInterface();
|
||||||
|
~AdhocCommInterface();
|
||||||
|
|
||||||
|
virtual bool Start(WifiEmulationLevel emulationLevel);
|
||||||
|
virtual void Stop();
|
||||||
|
virtual void SendPacket(void *data, size_t len);
|
||||||
|
virtual void Trigger();
|
||||||
|
};
|
||||||
|
|
||||||
|
class SoftAPCommInterface : public WifiCommInterface
|
||||||
|
{
|
||||||
|
protected:
|
||||||
|
ClientPCapInterface *_pcap;
|
||||||
|
int _bridgeDeviceIndex;
|
||||||
|
void *_bridgeDevice;
|
||||||
|
FILE *_packetCaptureFile; // PCAP file to store the Ethernet packets.
|
||||||
|
|
||||||
|
u8 _curPacket[4096];
|
||||||
|
s32 _curPacketSize;
|
||||||
|
s32 _curPacketPos;
|
||||||
|
bool _curPacketSending;
|
||||||
|
|
||||||
|
EAPStatus _status;
|
||||||
|
u16 _seqNum;
|
||||||
|
|
||||||
|
void* _GetBridgeDeviceAtIndex(int deviceIndex, char *outErrorBuf);
|
||||||
|
bool _IsDNSRequestToWFC(u16 ethertype, u8 *body);
|
||||||
|
void _Deauthenticate();
|
||||||
|
void _SendBeacon();
|
||||||
|
|
||||||
|
public:
|
||||||
|
SoftAPCommInterface();
|
||||||
|
virtual ~SoftAPCommInterface();
|
||||||
|
|
||||||
|
void SetPCapInterface(ClientPCapInterface *pcapInterface);
|
||||||
|
ClientPCapInterface* GetPCapInterface();
|
||||||
|
|
||||||
|
int GetBridgeDeviceIndex();
|
||||||
|
void SetBridgeDeviceIndex(int deviceIndex);
|
||||||
|
|
||||||
|
void PacketRX(const void *pktHeader, const u8 *pktData);
|
||||||
|
|
||||||
|
void PacketCaptureFileOpen();
|
||||||
|
void PacketCaptureFileClose();
|
||||||
|
void PacketCaptureFileWrite(const u8 *packet, u32 len, bool isReceived);
|
||||||
|
|
||||||
|
virtual bool Start(WifiEmulationLevel emulationLevel);
|
||||||
|
virtual void Stop();
|
||||||
|
virtual void SendPacket(void *data, size_t len);
|
||||||
|
virtual void Trigger();
|
||||||
|
};
|
||||||
|
|
||||||
|
class WifiHandler
|
||||||
|
{
|
||||||
|
protected:
|
||||||
|
AdhocCommInterface *_adhocCommInterface;
|
||||||
|
SoftAPCommInterface *_softAPCommInterface;
|
||||||
|
|
||||||
|
WifiEmulationLevel _selectedEmulationLevel;
|
||||||
|
WifiEmulationLevel _currentEmulationLevel;
|
||||||
|
|
||||||
|
WifiCommInterfaceID _selectedCommID;
|
||||||
|
WifiCommInterfaceID _currentCommID;
|
||||||
|
WifiCommInterface *_currentCommInterface;
|
||||||
|
|
||||||
|
int _selectedBridgeDeviceIndex;
|
||||||
|
|
||||||
|
ClientPCapInterface *_pcap;
|
||||||
|
bool _isSocketsSupported;
|
||||||
|
bool _didWarnWFCUser;
|
||||||
|
|
||||||
|
WifiMACMode _adhocMACMode;
|
||||||
|
WifiMACMode _infrastructureMACMode;
|
||||||
|
u32 _ip4Address;
|
||||||
|
u32 _uniqueMACValue;
|
||||||
|
u8 _userMAC[3];
|
||||||
|
|
||||||
|
public:
|
||||||
|
WifiHandler();
|
||||||
|
~WifiHandler();
|
||||||
|
|
||||||
|
void Reset();
|
||||||
|
|
||||||
|
WifiEmulationLevel GetSelectedEmulationLevel();
|
||||||
|
WifiEmulationLevel GetCurrentEmulationLevel();
|
||||||
|
void SetEmulationLevel(WifiEmulationLevel emulationLevel);
|
||||||
|
|
||||||
|
WifiCommInterfaceID GetSelectedCommInterfaceID();
|
||||||
|
WifiCommInterfaceID GetCurrentCommInterfaceID();
|
||||||
|
void SetCommInterfaceID(WifiCommInterfaceID commID);
|
||||||
|
|
||||||
|
int GetBridgeDeviceList(std::vector<std::string> *deviceStringList);
|
||||||
|
|
||||||
|
int GetSelectedBridgeDeviceIndex();
|
||||||
|
int GetCurrentBridgeDeviceIndex();
|
||||||
|
void SetBridgeDeviceIndex(int deviceIndex);
|
||||||
|
|
||||||
|
bool CommStart();
|
||||||
|
void CommStop();
|
||||||
|
void CommSendPacket(void *data, size_t len);
|
||||||
|
void CommTrigger();
|
||||||
|
|
||||||
|
bool IsSocketsSupported();
|
||||||
|
void SetSocketsSupported(bool isSupported);
|
||||||
|
|
||||||
|
bool IsPCapSupported();
|
||||||
|
ClientPCapInterface* GetPCapInterface();
|
||||||
|
void SetPCapInterface(ClientPCapInterface *pcapInterface);
|
||||||
|
|
||||||
|
WifiMACMode GetMACModeForComm(WifiCommInterfaceID commID);
|
||||||
|
void SetMACModeForComm(WifiCommInterfaceID commID, WifiMACMode macMode);
|
||||||
|
|
||||||
|
uint32_t GetIP4Address();
|
||||||
|
void SetIP4Address(u32 ip4Address);
|
||||||
|
|
||||||
|
uint32_t GetUniqueMACValue();
|
||||||
|
void SetUniqueMACValue(u32 uniqueValue);
|
||||||
|
|
||||||
|
void GetUserMACValues(u8 *outValue3, u8 *outValue4, u8 *outValue5);
|
||||||
|
void SetUserMACValues(u8 inValue3, u8 inValue4, u8 inValue5);
|
||||||
|
|
||||||
|
void GenerateMACFromValues(u8 outMAC[6]);
|
||||||
|
void CopyMACFromUserValues(u8 outMAC[6]);
|
||||||
|
};
|
||||||
|
|
||||||
/* wifi data to be stored in firmware, when no firmware image was loaded */
|
/* wifi data to be stored in firmware, when no firmware image was loaded */
|
||||||
extern u8 FW_Mac[6];
|
extern u8 FW_Mac[6];
|
||||||
extern const u8 FW_WIFIInit[32];
|
extern const u8 FW_WIFIInit[32];
|
||||||
|
@ -642,5 +808,7 @@ extern const u8 FW_BBChannel[14];
|
||||||
extern FW_WFCProfile FW_WFCProfile1;
|
extern FW_WFCProfile FW_WFCProfile1;
|
||||||
extern FW_WFCProfile FW_WFCProfile2;
|
extern FW_WFCProfile FW_WFCProfile2;
|
||||||
extern FW_WFCProfile FW_WFCProfile3;
|
extern FW_WFCProfile FW_WFCProfile3;
|
||||||
|
extern DummyPCapInterface dummyPCapInterface;
|
||||||
|
extern WifiHandler *wifiHandler;
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue