| 1 | #ifndef __CPUEXTRA_H__ |
| 2 | #define __CPUEXTRA_H__ |
| 3 | |
| 4 | #include "sysdeps.h" |
| 5 | |
| 6 | typedef unsigned long cpuop_func(uint32_t); |
| 7 | |
| 8 | struct cputbl |
| 9 | { |
| 10 | cpuop_func * handler; |
| 11 | int specific; |
| 12 | uint16_t opcode; |
| 13 | }; |
| 14 | |
| 15 | extern uint16_t last_op_for_exception_3; /* Opcode of faulting instruction */ |
| 16 | extern uint32_t last_addr_for_exception_3; /* PC at fault time */ |
| 17 | extern uint32_t last_fault_for_exception_3; /* Address that generated the exception */ |
| 18 | |
| 19 | /* Family of the latest instruction executed (to check for pairing) */ |
| 20 | extern int OpcodeFamily; /* see instrmnem in readcpu.h */ |
| 21 | |
| 22 | /* How many cycles to add to the current instruction in case a "misaligned" bus access is made */ |
| 23 | /* (used when addressing mode is d8(an,ix)) */ |
| 24 | extern int BusCyclePenalty; |
| 25 | extern int CurrentInstrCycles; |
| 26 | |
| 27 | extern uint32_t get_disp_ea_000(uint32_t base, uint32_t dp); |
| 28 | extern void MakeSR(void); |
| 29 | extern void MakeFromSR(void); |
| 30 | extern void Exception(int, uint32_t, int); |
| 31 | extern int getDivu68kCycles(uint32_t dividend, uint16_t divisor); |
| 32 | extern int getDivs68kCycles(int32_t dividend, int16_t divisor); |
| 33 | |
| 34 | #endif // __CPUEXTRA_H__ |