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