mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-26 15:49:50 -06:00
fix annoying debug break in win32. some cleanup
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@2639 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -92,8 +92,8 @@ void CPUInfo::Detect()
|
|||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
#ifdef _M_IX86
|
#ifdef _M_IX86
|
||||||
bool f64 = false;
|
BOOL f64 = false;
|
||||||
OS64bit = IsWow64Process(GetCurrentProcess(), (PBOOL)(&f64)) && f64;
|
OS64bit = IsWow64Process(GetCurrentProcess(), &f64);
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
// Copyright (C) 2003-2008 Dolphin Project.
|
// Copyright (C) 2003-2009 Dolphin Project.
|
||||||
|
|
||||||
// This program is free software: you can redistribute it and/or modify
|
// This program is free software: you can redistribute it and/or modify
|
||||||
// it under the terms of the GNU General Public License as published by
|
// it under the terms of the GNU General Public License as published by
|
||||||
@ -14,40 +14,28 @@
|
|||||||
|
|
||||||
// Official SVN repository and contact information can be found at
|
// Official SVN repository and contact information can be found at
|
||||||
// http://code.google.com/p/dolphin-emu/
|
// http://code.google.com/p/dolphin-emu/
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "Common.h"
|
|
||||||
#include "../Core.h"
|
|
||||||
|
|
||||||
#include "GBAPipe.h"
|
#include "GBAPipe.h"
|
||||||
#include "../PowerPC/PowerPC.h"
|
|
||||||
#include "CommandProcessor.h"
|
|
||||||
|
|
||||||
|
|
||||||
#include "../Host.h"
|
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
|
|
||||||
namespace GBAPipe
|
namespace GBAPipe
|
||||||
{
|
{
|
||||||
|
|
||||||
HANDLE m_hPipe;
|
HANDLE m_hPipe;
|
||||||
bool m_bIsServer;
|
bool m_bIsServer;
|
||||||
bool m_bEnabled;
|
bool m_bEnabled;
|
||||||
u32 m_BlockStart;
|
|
||||||
|
|
||||||
#define PIPENAME "\\\\.\\pipe\\gbapipe"
|
#define PIPENAME "\\\\.\\pipe\\gbapipe"
|
||||||
|
|
||||||
|
|
||||||
void SetBlockStart(u32 addr)
|
void StartServer()
|
||||||
{
|
{
|
||||||
m_BlockStart = addr;
|
|
||||||
}
|
|
||||||
|
|
||||||
void StartServer()
|
|
||||||
{
|
|
||||||
if (m_bEnabled)
|
if (m_bEnabled)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@ -73,10 +61,10 @@ namespace GBAPipe
|
|||||||
|
|
||||||
m_bIsServer = true;
|
m_bIsServer = true;
|
||||||
m_bEnabled = true;
|
m_bEnabled = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void ConnectAsClient()
|
void ConnectAsClient()
|
||||||
{
|
{
|
||||||
if (m_bEnabled)
|
if (m_bEnabled)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@ -97,10 +85,10 @@ namespace GBAPipe
|
|||||||
|
|
||||||
m_bEnabled = true;
|
m_bEnabled = true;
|
||||||
m_bIsServer = false;
|
m_bIsServer = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Stop()
|
void Stop()
|
||||||
{
|
{
|
||||||
if (m_bEnabled)
|
if (m_bEnabled)
|
||||||
{
|
{
|
||||||
if (m_bIsServer)
|
if (m_bIsServer)
|
||||||
@ -109,10 +97,10 @@ namespace GBAPipe
|
|||||||
CloseHandle(m_hPipe);
|
CloseHandle(m_hPipe);
|
||||||
m_bEnabled = false;
|
m_bEnabled = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Read(u8& data)
|
void Read(u8& data)
|
||||||
{
|
{
|
||||||
if (!m_bEnabled)
|
if (!m_bEnabled)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@ -128,10 +116,10 @@ namespace GBAPipe
|
|||||||
{
|
{
|
||||||
INFO_LOG(SERIALINTERFACE, "read %x bytes: 0x%02x", read, data);
|
INFO_LOG(SERIALINTERFACE, "read %x bytes: 0x%02x", read, data);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Write(u8 data)
|
void Write(u8 data)
|
||||||
{
|
{
|
||||||
if (!m_bEnabled)
|
if (!m_bEnabled)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@ -146,32 +134,31 @@ namespace GBAPipe
|
|||||||
{
|
{
|
||||||
INFO_LOG(SERIALINTERFACE, "Wrote %x bytes: 0x%02x", written, data);
|
INFO_LOG(SERIALINTERFACE, "Wrote %x bytes: 0x%02x", written, data);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
bool IsEnabled()
|
|
||||||
{
|
|
||||||
return m_bEnabled;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool IsServer()
|
|
||||||
{
|
|
||||||
return m_bIsServer;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool IsEnabled()
|
||||||
|
{
|
||||||
|
return m_bEnabled;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool IsServer()
|
||||||
|
{
|
||||||
|
return m_bIsServer;
|
||||||
|
}
|
||||||
|
|
||||||
|
} // namespace GBAPipe
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
namespace GBAPipe
|
namespace GBAPipe
|
||||||
{
|
{
|
||||||
void StartServer() { }
|
void StartServer() { }
|
||||||
void ConnectAsClient() { }
|
void ConnectAsClient() { }
|
||||||
void Stop() { }
|
void Stop() { }
|
||||||
void Read(u8& data) { }
|
void Read(u8& data) { }
|
||||||
void Write(u8 data) { }
|
void Write(u8 data) { }
|
||||||
bool IsEnabled() { return false; }
|
bool IsEnabled() { return false; }
|
||||||
bool IsServer() { return false; }
|
bool IsServer() { return false; }
|
||||||
}
|
} // namespace GBAPipe
|
||||||
// #error Provide a GBAPipe implementation or dummy it out, please
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
// Copyright (C) 2003-2008 Dolphin Project.
|
// Copyright (C) 2003-2009 Dolphin Project.
|
||||||
|
|
||||||
// This program is free software: you can redistribute it and/or modify
|
// This program is free software: you can redistribute it and/or modify
|
||||||
// it under the terms of the GNU General Public License as published by
|
// it under the terms of the GNU General Public License as published by
|
||||||
@ -26,26 +26,26 @@
|
|||||||
|
|
||||||
namespace GBAPipe
|
namespace GBAPipe
|
||||||
{
|
{
|
||||||
// start the server
|
|
||||||
void StartServer();
|
|
||||||
|
|
||||||
// connect as client
|
// start the server
|
||||||
void ConnectAsClient();
|
void StartServer();
|
||||||
|
|
||||||
// stop
|
// connect as client
|
||||||
void Stop();
|
void ConnectAsClient();
|
||||||
|
|
||||||
// Transfer funcs
|
// stop
|
||||||
void Read(u8& data);
|
void Stop();
|
||||||
void Write(u8 data);
|
|
||||||
|
|
||||||
// IsEnabled
|
// Transfer funcs
|
||||||
bool IsEnabled();
|
void Read(u8& data);
|
||||||
|
void Write(u8 data);
|
||||||
|
|
||||||
// IsServer
|
// IsEnabled
|
||||||
bool IsServer();
|
bool IsEnabled();
|
||||||
|
|
||||||
void SetBlockStart(u32 addr);
|
// IsServer
|
||||||
}
|
bool IsServer();
|
||||||
|
|
||||||
|
} // namespace GBAPipe
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Reference in New Issue
Block a user