trunk/src/emu/machine/upd765.c
| r26361 | r26362 | |
| 136 | 136 | floppy_connector *con = subdevice<floppy_connector>(name); |
| 137 | 137 | if(con) { |
| 138 | 138 | 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)); |
| 141 | 141 | } else |
| 142 | 142 | flopi[i].dev = NULL; |
| 143 | 143 | } else |
| r26361 | r26362 | |
| 1228 | 1228 | case C_SENSE_DRIVE_STATUS: { |
| 1229 | 1229 | floppy_info &fi = flopi[command[1] & 3]; |
| 1230 | 1230 | main_phase = PHASE_RESULT; |
| 1231 | | result[0] = ST3_TS; |
| 1231 | result[0] = command[1] & 7; |
| 1232 | 1232 | if(fi.ready) |
| 1233 | 1233 | result[0] |= ST3_RY; |
| 1234 | 1234 | if(fi.dev) |
| 1235 | 1235 | result[0] |= |
| 1236 | 1236 | (fi.dev->wpt_r() ? ST3_WP : 0x00) | |
| 1237 | 1237 | (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); |
| 1240 | 1239 | logerror("%s: command sense drive status %d (%02x)\n", tag(), fi.id, result[0]); |
| 1241 | 1240 | result_pos = 1; |
| 1242 | 1241 | break; |