src/mess/machine/wd17xx.c
| r9853 | r9854 | |
| 350 | 350 | /* complete command delay */ |
| 351 | 351 | int complete_command_delay; |
| 352 | 352 | |
| 353 | /* Were we busy when we received a FORCE_INT command */ |
| 354 | UINT8 was_busy; |
| 355 | |
| 353 | 356 | /* Pointer to interface */ |
| 354 | 357 | const wd17xx_interface *intf; |
| 355 | 358 | }; |
| r9853 | r9854 | |
| 1371 | 1374 | result = w->status; |
| 1372 | 1375 | |
| 1373 | 1376 | /* type 1 command or force int command? */ |
| 1374 | | if ((w->command_type==TYPE_I) || (w->command_type==TYPE_IV)) |
| 1377 | if ((w->command_type==TYPE_I) || (w->command_type==TYPE_IV && ! w->was_busy)) |
| 1375 | 1378 | { |
| 1376 | 1379 | result &= ~(STA_1_IPL | STA_1_TRACK0); |
| 1377 | 1380 | |
| r9853 | r9854 | |
| 1470 | 1473 | |
| 1471 | 1474 | w->data_count = 0; |
| 1472 | 1475 | w->data_offset = 0; |
| 1476 | w->was_busy = w->status & STA_2_BUSY; |
| 1473 | 1477 | w->status &= ~STA_2_BUSY; |
| 1474 | | w->status &= ~STA_2_LOST_DAT; |
| 1475 | 1478 | |
| 1476 | 1479 | wd17xx_clear_drq(device); |
| 1477 | 1480 | |
| r9853 | r9854 | |
| 1502 | 1505 | /* terminate command */ |
| 1503 | 1506 | wd17xx_complete_command(device, DELAY_ERROR); |
| 1504 | 1507 | |
| 1505 | | // w->status_ipl = STA_1_IPL; |
| 1506 | | /* w->status_ipl = 0; */ |
| 1507 | | |
| 1508 | 1508 | w->busy_count = 0; |
| 1509 | 1509 | w->command_type = TYPE_IV; |
| 1510 | 1510 | return; |