ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/cebix/BasiliskII/src/Unix/main_unix.cpp
(Generate patch)

Comparing BasiliskII/src/Unix/main_unix.cpp (file contents):
Revision 1.68 by gbeauche, 2005-06-11T06:52:22Z vs.
Revision 1.69 by gbeauche, 2005-06-13T20:19:15Z

# Line 567 | Line 567 | int main(int argc, char **argv)
567                  // Speculatively enables 33-bit addressing
568                  ThirtyThreeBitAddressing = true;
569   #endif
570 <                RAMBaseHost = (uint8 *)vm_acquire_mac(RAMSize);
571 <                ROMBaseHost = (uint8 *)vm_acquire_mac(0x100000);
572 <                if (RAMBaseHost == VM_MAP_FAILED || ROMBaseHost == VM_MAP_FAILED) {
570 >                uint8 *ram_rom_area = (uint8 *)vm_acquire_mac(RAMSize + 0x100000);
571 >                if (ram_rom_area == VM_MAP_FAILED) {    
572                          ErrorAlert(STR_NO_MEM_ERR);
573                          QuitEmulator();
574                  }
575 +                RAMBaseHost = ram_rom_area;
576 +                ROMBaseHost = RAMBaseHost + RAMSize;
577          }
578  
579   #if USE_SCRATCHMEM_SUBTERFUGE
# Line 850 | Line 851 | void QuitEmulator(void)
851  
852          // Free ROM/RAM areas
853          if (RAMBaseHost != VM_MAP_FAILED) {
854 <                vm_release(RAMBaseHost, RAMSize);
854 >                vm_release(RAMBaseHost, RAMSize + 0x100000);
855                  RAMBaseHost = NULL;
855        }
856        if (ROMBaseHost != VM_MAP_FAILED) {
857                vm_release(ROMBaseHost, 0x100000);
856                  ROMBaseHost = NULL;
857          }
858  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines