|
|
1.1 ! root 1: /* ! 2: Hatari - decode.h ! 3: ! 4: This file is distributed under the GNU Public License, version 2 or at ! 5: your option any later version. Read the file gpl.txt for details. ! 6: */ ! 7: ! 8: #ifndef HATARI_DECODE_H ! 9: #define HATARI_DECODE_H ! 10: ! 11: #include "sysdeps.h" ! 12: #include "maccess.h" ! 13: #include "memory.h" ! 14: #include "newcpu.h" ! 15: ! 16: #define Regs regs.regs /* Ouah - uggly hack - FIXME! */ ! 17: #define SR regs.sr /* Don't forget to call MakeFromSR() and MakeSR() */ ! 18: /*#define PC regs.pc*/ /* PC should be read with m68k_getpc() */ ! 19: ! 20: ! 21: #define PENDING_INTERRUPT_FLAG_MFP 0x0001 /* 'PendingInterruptFlag' masks */ ! 22: #define PENDING_INTERRUPT_FLAG_TRACE 0x0002 ! 23: #define CLEAR_PENDING_INTERRUPT_FLAG_MFP 0xfffe ! 24: #define CLEAR_PENDING_INTERRUPT_FLAG_TRACE 0xfffd ! 25: ! 26: ! 27: extern unsigned char STRam[MEMORY_SIZE]; ! 28: extern short int PendingInterruptFlag; ! 29: extern void *PendingInterruptFunction; ! 30: extern short int PendingInterruptCount; ! 31: extern unsigned long STRamEnd; ! 32: ! 33: ! 34: /*-----------------------------------------------------------------------*/ ! 35: /* Offset ST address to PC pointer: */ ! 36: #define STRAM_ADDR(Var) ((unsigned long)STRam+((unsigned long)Var&0x00ffffff)) ! 37: ! 38: ! 39: /*-----------------------------------------------------------------------*/ ! 40: /* Set clock times for each instruction, see '68000 timing' pages for details */ ! 41: /* NOTE All times are rounded up to nearest 4 cycles */ ! 42: #define ROUND_CYCLES_TO4(var) (((int)(var)+3)&0xfffffffc) ! 43: ! 44: static inline void ADD_CYCLES(op,r,w) ! 45: { ! 46: PendingInterruptCount-= (op+3)&0xfffffffc; ! 47: } ! 48: ! 49: ! 50: #endif /* HATARI_DECODE_H */
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.