Previous 199869 Revisions Next

r26362 Friday 22nd November, 2013 at 15:29:16 UTC by Curt Coder
upd765: Fixed sense drive status command, and allow floppy connectors without drives. [Curt Coder]
[src/emu/imagedev]floppy.h
[src/emu/machine]upd765.c

trunk/src/emu/imagedev/floppy.h
r26361r26362
107107   void stp_w(int state);
108108   void dir_w(int state) { dir = state; }
109109   void ss_w(int state) { ss = state; }
110   void inuse_w(int state) { }
110111
111112   void index_resync();
112113   attotime time_next_index();
trunk/src/emu/machine/upd765.c
r26361r26362
136136         floppy_connector *con = subdevice<floppy_connector>(name);
137137         if(con) {
138138            flopi[i].dev = con->get_device();
139            assert(flopi[i].dev != NULL);
140            flopi[i].dev->setup_index_pulse_cb(floppy_image_device::index_pulse_cb(FUNC(upd765_family_device::index_callback), this));
139            if (flopi[i].dev != NULL)
140               flopi[i].dev->setup_index_pulse_cb(floppy_image_device::index_pulse_cb(FUNC(upd765_family_device::index_callback), this));
141141         } else
142142            flopi[i].dev = NULL;
143143      } else
r26361r26362
12281228   case C_SENSE_DRIVE_STATUS: {
12291229      floppy_info &fi = flopi[command[1] & 3];
12301230      main_phase = PHASE_RESULT;
1231      result[0] = ST3_TS;
1231      result[0] = command[1] & 7;
12321232      if(fi.ready)
12331233         result[0] |= ST3_RY;
12341234      if(fi.dev)
12351235         result[0] |=
12361236            (fi.dev->wpt_r() ? ST3_WP : 0x00) |
12371237            (fi.dev->trk00_r() ? 0x00 : ST3_T0) |
1238            (fi.dev->ss_r() ? 0x04 : 0x00) |
1239            (command[1] & 3);
1238            (fi.dev->twosid_r() ? 0x00 : ST3_TS);
12401239      logerror("%s: command sense drive status %d (%02x)\n", tag(), fi.id, result[0]);
12411240      result_pos = 1;
12421241      break;

Previous 199869 Revisions Next


© 1997-2024 The MAME Team