ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/cebix/SheepShaver/src/include/cpu_emulation.h
(Generate patch)

Comparing SheepShaver/src/include/cpu_emulation.h (file contents):
Revision 1.7 by gbeauche, 2003-12-04T17:26:38Z vs.
Revision 1.12 by gbeauche, 2004-05-31T09:04:44Z

# Line 1 | Line 1
1   /*
2   *  cpu_emulation.h - Definitions for CPU emulation and Mac memory access
3   *
4 < *  SheepShaver (C) 1997-2002 Christian Bauer and Marc Hellwig
4 > *  SheepShaver (C) 1997-2004 Christian Bauer and Marc Hellwig
5   *
6   *  This program is free software; you can redistribute it and/or modify
7   *  it under the terms of the GNU General Public License as published by
# Line 31 | Line 31 | const uintptr ROM_BASE = 0x40800000;                   /
31   const uint32  ROM_SIZE = 0x400000;                              // Size of ROM file
32   const uint32  ROM_AREA_SIZE = 0x500000;                 // Size of ROM area
33   const uintptr ROM_END = ROM_BASE + ROM_SIZE;    // End of ROM
34 + const uintptr DR_EMULATOR_BASE = 0x68070000;    // Address of DR emulator code
35 + const uint32  DR_EMULATOR_SIZE = 0x10000;               // Size of DR emulator code
36   const uintptr DR_CACHE_BASE = 0x69000000;               // Address of DR cache
37   const uint32  DR_CACHE_SIZE = 0x80000;                  // Size of DR Cache
38  
# Line 90 | Line 92 | static inline void *Mac2Mac_memcpy(uint3
92   *  680x0 and PPC emulation
93   */
94  
95 + // 68k procedure helper to write a big endian 16-bit word
96 + #ifdef WORDS_BIGENDIAN
97 + #define PW(W) W
98 + #else
99 + #define PW(X) ((((X) >> 8) & 0xff) | (((X) & 0xff) << 8))
100 + #endif
101 +
102 + // PowerPC procedure helper to write a big-endian 32-bit word
103 + #ifdef WORDS_BIGENDIAN
104 + #define PL(X) X
105 + #else
106 + #define PL(X)                                                                                                   \
107 +     ((((X) & 0xff000000) >> 24) | (((X) & 0x00ff0000) >>  8) | \
108 +      (((X) & 0x0000ff00) <<  8) | (((X) & 0x000000ff) << 24))
109 + #endif
110 +
111   struct M68kRegisters;
112   extern void Execute68k(uint32, M68kRegisters *r);                       // Execute 68k subroutine from EMUL_OP routine, must be ended with RTS
113   extern void Execute68kTrap(uint16 trap, M68kRegisters *r);      // Execute 68k A-Trap from EMUL_OP routine
114   #if EMULATED_PPC
115   extern void FlushCodeCache(uintptr start, uintptr end);         // Invalidate emulator caches
98 extern void ExecuteNative(int selector);                                        // Execute native code from EMUL_OP routine (real mode switch)
99 #else
100 extern void ExecutePPC(void (*func)(void));                                     // Execute PPC code from EMUL_OP routine (real mode switch)
116   #endif
117 + extern void ExecuteNative(int selector);                                        // Execute native code from EMUL_OP routine (real mode switch)
118  
119   #endif

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines