ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/cebix/SheepShaver/src/BeOS/main_beos.cpp
(Generate patch)

Comparing SheepShaver/src/BeOS/main_beos.cpp (file contents):
Revision 1.7 by gbeauche, 2003-12-04T23:37:35Z vs.
Revision 1.8 by gbeauche, 2003-12-05T12:36:10Z

# Line 220 | Line 220 | system_info SysInfo;   // System informati
220  
221   static void *sig_stack = NULL;          // Stack for signal handlers
222   static void *extra_stack = NULL;        // Stack for SIGSEGV inside interrupt handler
223 < static uintptr SheepMem::base;          // Address of SheepShaver data
224 < static uintptr SheepMem::top;           // Top of SheepShaver data (stack like storage)
223 > uintptr SheepMem::zero_page = 0;        // Address of ro page filled in with zeros
224 > uintptr SheepMem::base;                         // Address of SheepShaver data
225 > uintptr SheepMem::top;                          // Top of SheepShaver data (stack like storage)
226   static area_id SheepMemArea;            // SheepShaver data area ID
227  
228  
# Line 578 | Line 579 | void SheepShaver::StartEmulator(void)
579          WriteMacInt32(XLM_PVR, PVR);                                                                    // Theoretical PVR
580          WriteMacInt32(XLM_BUS_CLOCK, BusClockSpeed);                                    // For DriverServicesLib patch
581          WriteMacInt16(XLM_EXEC_RETURN_OPCODE, M68K_EXEC_RETURN);                // For Execute68k() (RTS from the executed 68k code will jump here and end 68k mode)
582 +        WriteMacInt32(XLM_ZERO_PAGE, SheepMem::ZeroPage());                             // Pointer to read-only page with all bits set to 0
583   #if !EMULATED_PPC
584          WriteMacInt32(XLM_TOC, (uint32)TOC);                                                    // TOC pointer of emulator
585          WriteMacInt32(XLM_ETHER_INIT, *(uint32 *)InitStreamModule);             // DLPI ethernet driver functions
# Line 2079 | Line 2081 | bool SheepMem::Init(void)
2081          if (SheepMemArea < 0)
2082                  return false;
2083  
2084 +        // Create read-only area with all bits set to 0
2085 +        static const uint8 const_zero_page[4096] = {0,};
2086 +        zero_page = const_zero_page;
2087 +
2088          D(bug("SheepShaver area %ld at %p\n", SheepMemArea, base));
2089          top = base + size;
2090          return true;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines