195 |
|
while (info != end && info->fh != fh) |
196 |
|
++info; |
197 |
|
if (info != end) { |
198 |
+ |
D(bug("Looking for disk in drive %d\n", info->num)); |
199 |
|
if (SysIsDiskInserted(info->fh)) { |
200 |
|
info->read_only = SysIsReadOnly(info->fh); |
201 |
|
WriteMacInt8(info->status + dsDiskInPlace, 1); // Inserted removable disk |
202 |
|
WriteMacInt8(info->status + dsWriteProt, info->read_only ? 0xff : 0); |
203 |
+ |
D(bug(" disk inserted, mounting\n")); |
204 |
|
info->to_be_mounted = true; |
205 |
|
} |
206 |
|
return true; |
221 |
|
|
222 |
|
#if DISK_INSERT_CHECK |
223 |
|
// Disk in drive? |
224 |
< |
if (!ReadMacInt8(info->status + dsDiskInPlace)) { |
224 |
> |
if (ReadMacInt8(info->status + dsDiskInPlace) == 0) { |
225 |
|
|
226 |
|
// No, check if disk was inserted |
227 |
|
if (SysIsDiskInserted(info->fh)) |
248 |
|
|
249 |
|
static int16 set_dsk_err(int16 err) |
250 |
|
{ |
251 |
+ |
D(bug("set_dsk_err(%d)\n", err)); |
252 |
|
WriteMacInt16(0x142, err); |
253 |
|
return err; |
254 |
|
} |
310 |
|
if (SysIsDiskInserted(info->fh)) { |
311 |
|
WriteMacInt8(info->status + dsDiskInPlace, 1); // Inserted removable disk |
312 |
|
WriteMacInt8(info->status + dsWriteProt, info->read_only ? 0xff : 0); |
313 |
+ |
D(bug(" disk inserted, flagging for mount\n")); |
314 |
|
info->to_be_mounted = true; |
315 |
|
} |
316 |
|
|