1 |
|
/* |
2 |
|
* main_amiga.cpp - Startup code for AmigaOS |
3 |
|
* |
4 |
< |
* Basilisk II (C) 1997-2001 Christian Bauer |
4 |
> |
* Basilisk II (C) 1997-2002 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 |
188 |
|
QuitEmulator(); |
189 |
|
} |
190 |
|
|
191 |
+ |
if (FindTask((UBYTE *) "« Enforcer »")) |
192 |
+ |
{ |
193 |
+ |
ErrorAlert(STR_ENFORCER_RUNNING_ERR); |
194 |
+ |
QuitEmulator(); |
195 |
+ |
} |
196 |
+ |
|
197 |
|
// These two can fail (the respective gfx support won't be available, then) |
198 |
|
P96Base = OpenLibrary((UBYTE *)"Picasso96API.library", 2); |
199 |
|
CyberGfxBase = OpenLibrary((UBYTE *)"cybergraphics.library", 2); |
604 |
|
|
605 |
|
static __saveds void xpram_func(void) |
606 |
|
{ |
607 |
< |
uint8 last_xpram[256]; |
608 |
< |
memcpy(last_xpram, XPRAM, 256); |
607 |
> |
uint8 last_xpram[XPRAM_SIZE]; |
608 |
> |
memcpy(last_xpram, XPRAM, XPRAM_SIZE); |
609 |
|
|
610 |
|
while (xpram_proc_active) { |
611 |
|
for (int i=0; i<60 && xpram_proc_active; i++) |
612 |
|
Delay(50); // Only wait 1 second so we quit promptly when xpram_proc_active becomes false |
613 |
< |
if (memcmp(last_xpram, XPRAM, 256)) { |
614 |
< |
memcpy(last_xpram, XPRAM, 256); |
613 |
> |
if (memcmp(last_xpram, XPRAM, XPRAM_SIZE)) { |
614 |
> |
memcpy(last_xpram, XPRAM, XPRAM_SIZE); |
615 |
|
SaveXPRAM(); |
616 |
|
} |
617 |
|
} |