|
|
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: {
1.1.1.2 ! root 13: cycles_to_add = (cycles_to_add+3)&0xfffffffc;
! 14: lastInstructionCycles = cycles_to_add; /* Store to find how many cycles last instruction took to execute */
! 15: SoundCycles += cycles_to_add; /* Add in cycle time to get cycle-accurate sample playback */
! 16: PendingInterruptCount -= (short)cycles_to_add; /* Add cycle time including effective address time */
1.1 root 17: if( PendingInterruptCount<=0 || PendingInterruptFlag) /* Check for any interrupts or flag to service */
18: {
19: if( PendingInterruptFlag&PENDING_INTERRUPT_FLAG_TRACE )
20: M68000_TraceModeTriggered();
1.1.1.2 ! root 21: if( PendingInterruptFlag&PENDING_INTERRUPT_FLAG_MFP )
! 22: MFP_CheckPendingInterrupts();
! 23: if( PendingInterruptCount<=0 && PendingInterruptFunction )
! 24: CALL_VAR(PendingInterruptFunction);
1.1 root 25: }
26: }
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.