Sonic Advance 1/2 work now with NO_LINK defined

This commit is contained in:
kode54 2013-09-21 16:18:54 +00:00
parent 8c034c3b67
commit 08886eaf53
1 changed files with 10 additions and 0 deletions

View File

@ -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;