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