static void UNLSMB2JIRQHook(int a) { if(IRQa) { IRQCount+=a; if(IRQCount>=0xFFFF) { IRQa=0; IRQCount=0; X6502_IRQBegin(FCEU_IQEXT); } } }
static void ClockMMC3Counter(void) { int count = IRQCount; if (!count || IRQReload) { IRQCount = IRQLatch; IRQReload = 0; } else IRQCount--; if ((count | isRevB) && !IRQCount) { if (IRQa) { X6502_IRQBegin(FCEU_IQEXT); } } }
static void BandaiIRQHook(int a) { if(IRQa) { IRQCount -= a; if(IRQCount<0) { X6502_IRQBegin(FCEU_IQEXT); IRQa = 0; IRQCount = -1; } } }
static void FP_FASTAPASS(1) Mapper40IRQ(int a) { if(IRQa) { if(IRQCount<4096) IRQCount+=a; else { IRQa=0; X6502_IRQBegin(FCEU_IQEXT); } } }
/*void Mapper83_init(void) { } */ static void FP_FASTAPASS(1) m83IRQHook(int a) { if(IRQa) { IRQCount-=a; if(IRQCount<0) { X6502_IRQBegin(FCEU_IQEXT); IRQa=0; IRQCount=0xFFFF; } } }
static void FP_FASTAPASS(1) NamcoIRQHook(int a) { if(IRQa) { IRQCount+=a; if(IRQCount>=0x7FFF) { X6502_IRQBegin(FCEU_IQEXT); IRQa=0; IRQCount=0x7FFF; //7FFF; } } }
static void FP_FASTAPASS(1) FFEIRQHook(int a) { if(IRQa) { IRQCount+=a; if(IRQCount>=0x10000) { X6502_IRQBegin(FCEU_IQEXT); IRQa=0; IRQCount=0; } } }
static void FP_FASTAPASS(1) RAMBO1_IRQHook(int a) { static int smallcount; if(!IRQmode) return; smallcount+=a; while(smallcount>=4) { smallcount-=4; IRQCount--; if(IRQCount==0xFF) if(IRQa) X6502_IRQBegin(FCEU_IQEXT); } }
static void SunIRQHook(int a) { if(IRQa & 1) { uint16 prev = IRQCount; IRQCount-=a; if(IRQCount > prev && (IRQa & 0x80)) { X6502_IRQBegin(MDFN_IQEXT); } } }
static void FP_FASTAPASS(1) BandaiIRQHook(int a) { if(IRQa) { IRQCount-=a; if(IRQCount<0) { X6502_IRQBegin(FCEU_IQEXT); //printf("IRQ: %d, %d\n",scanline,timestamp); IRQa=0; IRQCount=0xFFFF; } } }
static void RAMBO1_hb(void) { if(IRQmode) return; if(scanline==240) return; /* hmm. Maybe that should be an mmc3-only call in fce.c. */ rmode=0; IRQCount--; if(IRQCount==0xFF) { if(IRQa) { rmode = 1; X6502_IRQBegin(FCEU_IQEXT); } } }
static void UNL3DBlockIRQHook(int a) { if (IRQa) { if (IRQCount > 0) { IRQCount -= a; } else { if (IRQPause > 0) { IRQPause -= a; X6502_IRQBegin(FCEU_IQEXT); } else { IRQCount = Count; IRQPause = Pause; X6502_IRQEnd(FCEU_IQEXT); } } } }
static void IRQHook(int a) { if(IRQa) { acount += a * 3; while(acount >= 341) { acount -= 341; IRQCount++; if(IRQCount == 0) { X6502_IRQBegin(MDFN_IQEXT); IRQa=0; } } } }
static void Sup24_hb(void) { resetmode=0; if(IRQCount>=0) { IRQCount--; if(IRQCount<0) { if(IRQa) { resetmode = 1; X6502_IRQBegin(MDFN_IQEXT); //printf("IRQ: %d,%d\n",scanline,timestamp); } } } }
static void FP_FASTAPASS(1) KonamiIRQHook(int a) { #define LCYCS 341 // #define LCYCS ((227*2)+1) if(IRQa) { acount+=a*3; if(acount>=LCYCS) { doagainbub:acount-=LCYCS;IRQCount++; if(IRQCount==0x100) { X6502_IRQBegin(FCEU_IQEXT); IRQCount=IRQLatch; } if(acount>=LCYCS) goto doagainbub; } } }
static void M178SndClk(int a) { SensorDelay += a; if(SensorDelay > 0x32768) { SensorDelay -= 32768; GetMouseData (MouseData); lastclick = click; click = MouseData[2] & 1; // to prevent from continuos IRQ trigger if button is held. // actual circuit is just a D-C-R edge detector for IR-sensor // triggered by the active IR bat. if(lastclick && !click) X6502_IRQBegin(FCEU_IQEXT); } // if (pcm_enable) { // pcm_latch -= a; // if (pcm_latch <= 0) { // pcm_latch += pcm_clock; // pcm_enable = 0; // } // } }
static void RAMBO1_IRQHook(int a) { static int smallcount; if(!IRQmode) return; smallcount+=a; while(smallcount>=4) { smallcount-=4; IRQCount--; if(IRQCount==0xFF) { if(IRQa) { //printf("IRQ: %d\n",scanline); //rmode = 1; X6502_IRQBegin(MDFN_IQEXT); } } } }
static void MNNNIRQHook() { X6502_IRQBegin(FCEU_IQEXT); }