--- BasiliskII/src/AmigaOS/xpram_amiga.cpp 1999/10/03 14:16:25 1.1.1.1 +++ BasiliskII/src/AmigaOS/xpram_amiga.cpp 2008/01/01 09:40:31 1.7 @@ -1,7 +1,7 @@ /* * xpram_amiga.cpp - XPRAM handling, AmigaOS specific stuff * - * Basilisk II (C) 1997-1999 Christian Bauer + * Basilisk II (C) 1997-2008 Christian Bauer * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -19,15 +19,22 @@ */ #include +#define __USE_SYSBASE #include +#include #include "sysdeps.h" #include "xpram.h" // XPRAM file name +#if POWERPC_ROM +static char XPRAM_FILE_NAME[] = "ENV:SheepShaver_NVRAM"; +static char XPRAM_FILE_NAME_ARC[] = "ENVARC:SheepShaver_NVRAM"; +#else static char XPRAM_FILE_NAME[] = "ENV:BasiliskII_XPRAM"; static char XPRAM_FILE_NAME_ARC[] = "ENVARC:BasiliskII_XPRAM"; +#endif /* @@ -38,7 +45,7 @@ void LoadXPRAM(void) { BPTR fh; if ((fh = Open(XPRAM_FILE_NAME, MODE_OLDFILE)) != NULL) { - Read(fh, XPRAM, 256); + Read(fh, XPRAM, XPRAM_SIZE); Close(fh); } } @@ -52,11 +59,11 @@ void SaveXPRAM(void) { BPTR fh; if ((fh = Open(XPRAM_FILE_NAME, MODE_NEWFILE)) != NULL) { - Write(fh, XPRAM, 256); + Write(fh, XPRAM, XPRAM_SIZE); Close(fh); } if ((fh = Open(XPRAM_FILE_NAME_ARC, MODE_NEWFILE)) != NULL) { - Write(fh, XPRAM, 256); + Write(fh, XPRAM, XPRAM_SIZE); Close(fh); } }