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 |
42 |
+ |
|
43 |
+ |
// MacOS 68k Emulator Data |
44 |
+ |
struct EmulatorData { |
45 |
+ |
uint32 v[0x400]; |
46 |
+ |
}; |
47 |
+ |
|
48 |
+ |
// MacOS Kernel Data |
49 |
+ |
struct KernelData { |
50 |
+ |
uint32 v[0x400]; |
51 |
+ |
EmulatorData ed; |
52 |
+ |
}; |
53 |
|
|
54 |
|
// RAM and ROM pointers (allocated and set by main_*.cpp) |
55 |
|
extern uint32 RAMBase; // Base address of Mac RAM |
56 |
|
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 |
60 |
|
|
61 |
|
// Mac memory access functions |
62 |
|
static inline uint32 ReadMacInt8(uint32 addr) {return *(uint8 *)addr;} |