26 |
|
|
27 |
|
|
28 |
|
// XPRAM file name and path |
29 |
+ |
#if POWERPC_ROM |
30 |
+ |
const char XPRAM_FILE_NAME[] = "SheepShaver_NVRAM"; |
31 |
+ |
#else |
32 |
|
const char XPRAM_FILE_NAME[] = "BasiliskII_XPRAM"; |
33 |
+ |
#endif |
34 |
|
static BPath xpram_path; |
35 |
|
|
36 |
|
|
47 |
|
// Load XPRAM from settings file |
48 |
|
int fd; |
49 |
|
if ((fd = open(xpram_path.Path(), O_RDONLY)) >= 0) { |
50 |
< |
read(fd, XPRAM, 256); |
50 |
> |
read(fd, XPRAM, XPRAM_SIZE); |
51 |
|
close(fd); |
52 |
|
} |
53 |
|
} |
63 |
|
return; |
64 |
|
int fd; |
65 |
|
if ((fd = open(xpram_path.Path(), O_WRONLY | O_CREAT, 0666)) >= 0) { |
66 |
< |
write(fd, XPRAM, 256); |
66 |
> |
write(fd, XPRAM, XPRAM_SIZE); |
67 |
|
close(fd); |
68 |
|
} |
69 |
|
} |