trunk/src/emu/machine/upd765.c
| r19400 | r19401 | |
| 1182 | 1182 | case C_SENSE_DRIVE_STATUS: { |
| 1183 | 1183 | floppy_info &fi = flopi[command[1] & 3]; |
| 1184 | 1184 | main_phase = PHASE_RESULT; |
| 1185 | | result[0] = 0x08; |
| 1186 | | if(!fi.ready) |
| 1187 | | result[0] |= 0x20; |
| 1185 | result[0] = ST3_TS; |
| 1186 | if(fi.ready) |
| 1187 | result[0] |= ST3_RY; |
| 1188 | 1188 | if(fi.dev) |
| 1189 | 1189 | result[0] |= |
| 1190 | | (fi.dev->wpt_r() ? 0x40 : 0x00) | |
| 1191 | | (fi.dev->trk00_r() ? 0x00 : 0x10) | |
| 1190 | (fi.dev->wpt_r() ? ST3_WP : 0x00) | |
| 1191 | (fi.dev->trk00_r() ? 0x00 : ST3_T0) | |
| 1192 | 1192 | (fi.dev->ss_r() ? 0x04 : 0x00) | |
| 1193 | 1193 | (command[1] & 3); |
| 1194 | | logerror("%s: command sense drive status (%02x)\n", tag(), result[0]); |
| 1194 | logerror("%s: command sense drive status %d (%02x)\n", tag(), fi.id, result[0]); |
| 1195 | 1195 | result_pos = 1; |
| 1196 | 1196 | break; |
| 1197 | 1197 | } |