src/mess/machine/wd17xx.c
| r7962 | r7963 | |
| 313 | 313 | UINT8 read_cmd; /* last read command issued */ |
| 314 | 314 | UINT8 write_cmd; /* last write command issued */ |
| 315 | 315 | INT8 direction; /* last step direction */ |
| 316 | UINT8 last_command_data; /* last command data */ |
| 316 | 317 | |
| 317 | 318 | UINT8 status_drq; /* status register data request bit */ |
| 318 | 319 | UINT8 busy_count; /* how long to keep busy bit set */ |
| r7962 | r7963 | |
| 464 | 465 | static TIMER_CALLBACK( wd17xx_command_callback ) |
| 465 | 466 | { |
| 466 | 467 | running_device *device = (running_device *)ptr; |
| 467 | | wd17xx_set_intrq(device); |
| 468 | wd1770_state *w = get_safe_token(device); |
| 469 | |
| 470 | if (w->last_command_data != FDC_FORCE_INT) |
| 471 | { |
| 472 | wd17xx_set_intrq(device); |
| 473 | } |
| 468 | 474 | } |
| 469 | 475 | |
| 470 | 476 | /* set drq after delay */ |
| r7962 | r7963 | |
| 1424 | 1430 | { |
| 1425 | 1431 | logerror("wd17xx_data_r: (no new data) $%02X (data_count %d)\n", w->data, w->data_count); |
| 1426 | 1432 | } |
| 1433 | |
| 1427 | 1434 | return w->data; |
| 1428 | 1435 | } |
| 1429 | 1436 | |
| r7962 | r7963 | |
| 1432 | 1439 | { |
| 1433 | 1440 | wd1770_state *w = get_safe_token(device); |
| 1434 | 1441 | |
| 1442 | w->last_command_data = data; |
| 1443 | |
| 1435 | 1444 | /* only the WD1770 and WD1772 have a 'motor on' line */ |
| 1436 | 1445 | if (device->type == WD1770 || device->type == WD1772) |
| 1437 | 1446 | { |