Enabled the Game Boy Game Link emulation on Linux builds.

This commit is contained in:
skidau 2015-05-14 04:23:03 +00:00
parent 5da5feaac2
commit 8a2a0066bf
2 changed files with 5 additions and 12 deletions

View File

@ -1000,7 +1000,6 @@ void gbWriteMemory(register u16 address, register u8 value)
case 0x02: {
gbSerialOn = (value & 0x80);
#ifndef NO_LINK
#if (defined __WIN32__ || defined _WIN32)
//trying to detect whether the game has exited multiplay mode, pokemon blue start w/ 0x7e while pocket racing start w/ 0x7c
if (EmuReseted || (gbMemory[0xff02] & 0x7c) || (value & 0x7c) || (!(value & 0x81))) {
LinkFirstTime = true;
@ -1036,7 +1035,6 @@ void gbWriteMemory(register u16 address, register u8 value)
gbSerialBits = 0;
return;
#endif
#endif
}
@ -2495,12 +2493,10 @@ static void gbSelectColorizationPalette()
void gbReset()
{
#ifndef NO_LINK
#if (defined __WIN32__ || defined _WIN32)
if (GetLinkMode() == LINK_GAMEBOY_IPC || GetLinkMode() == LINK_GAMEBOY_SOCKET) {
EmuReseted = true;
gbInitLink();
}
#endif
#endif
gbGetHardwareType();
@ -5547,7 +5543,6 @@ void gbEmulate(int ticksToStop)
gbMemory[0xff41] = register_STAT;
#ifndef NO_LINK
#if (defined __WIN32__ || defined _WIN32)
// serial emulation
gbSerialOn = (gbMemory[0xff02] & 0x80);
static int SIOctr = 0;
@ -5641,7 +5636,6 @@ void gbEmulate(int ticksToStop)
}
#endif
}
#endif
#endif
soundTicks -= clockTicks;

View File

@ -81,9 +81,6 @@ bool gba_link_enabled = false;
bool speedhack = true;
bool LinkIsWaiting = false;
bool LinkFirstTime = true;
#define LOCAL_LINK_NAME "VBA link memory"
#define IP_LINK_PORT 5738
@ -354,6 +351,11 @@ u32 rfu_clientlist[5];
static RFUServer rfu_server;
static RFUClient rfu_client;
u8 gbSIO_SC = 0;
bool EmuReseted = true;
bool LinkIsWaiting = false;
bool LinkFirstTime = true;
#if (defined __WIN32__ || defined _WIN32)
static ConnectionState InitIPC();
@ -4104,9 +4106,6 @@ static void UpdateRFUIPC(int ticks)
}
}
u8 gbSIO_SC = 0;
bool EmuReseted = true;
void gbInitLinkIPC()
{
LinkIsWaiting = false;