ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/cebix/BasiliskII/src/sony.cpp
(Generate patch)

Comparing BasiliskII/src/sony.cpp (file contents):
Revision 1.11 by cebix, 2001-07-01T14:38:02Z vs.
Revision 1.15 by cebix, 2004-01-12T15:29:22Z

# Line 1 | Line 1
1   /*
2   *  sony.cpp - Replacement .Sony driver (floppy drives)
3   *
4 < *  Basilisk II (C) 1997-2001 Christian Bauer
4 > *  Basilisk II (C) 1997-2004 Christian Bauer
5   *
6   *  This program is free software; you can redistribute it and/or modify
7   *  it under the terms of the GNU General Public License as published by
# Line 28 | Line 28
28   *    Technote FL 24: "Don't Look at ioPosOffset for Devices"
29   */
30  
31 + #include "sysdeps.h"
32 +
33   #include <string.h>
34   #include <vector>
35  
# Line 35 | Line 37
37   using std::vector;
38   #endif
39  
38 #include "sysdeps.h"
40   #include "cpu_emulation.h"
41   #include "main.h"
42   #include "macos_util.h"
# Line 194 | Line 195 | bool SonyMountVolume(void *fh)
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;
# Line 218 | Line 221 | static void mount_mountable_volumes(void
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))
# Line 245 | Line 248 | static void mount_mountable_volumes(void
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   }
# Line 306 | Line 310 | int16 SonyOpen(uint32 pb, uint32 dce)
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  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines