2 // Common definitions for the UAE 68000 core
5 // (C) 2011 Underground Software
7 // This file is distributed under the GNU Public License, version 3 or at your
8 // option any later version. Read the file GPLv3 for details.
17 #define SPCFLAG_DEBUGGER 0x001
18 #define SPCFLAG_STOP 0x002
19 #define SPCFLAG_BUSERROR 0x004
20 #define SPCFLAG_INT 0x008
21 #define SPCFLAG_BRK 0x010
22 #define SPCFLAG_EXTRA_CYCLES 0x020
23 #define SPCFLAG_TRACE 0x040
24 #define SPCFLAG_DOTRACE 0x080
25 #define SPCFLAG_DOINT 0x100
26 #define SPCFLAG_MFP 0x200
27 #define SPCFLAG_EXEC 0x400
28 #define SPCFLAG_MODE_CHANGE 0x800
55 int32_t remainingCycles;
56 uint32_t interruptCycles;
59 extern struct regstruct regs, lastint_regs;
61 #define m68k_dreg(r, num) ((r).regs[(num)])
62 #define m68k_areg(r, num) (((r).regs + 8)[(num)])
70 /* Possible exceptions sources for M68000_Exception() and Exception() */
71 #define M68000_EXC_SRC_CPU 1 /* Direct CPU exception */
72 #define M68000_EXC_SRC_AUTOVEC 2 /* Auto-vector exception (e.g. VBL) */
73 //#define M68000_EXC_SRC_INT_MFP 3 /* MFP interrupt exception */
74 //#define M68000_EXC_SRC_INT_DSP 4 /* DSP interrupt exception */
76 #define SET_CFLG(x) (CFLG = (x))
77 #define SET_NFLG(x) (NFLG = (x))
78 #define SET_VFLG(x) (VFLG = (x))
79 #define SET_ZFLG(x) (ZFLG = (x))
80 #define SET_XFLG(x) (XFLG = (x))
88 #define CLEAR_CZNV do { \
95 #define COPY_CARRY (SET_XFLG(GET_CFLG))
97 #endif // __CPUDEFS_H__