should fix remaining build errors on linux...

This commit is contained in:
shuffle2 2010-03-15 20:44:20 +00:00
parent 9382a1307c
commit eca4821498
3 changed files with 15 additions and 24 deletions

View File

@ -20,6 +20,7 @@
#include "../common/Port.h" #include "../common/Port.h"
#include "../System.h" #include "../System.h"
#include "agbprint.h" #include "agbprint.h"
#include "GBALink.h"
#ifdef PROFILING #ifdef PROFILING
#include "prof/prof.h" #include "prof/prof.h"
@ -31,15 +32,6 @@
extern int emulating; extern int emulating;
#include "GBALink.h"
extern int linktime;
extern void StartLink(u16);
extern void StartGPLink(u16);
extern void LinkSSend(u16);
extern void LinkUpdate(int);
extern int linktime2;
extern bool linkenable;
int SWITicks = 0; int SWITicks = 0;
int IRQTicks = 0; int IRQTicks = 0;
@ -2796,10 +2788,8 @@ void CPUUpdateRegister(u32 address, u16 value)
break; break;
case COMM_SIODATA8: case COMM_SIODATA8:
#ifdef _MSC_VER if (gba_link_enabled)
if (gba_link_enabled && lspeed)
LinkSSend(value); LinkSSend(value);
#endif
UPDATE_REG(COMM_RCNT, value); UPDATE_REG(COMM_RCNT, value);
break; break;
@ -3433,12 +3423,10 @@ void CPULoop(int ticks)
int timerOverflow = 0; int timerOverflow = 0;
// variable used by the CPU core // variable used by the CPU core
cpuTotalTicks = 0; cpuTotalTicks = 0;
#ifdef _MSC_VER
// shuffle2: what's the purpose? // shuffle2: what's the purpose?
if(gba_link_enabled) if(gba_link_enabled)
cpuNextEvent = 1; cpuNextEvent = 1;
#endif
cpuBreakLoop = false; cpuBreakLoop = false;
cpuNextEvent = CPUUpdateTicks(); cpuNextEvent = CPUUpdateTicks();
@ -3898,10 +3886,8 @@ void CPULoop(int ticks)
if (gba_joybus_enabled) if (gba_joybus_enabled)
JoyBusUpdate(clockTicks); JoyBusUpdate(clockTicks);
#ifdef _MSC_VER
if (gba_link_enabled) if (gba_link_enabled)
LinkUpdate(clockTicks); LinkUpdate(clockTicks);
#endif
cpuNextEvent = CPUUpdateTicks(); cpuNextEvent = CPUUpdateTicks();
@ -3917,11 +3903,9 @@ void CPULoop(int ticks)
goto updateLoop; goto updateLoop;
} }
#ifdef _MSC_VER
// shuffle2: what's the purpose? // shuffle2: what's the purpose?
if(gba_link_enabled) if(gba_link_enabled)
cpuNextEvent = 1; cpuNextEvent = 1;
#endif
if(IF && (IME & 1) && armIrqEnable) { if(IF && (IME & 1) && armIrqEnable) {
int res = IF & IE; int res = IF & IE;

View File

@ -23,10 +23,10 @@ bool gba_joybus_enabled = false;
GBASockClient* dol = NULL; GBASockClient* dol = NULL;
sf::IPAddress joybusHostAddr = sf::IPAddress::LocalHost; sf::IPAddress joybusHostAddr = sf::IPAddress::LocalHost;
#ifdef _MSC_VER
// If disabled, gba core won't call any (non-joybus) link functions // If disabled, gba core won't call any (non-joybus) link functions
bool gba_link_enabled = false; bool gba_link_enabled = false;
#ifdef _MSC_VER
// Hodgepodge // Hodgepodge
u8 tspeed = 3; u8 tspeed = 3;
u8 transfer = 0; u8 transfer = 0;
@ -40,7 +40,6 @@ static int i, j;
int linktimeout = 1000; int linktimeout = 1000;
LANLINKDATA lanlink; LANLINKDATA lanlink;
u16 linkdata[4]; u16 linkdata[4];
int lspeed = 0;
lserver ls; lserver ls;
lclient lc; lclient lc;
bool oncewait = false, after = false; bool oncewait = false, after = false;

View File

@ -121,8 +121,13 @@ extern void JoyBusConnect();
extern void JoyBusShutdown(); extern void JoyBusShutdown();
extern void JoyBusUpdate(int ticks); extern void JoyBusUpdate(int ticks);
extern bool gba_link_enabled;
#ifdef _MSC_VER #ifdef _MSC_VER
extern void LinkUpdate(); extern void StartLink(u16);
extern void StartGPLink(u16);
extern void LinkSSend(u16);
extern void LinkUpdate(int);
extern void LinkChildStop(); extern void LinkChildStop();
extern void LinkChildSend(u16); extern void LinkChildSend(u16);
extern void CloseLanLink(); extern void CloseLanLink();
@ -130,9 +135,12 @@ extern char *MakeInstanceFilename(const char *Input);
extern LANLINKDATA lanlink; extern LANLINKDATA lanlink;
extern int vbaid; extern int vbaid;
extern bool rfu_enabled; extern bool rfu_enabled;
extern bool gba_link_enabled;
extern int linktimeout; extern int linktimeout;
extern lclient lc; extern lclient lc;
extern int linkid; extern int linkid;
extern int lspeed; #else // These are stubbed for now
inline void StartLink(u16){}
inline void StartGPLink(u16){}
inline void LinkSSend(u16){}
inline void LinkUpdate(int){}
#endif #endif