mirror of
https://github.com/kanjitalk755/macemu.git
synced 2024-11-27 02:49:42 +00:00
Load XPRAM default values if signature not found. i.e. don't hang on first
boot.
This commit is contained in:
parent
689d017cbd
commit
ec2511fd99
@ -638,6 +638,36 @@ int main(int argc, char **argv)
|
|||||||
// Load NVRAM
|
// Load NVRAM
|
||||||
XPRAMInit();
|
XPRAMInit();
|
||||||
|
|
||||||
|
// Load XPRAM default values if signature not found
|
||||||
|
if (XPRAM[0x130c] != 0x4e || XPRAM[0x130d] != 0x75
|
||||||
|
|| XPRAM[0x130e] != 0x4d || XPRAM[0x130f] != 0x63) {
|
||||||
|
D(bug("Loading XPRAM default values\n"));
|
||||||
|
memset(XPRAM + 0x1300, 0, 0x100);
|
||||||
|
XPRAM[0x130c] = 0x4e; // "NuMc" signature
|
||||||
|
XPRAM[0x130d] = 0x75;
|
||||||
|
XPRAM[0x130e] = 0x4d;
|
||||||
|
XPRAM[0x130f] = 0x63;
|
||||||
|
XPRAM[0x1301] = 0x80; // InternalWaitFlags = DynWait (don't wait for SCSI devices upon bootup)
|
||||||
|
XPRAM[0x1310] = 0xa8; // Standard PRAM values
|
||||||
|
XPRAM[0x1311] = 0x00;
|
||||||
|
XPRAM[0x1312] = 0x00;
|
||||||
|
XPRAM[0x1313] = 0x22;
|
||||||
|
XPRAM[0x1314] = 0xcc;
|
||||||
|
XPRAM[0x1315] = 0x0a;
|
||||||
|
XPRAM[0x1316] = 0xcc;
|
||||||
|
XPRAM[0x1317] = 0x0a;
|
||||||
|
XPRAM[0x131c] = 0x00;
|
||||||
|
XPRAM[0x131d] = 0x02;
|
||||||
|
XPRAM[0x131e] = 0x63;
|
||||||
|
XPRAM[0x131f] = 0x00;
|
||||||
|
XPRAM[0x1308] = 0x13;
|
||||||
|
XPRAM[0x1309] = 0x88;
|
||||||
|
XPRAM[0x130a] = 0x00;
|
||||||
|
XPRAM[0x130b] = 0xcc;
|
||||||
|
XPRAM[0x1376] = 0x00; // OSDefault = MacOS
|
||||||
|
XPRAM[0x1377] = 0x01;
|
||||||
|
}
|
||||||
|
|
||||||
// Set boot volume
|
// Set boot volume
|
||||||
i16 = PrefsFindInt32("bootdrive");
|
i16 = PrefsFindInt32("bootdrive");
|
||||||
XPRAM[0x1378] = i16 >> 8;
|
XPRAM[0x1378] = i16 >> 8;
|
||||||
|
Loading…
Reference in New Issue
Block a user