mirror of
https://github.com/rdolbeau/NuBusFPGA.git
synced 2024-12-23 01:30:32 +00:00
dCtlDevBase might be empty, but dCtlSlot is fine...
This commit is contained in:
parent
3f3371a054
commit
d7a344555e
@ -18,27 +18,31 @@ OSErr cNuBusFPGARAMDskOpen(IOParamPtr pb, /* DCtlPtr */ AuxDCEPtr dce)
|
|||||||
SwapMMUMode ( &busMode ); // to32 // this likely won't work on older MacII ???
|
SwapMMUMode ( &busMode ); // to32 // this likely won't work on older MacII ???
|
||||||
|
|
||||||
if (dce->dCtlDevBase == 0) { // for some unknown reason, we get an empty dCtlDevBase...
|
if (dce->dCtlDevBase == 0) { // for some unknown reason, we get an empty dCtlDevBase...
|
||||||
SpBlock mySpBlock;
|
if ((dce->dCtlSlot > 0xE) || (dce->dCtlSlot < 0x9)) { // safety net
|
||||||
SInfoRecord mySInfoRecord;
|
SpBlock mySpBlock;
|
||||||
mySpBlock.spResult = (long)&mySInfoRecord;
|
SInfoRecord mySInfoRecord;
|
||||||
|
mySpBlock.spResult = (long)&mySInfoRecord;
|
||||||
mySpBlock.spSlot = 0x9; // start at first
|
|
||||||
mySpBlock.spID = 0;
|
mySpBlock.spSlot = 0x9; // start at first
|
||||||
mySpBlock.spExtDev = 0;
|
mySpBlock.spID = 0;
|
||||||
mySpBlock.spCategory = catProto;
|
mySpBlock.spExtDev = 0;
|
||||||
mySpBlock.spCType = 0x1000; // typeDrive;
|
mySpBlock.spCategory = catProto;
|
||||||
mySpBlock.spDrvrSW = drSwApple;
|
mySpBlock.spCType = 0x1000; // typeDrive;
|
||||||
mySpBlock.spDrvrHW = 0xbeee; // DrHwNuBusFPGADsk
|
mySpBlock.spDrvrSW = drSwApple;
|
||||||
mySpBlock.spTBMask = 0;
|
mySpBlock.spDrvrHW = 0xbeee; // DrHwNuBusFPGADsk
|
||||||
ret = SNextTypeSRsrc(&mySpBlock);
|
mySpBlock.spTBMask = 0;
|
||||||
if (ret)
|
ret = SNextTypeSRsrc(&mySpBlock);
|
||||||
goto done;
|
if (ret)
|
||||||
slot = mySpBlock.spSlot;
|
goto done;
|
||||||
|
slot = mySpBlock.spSlot;
|
||||||
|
} else {
|
||||||
|
slot = dce->dCtlSlot;
|
||||||
|
}
|
||||||
dce->dCtlDevBase = 0xF0000000ul | ((unsigned long)slot << 24);
|
dce->dCtlDevBase = 0xF0000000ul | ((unsigned long)slot << 24);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* write_reg(dce, GOBOFB_DEBUG, 0xDEAD0000); */
|
/* write_reg(dce, GOBOFB_DEBUG, 0xDEAD0000); */
|
||||||
/* write_reg(dce, GOBOFB_DEBUG, dce->dCtlRefNum); */
|
/* write_reg(dce, GOBOFB_DEBUG, dce->dCtlSlot); */
|
||||||
|
|
||||||
if (dce->dCtlStorage == nil) {
|
if (dce->dCtlStorage == nil) {
|
||||||
DrvQElPtr dq;
|
DrvQElPtr dq;
|
||||||
|
Loading…
Reference in New Issue
Block a user