mirror of
https://github.com/garrettsworkshop/MacIIROMDiskDriver.git
synced 2024-11-22 03:30:58 +00:00
Better PRAM options
This commit is contained in:
parent
b55d31cec0
commit
83af6e36f8
BIN
bin/driver.bin
BIN
bin/driver.bin
Binary file not shown.
BIN
bin/rom.bin
BIN
bin/rom.bin
Binary file not shown.
30
rdisk.c
30
rdisk.c
@ -167,32 +167,30 @@ const char const RDiskIcon[285] = {
|
|||||||
static void RDiskDecodeSettings(RDiskStorage_t *c, Ptr unmount, Ptr mount, Ptr ram) {
|
static void RDiskDecodeSettings(RDiskStorage_t *c, Ptr unmount, Ptr mount, Ptr ram) {
|
||||||
// Decode settings
|
// Decode settings
|
||||||
if (c->postBoot) {
|
if (c->postBoot) {
|
||||||
*unmount = 0;
|
*unmount = 0; // Don't unmount
|
||||||
*mount = 1;
|
*mount = 0; // No need to post event since it's already been done
|
||||||
*ram = 0;
|
*ram = 0;
|
||||||
} else if (RDiskIsRPressed()) { // R boots from ROM disk
|
} else if (RDiskIsRPressed()) { // R boots from ROM disk
|
||||||
*unmount = 0;
|
*unmount = 0; // Don't unmount so we boot from this drive
|
||||||
*mount = 0;
|
*mount = 0; // No need to mount later since we are boot disk
|
||||||
*ram = RDiskIsAPressed(); // A enables RAM disk
|
*ram = RDiskIsAPressed(); // A enables RAM disk
|
||||||
} else {
|
} else {
|
||||||
// Read PRAM
|
// Read PRAM
|
||||||
char legacy_startup, legacy_ram;
|
char legacy_startup, legacy_ram;
|
||||||
RDiskReadXPRAM(1, 4, &legacy_startup);
|
RDiskReadXPRAM(1, 4, &legacy_startup);
|
||||||
RDiskReadXPRAM(1, 5, &legacy_ram);
|
RDiskReadXPRAM(1, 5, &legacy_ram);
|
||||||
if (legacy_startup == 1) {
|
if (legacy_startup & 1) {
|
||||||
*unmount = 0;
|
*unmount = 0; // Don't unmount so we boot from this drive
|
||||||
*mount = 0;
|
*mount = 0; // No need to mount later since we are boot disk
|
||||||
*ram = legacy_ram;
|
*ram = legacy_ram & 1;
|
||||||
} else if (legacy_startup == 2 || legacy_startup == 3 ||
|
} else if (legacy_startup & 2) {
|
||||||
legacy_startup == 4 || legacy_startup == 5 ||
|
*unmount = 1; // Unmount to not boot from ouur disks
|
||||||
legacy_startup == 6 || legacy_startup == 7) {
|
*mount = 1; // Mount in accRun
|
||||||
*unmount = 1;
|
|
||||||
*mount = 1;
|
|
||||||
*ram = legacy_ram & 1;
|
*ram = legacy_ram & 1;
|
||||||
} else {
|
} else {
|
||||||
*unmount = 1;
|
*unmount = 1; // Unmount
|
||||||
*mount = 0;
|
*mount = 0; // Don't mount again
|
||||||
*ram = 0;
|
*ram = 0; // Don't allocate RAM disk
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user