2135 |
|
M68kRegisters r; |
2136 |
|
uint8 pb[SIZEOF_IOParam]; |
2137 |
|
|
2138 |
+ |
// Install floppy driver |
2139 |
+ |
if (ROMType == ROMTYPE_NEWWORLD) { |
2140 |
+ |
|
2141 |
+ |
// Force installation of floppy driver with NewWorld ROMs |
2142 |
+ |
r.a[0] = ROM_BASE + sony_offset; |
2143 |
+ |
r.d[0] = (uint32)SonyRefNum; |
2144 |
+ |
Execute68kTrap(0xa43d, &r); // DrvrInstallRsrvMem() |
2145 |
+ |
r.a[0] = ReadMacInt32(ReadMacInt32(0x11c) + ~SonyRefNum * 4); // Get driver handle from Unit Table |
2146 |
+ |
Execute68kTrap(0xa029, &r); // HLock() |
2147 |
+ |
uint32 dce = ReadMacInt32(r.a[0]); |
2148 |
+ |
WriteMacInt32(dce + dCtlDriver, ROM_BASE + sony_offset); |
2149 |
+ |
WriteMacInt16(dce + dCtlFlags, SonyDriverFlags); |
2150 |
+ |
} |
2151 |
+ |
|
2152 |
|
// Open .Sony driver |
2153 |
|
WriteMacInt8((uint32)pb + ioPermssn, 0); |
2154 |
|
WriteMacInt32((uint32)pb + ioNamePtr, (uint32)"\005.Sony"); |