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.6 by gbeauche, 2003-12-03T15:06:09Z vs.
Revision 1.9 by gbeauche, 2004-01-10T08:46:57Z

# Line 27 | Line 27
27   */
28  
29   // Constants
30 < const uint32 ROM_BASE = 0x40800000;                     // Base address of ROM
31 < const uint32 ROM_SIZE = 0x00400000;                     // Size of ROM file
32 < const uint32 ROM_AREA_SIZE = 0x500000;          // Size of ROM area
33 < const uint32 ROM_END = ROM_BASE + ROM_SIZE;     // End of ROM
34 < const uint32 DR_CACHE_BASE = 0x69000000;        // Address of DR cache
35 < const uint32 DR_CACHE_SIZE = 0x80000;           // Size of DR Cache
36 < const uint32 SHEEP_BASE = 0x60000000;           // Address of SheepShaver data
37 < const uint32 SHEEP_SIZE = 0x40000;                      // Size of SheepShaver data
38 <
39 < const uint32 KERNEL_DATA_BASE = 0x68ffe000;     // Address of Kernel Data
40 < const uint32 KERNEL_DATA2_BASE = 0x5fffe000;// Alternate address of Kernel Data
41 < const uint32 KERNEL_AREA_SIZE = 0x2000;         // Size of Kernel Data area
30 > const uintptr ROM_BASE = 0x40800000;                    // Base address of ROM
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_CACHE_BASE = 0x69000000;               // Address of DR cache
35 > const uint32  DR_CACHE_SIZE = 0x80000;                  // Size of DR Cache
36 >
37 > const uintptr KERNEL_DATA_BASE = 0x68ffe000;    // Address of Kernel Data
38 > const uintptr KERNEL_DATA2_BASE = 0x5fffe000;   // Alternate address of Kernel Data
39 > const uint32  KERNEL_AREA_SIZE = 0x2000;                // Size of Kernel Data area
40  
41   // MacOS 68k Emulator Data
42   struct EmulatorData {
# Line 54 | Line 52 | struct KernelData {
52   // RAM and ROM pointers (allocated and set by main_*.cpp)
53   extern uint32 RAMBase;                  // Base address of Mac RAM
54   extern uint32 RAMSize;                  // Size address of Mac RAM
57 extern uint32 SheepStack1Base;  // SheepShaver first alternate stack base
58 extern uint32 SheepStack2Base;  // SheepShaver second alternate stack base
59 extern uint32 SheepThunksBase;  // SheepShaver thunks base
55  
56   // Mac memory access functions
57   #if EMULATED_PPC
# Line 95 | Line 90 | static inline void *Mac2Mac_memcpy(uint3
90   *  680x0 and PPC emulation
91   */
92  
93 + // 68k procedure helper to write a big endian 16-bit word
94 + #ifdef WORDS_BIGENDIAN
95 + #define PW(W) W
96 + #else
97 + #define PW(X) ((((X) >> 8) & 0xff) | (((X) & 0xff) << 8))
98 + #endif
99 +
100   struct M68kRegisters;
101   extern void Execute68k(uint32, M68kRegisters *r);                       // Execute 68k subroutine from EMUL_OP routine, must be ended with RTS
102   extern void Execute68kTrap(uint16 trap, M68kRegisters *r);      // Execute 68k A-Trap from EMUL_OP routine
103   #if EMULATED_PPC
104   extern void FlushCodeCache(uintptr start, uintptr end);         // Invalidate emulator caches
103 extern void ExecuteNative(int selector);                                        // Execute native code from EMUL_OP routine (real mode switch)
104 #else
105 extern void ExecutePPC(void (*func)(void));                                     // Execute PPC code from EMUL_OP routine (real mode switch)
105   #endif
106 + extern void ExecuteNative(int selector);                                        // Execute native code from EMUL_OP routine (real mode switch)
107  
108   #endif

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines