75 |
|
uint8 *ROMBaseHost; // ROM base (host address space) |
76 |
|
uint32 ROMSize; // Size of ROM |
77 |
|
|
78 |
– |
uint32 MacsBugFlags = 0xbff; |
79 |
– |
|
78 |
|
|
79 |
|
// CPU and FPU type, addressing mode |
80 |
|
int CPUType; |
243 |
|
RAMSize = 1024*1024; |
244 |
|
} |
245 |
|
RAMBaseHost = (uint8 *)AllocVec(RAMSize + 0x100000, MEMF_PUBLIC); |
246 |
< |
// if (RAMBaseHost == NULL) { |
249 |
< |
// ErrorAlert(GetString(STR_NO_MEM_ERR)); |
250 |
< |
// QuitEmulator(); |
251 |
< |
// } |
252 |
< |
if (RAMBaseHost == NULL) |
253 |
< |
{ |
246 |
> |
if (RAMBaseHost == NULL) { |
247 |
|
uint32 newRAMSize = AvailMem(MEMF_LARGEST) - 0x100000; |
248 |
|
char xText[120]; |
249 |
|
|
250 |
|
sprintf(xText, GetString(STR_NOT_ENOUGH_MEM_WARN), RAMSize, newRAMSize); |
251 |
|
|
252 |
< |
if (1 != ChoiceAlert(xText, "Use", "Quit")) |
252 |
> |
if (ChoiceAlert(xText, "Use", "Quit") != 1) |
253 |
|
QuitEmulator(); |
254 |
|
|
255 |
|
RAMSize = newRAMSize; |
258 |
|
ErrorAlert(GetString(STR_NO_MEM_ERR)); |
259 |
|
QuitEmulator(); |
260 |
|
} |
261 |
< |
} |
261 |
> |
} |
262 |
|
RAMBaseMac = (uint32)RAMBaseHost; |
263 |
|
D(bug("Mac RAM starts at %08lx\n", RAMBaseHost)); |
264 |
|
ROMBaseHost = RAMBaseHost + RAMSize; |
325 |
|
// Set task priority to -1 so we don't use all processing time |
326 |
|
SetTaskPri(MainTask, -1); |
327 |
|
|
328 |
< |
WriteMacInt32(MacsBugFlags, 0); |
328 |
> |
WriteMacInt32(0xbff, 0); // MacsBugFlags |
329 |
|
|
330 |
|
// Swap stack to Mac RAM area |
331 |
|
stack_swap.stk_Lower = RAMBaseHost; |