static void UNLSMB2JIRQHook(int a)
{
  if(IRQa)
  {
    IRQCount+=a;
    if(IRQCount>=0xFFFF)
    {
      IRQa=0;
      IRQCount=0;
      X6502_IRQBegin(FCEU_IQEXT);
    }
  }
}
Exemple #2
0
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);
		}
	}
}
Exemple #3
0
static void BandaiIRQHook(int a)
{
  if(IRQa)
  {
    IRQCount -= a;
    if(IRQCount<0)
    {
      X6502_IRQBegin(FCEU_IQEXT);
      IRQa = 0;
      IRQCount = -1;
    }
  }
}
Exemple #4
0
static void FP_FASTAPASS(1) Mapper40IRQ(int a)
{
 if(IRQa)
 {
        if(IRQCount<4096)
         IRQCount+=a;
        else
        {
         IRQa=0;
         X6502_IRQBegin(FCEU_IQEXT);
        }
 }
}
Exemple #5
0
/*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;
        }
    }
}
Exemple #6
0
static void FP_FASTAPASS(1) NamcoIRQHook(int a)
{
  if(IRQa)
  {
   IRQCount+=a;
   if(IRQCount>=0x7FFF) 
   {
    X6502_IRQBegin(FCEU_IQEXT);
    IRQa=0;
    IRQCount=0x7FFF; //7FFF;
   }
  }
}
Exemple #7
0
static void FP_FASTAPASS(1) FFEIRQHook(int a)
{
  if(IRQa)
  {
   IRQCount+=a;
   if(IRQCount>=0x10000)
   {
    X6502_IRQBegin(FCEU_IQEXT);
    IRQa=0;
    IRQCount=0;
   }
  }
}
Exemple #8
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);
  }
}
Exemple #9
0
static void SunIRQHook(int a)
{
  if(IRQa & 1)
  {
   uint16 prev = IRQCount;

   IRQCount-=a;

   if(IRQCount > prev && (IRQa & 0x80))
   {
    X6502_IRQBegin(MDFN_IQEXT);
   }
  }
}
Exemple #10
0
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;
   }
  }
}
Exemple #11
0
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);
    }
  }
}
Exemple #12
0
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);
			}
		}
	}
}
Exemple #13
0
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;
   }
  }
 }
}
Exemple #14
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);
         }
        }
      }
}
Exemple #15
0
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;
   }
 }
}
Exemple #16
0
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;
//		}
//	}
}
Exemple #17
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);
   }
  }
 }
}
Exemple #18
0
static void MNNNIRQHook() {
	X6502_IRQBegin(FCEU_IQEXT);
}