|
|
1.1 ! root 1: /* ! 2: * Events ! 3: * These are best for low-frequency events. Having too many of them, ! 4: * or using them for events that occur too frequently, can cause massive ! 5: * slowdown. ! 6: */ ! 7: ! 8: #include "../includes/decode.h" ! 9: #include "../includes/main.h" ! 10: ! 11: STATIC_INLINE void do_cycles(unsigned long cycles_to_add) ! 12: { ! 13: cycles_to_add*=2; /* ? Better values ? */ ! 14: SoundCycles += cycles_to_add; /* Add in cycle time to get cycle-accurate sample playback */ ! 15: PendingInterruptCount -= (short)cycles_to_add; /* Add cycle time including effective address time */ ! 16: if( PendingInterruptCount<=0 || PendingInterruptFlag) /* Check for any interrupts or flag to service */ ! 17: { ! 18: if( PendingInterruptFlag&PENDING_INTERRUPT_FLAG_TRACE ) ! 19: M68000_TraceModeTriggered(); ! 20: //fprintf(stderr,"do_cycles: PendingInterruptFlag=%i, PendingInterruptCount=%i, PendingInterruptFunction=%lx\n", ! 21: // (int)PendingInterruptFlag, (int)PendingInterruptCount, (long)PendingInterruptFunction); ! 22: if( 1/*PendingInterruptFlag&PENDING_INTERRUPT_FLAG_MFP*/ ) ! 23: if( PendingInterruptCount<=0 && PendingInterruptFunction ) ! 24: { CALL_VAR(PendingInterruptFunction); } ! 25: MFP_CheckPendingInterrupts(); ! 26: } ! 27: }
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.