Annotation of hatari/src/includes/m68000.h, revision 1.1.1.9

1.1       root        1: /*
1.1.1.5   root        2:   Hatari - m68000.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.5   root        8: #ifndef HATARI_M68000_H
                      9: #define HATARI_M68000_H
                     10: 
1.1.1.9 ! root       11: #include "cycles.h"     /* for nCyclesMainCounter */
1.1.1.6   root       12: #include "sysdeps.h"
                     13: #include "memory.h"
1.1.1.9 ! root       14: #include "newcpu.h"     /* for regs */
1.1.1.6   root       15: 
                     16: #define Regs regs.regs  /* Ugly hack to glue the WinSTon sources to the UAE CPU core. */
                     17: #define SR regs.sr      /* Don't forget to call MakeFromSR() and MakeSR() */
                     18: 
                     19: 
1.1.1.9 ! root       20: /* bus error mode */
        !            21: #define BUS_ERROR_WRITE 0
        !            22: #define BUS_ERROR_READ 1
        !            23: 
        !            24: extern void (*PendingInterruptFunction)(void);
1.1.1.6   root       25: extern short int PendingInterruptCount;
                     26: 
1.1.1.7   root       27: extern Uint32 BusErrorAddress;
1.1.1.5   root       28: extern Uint32 BusErrorPC;
1.1.1.6   root       29: extern BOOL bBusErrorReadWrite;
1.1.1.7   root       30: extern int nCpuFreqShift;
1.1.1.9 ! root       31: extern int nWaitStateCycles;
1.1.1.6   root       32: 
                     33: 
                     34: /*-----------------------------------------------------------------------*/
                     35: /*
                     36:   Add CPU cycles.
                     37:   NOTE: All times are rounded up to nearest 4 cycles.
                     38: */
                     39: static inline void M68000_AddCycles(int cycles)
                     40: {
1.1.1.7   root       41:        cycles = ((cycles + 3) & ~3) >> nCpuFreqShift;
                     42:        PendingInterruptCount -= cycles;
1.1.1.9 ! root       43:        nCyclesMainCounter += cycles;
1.1.1.6   root       44: }
1.1.1.5   root       45: 
1.1       root       46: extern void M68000_Reset(BOOL bCold);
                     47: extern void M68000_MemorySnapShot_Capture(BOOL bSave);
1.1.1.8   root       48: extern void M68000_BusError(Uint32 addr, BOOL bReadWrite);
1.1.1.6   root       49: extern void M68000_Exception(Uint32 ExceptionVector);
1.1.1.9 ! root       50: extern void M68000_WaitState(int nCycles);
1.1.1.5   root       51: 
                     52: #endif

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.