26 |
|
|
27 |
|
|
28 |
|
// XPRAM file name |
29 |
+ |
#if POWERPC_ROM |
30 |
+ |
static char XPRAM_FILE_NAME[] = "ENV:SheepShaver_NVRAM"; |
31 |
+ |
static char XPRAM_FILE_NAME_ARC[] = "ENVARC:SheepShaver_NVRAM"; |
32 |
+ |
#else |
33 |
|
static char XPRAM_FILE_NAME[] = "ENV:BasiliskII_XPRAM"; |
34 |
|
static char XPRAM_FILE_NAME_ARC[] = "ENVARC:BasiliskII_XPRAM"; |
35 |
+ |
#endif |
36 |
|
|
37 |
|
|
38 |
|
/* |
43 |
|
{ |
44 |
|
BPTR fh; |
45 |
|
if ((fh = Open(XPRAM_FILE_NAME, MODE_OLDFILE)) != NULL) { |
46 |
< |
Read(fh, XPRAM, 256); |
46 |
> |
Read(fh, XPRAM, XPRAM_SIZE); |
47 |
|
Close(fh); |
48 |
|
} |
49 |
|
} |
57 |
|
{ |
58 |
|
BPTR fh; |
59 |
|
if ((fh = Open(XPRAM_FILE_NAME, MODE_NEWFILE)) != NULL) { |
60 |
< |
Write(fh, XPRAM, 256); |
60 |
> |
Write(fh, XPRAM, XPRAM_SIZE); |
61 |
|
Close(fh); |
62 |
|
} |
63 |
|
if ((fh = Open(XPRAM_FILE_NAME_ARC, MODE_NEWFILE)) != NULL) { |
64 |
< |
Write(fh, XPRAM, 256); |
64 |
> |
Write(fh, XPRAM, XPRAM_SIZE); |
65 |
|
Close(fh); |
66 |
|
} |
67 |
|
} |