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

Comparing BasiliskII/src/Windows/main_windows.cpp (file contents):
Revision 1.10 by gbeauche, 2006-05-08T16:56:07Z vs.
Revision 1.15 by asvitkine, 2009-09-21T03:33:20Z

# Line 1 | Line 1
1   /*
2   *  main_windows.cpp - Startup code for Windows
3   *
4 < *  Basilisk II (C) 1997-2005 Christian Bauer
4 > *  Basilisk II (C) 1997-2008 Christian Bauer
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 73 | Line 73 | int CPUType;
73   bool CPUIs68060;
74   int FPUType;
75   bool TwentyFourBitAddressing;
76 bool ThirtyThreeBitAddressing = false;
76  
77  
78   // Global variables
# Line 134 | Line 133 | char *strdup(const char *s)
133  
134   void *vm_acquire_mac(size_t size)
135   {
136 <        void *m = vm_acquire(size, VM_MAP_DEFAULT | VM_MAP_33BIT);
138 <        if (m == NULL) {
139 <                ThirtyThreeBitAddressing = false;
140 <                m = vm_acquire(size);
141 <        }
142 <        return m;
136 >        return vm_acquire(size, VM_MAP_DEFAULT | VM_MAP_32BIT);
137   }
138  
139  
# Line 147 | Line 141 | void *vm_acquire_mac(size_t size)
141   *  SIGSEGV handler
142   */
143  
144 < static sigsegv_return_t sigsegv_handler(sigsegv_address_t fault_address, sigsegv_address_t fault_instruction)
144 > static sigsegv_return_t sigsegv_handler(sigsegv_info_t *sip)
145   {
146 +        const uintptr fault_address = (uintptr)sigsegv_get_fault_address(sip);
147   #if ENABLE_VOSF
148          // Handle screen fault
149 <        extern bool Screen_fault_handler(sigsegv_address_t, sigsegv_address_t);
150 <        if (Screen_fault_handler(fault_address, fault_instruction))
149 >        extern bool Screen_fault_handler(sigsegv_info_t *sip);
150 >        if (Screen_fault_handler(sip))
151                  return SIGSEGV_RETURN_SUCCESS;
152   #endif
153  
# Line 173 | Line 168 | static sigsegv_return_t sigsegv_handler(
168   *  Dump state when everything went wrong after a SEGV
169   */
170  
171 < static void sigsegv_dump_state(sigsegv_address_t fault_address, sigsegv_address_t fault_instruction)
171 > static void sigsegv_dump_state(sigsegv_info_t *sip)
172   {
173 +        const sigsegv_address_t fault_address = sigsegv_get_fault_address(sip);
174 +        const sigsegv_address_t fault_instruction = sigsegv_get_fault_instruction_address(sip);
175          fprintf(stderr, "Caught SIGSEGV at address %p", fault_address);
176 <        if (fault_instruction != SIGSEGV_INVALID_PC)
176 >        if (fault_instruction != SIGSEGV_INVALID_ADDRESS)
177                  fprintf(stderr, " [IP=%p]", fault_instruction);
178          fprintf(stderr, "\n");
179          uaecptr nextpc;
# Line 209 | Line 206 | static void usage(const char *prg_name)
206                  "  --break ADDRESS\n    set ROM breakpoint\n"
207                  "  --rominfo\n    dump ROM information\n", prg_name
208          );
209 <        LoadPrefs(); // read the prefs file so PrefsPrintUsage() will print the correct default values
209 >        LoadPrefs(NULL); // read the prefs file so PrefsPrintUsage() will print the correct default values
210          PrefsPrintUsage();
211          exit(0);
212   }
# Line 356 | Line 353 | int main(int argc, char **argv)
353          vm_init();
354  
355          // Create areas for Mac RAM and ROM
359 #ifdef USE_33BIT_ADDRESSING
360        // Speculatively enables 33-bit addressing
361        ThirtyThreeBitAddressing = true;
362 #endif
356          RAMBaseHost = (uint8 *)vm_acquire_mac(RAMSize);
357          ROMBaseHost = (uint8 *)vm_acquire_mac(0x100000);
358          if (RAMBaseHost == VM_MAP_FAILED || ROMBaseHost == VM_MAP_FAILED) {
# Line 418 | Line 411 | int main(int argc, char **argv)
411          timer_init();
412  
413          // Initialize everything
414 <        if (!InitAll())
414 >        if (!InitAll(NULL))
415                  QuitEmulator();
416          D(bug("Initialization complete\n"));
417  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines