|
|
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: #ifndef UAE_EVENTS_H
9: #define UAE_EVENTS_H
10:
11: #include "../hardware/main.h"
12: #include "../hardware/decode.h"
13:
14:
15: STATIC_INLINE void do_cycles(unsigned long cycles_to_add)
16: {
17: cycles_to_add = 4;
18: //cycles_to_add = (cycles_to_add+3)&0xfffffffc;
19: // lastInstructionCycles = cycles_to_add; /* Store to find how many cycles last instruction took to execute */
20: PendingInterruptCount -= (short)cycles_to_add; /* Add cycle time including effective address time */
21: if( PendingInterruptCount<=0 || PendingInterruptFlag) /* Check for any interrupts or flag to service */
22: {
23: if (PendingInterruptFunction)
24: CALL_VAR(PendingInterruptFunction);
25: }
26: }
27:
28: #endif /* UAE_EVENTS_H */
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.