From 297b01ff8ca2b8444b7f2bfa207ed0a0203ef824 Mon Sep 17 00:00:00 2001 From: kode54 Date: Sat, 21 Sep 2013 16:18:54 +0000 Subject: [PATCH] Sonic Advance 1/2 work now with NO_LINK defined git-svn-id: https://svn.code.sf.net/p/vbam/code/trunk@1216 a31d4220-a93d-0410-bf67-fe4944624d44 --- src/gba/GBA.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/gba/GBA.cpp b/src/gba/GBA.cpp index a87d044a..8e209fe7 100644 --- a/src/gba/GBA.cpp +++ b/src/gba/GBA.cpp @@ -2966,6 +2966,7 @@ void CPUUpdateRegister(u32 address, u16 value) break; +#ifndef NO_LINK case COMM_SIOCNT: StartLink(value); break; @@ -2973,6 +2974,7 @@ void CPUUpdateRegister(u32 address, u16 value) case COMM_SIODATA8: UPDATE_REG(COMM_SIODATA8, value); break; +#endif case 0x130: P1 |= (value & 0x3FF); @@ -2983,6 +2985,7 @@ void CPUUpdateRegister(u32 address, u16 value) UPDATE_REG(0x132, value & 0xC3FF); break; +#ifndef NO_LINK case COMM_RCNT: StartGPLink(value); break; @@ -3018,6 +3021,7 @@ void CPUUpdateRegister(u32 address, u16 value) case COMM_JOYSTAT: UPDATE_REG(COMM_JOYSTAT, (READ16LE(&ioMem[COMM_JOYSTAT]) & 0xf) | (value & 0xf0)); break; +#endif case 0x200: IE = value & 0x3FFF; @@ -3584,9 +3588,11 @@ void CPULoop(int ticks) // variable used by the CPU core cpuTotalTicks = 0; +#ifndef NO_LINK // shuffle2: what's the purpose? if(gba_link_enabled) cpuNextEvent = 1; +#endif cpuBreakLoop = false; cpuNextEvent = CPUUpdateTicks(); @@ -4037,8 +4043,10 @@ void CPULoop(int ticks) if (gba_joybus_enabled) JoyBusUpdate(clockTicks); +#ifndef NO_LINK if (gba_link_enabled) LinkUpdate(clockTicks); +#endif cpuNextEvent = CPUUpdateTicks(); @@ -4053,9 +4061,11 @@ void CPULoop(int ticks) goto updateLoop; } +#ifndef NO_LINK // shuffle2: what's the purpose? if(gba_link_enabled) cpuNextEvent = 1; +#endif if(IF && (IME & 1) && armIrqEnable) { int res = IF & IE;