src/mess/machine/wd1772.c
| r12869 | r12870 | |
| 369 | 369 | void wd1772_t::do_generic() |
| 370 | 370 | { |
| 371 | 371 | switch(sub_state) { |
| 372 | case IDLE: |
| 373 | case SCAN_ID: |
| 374 | case SECTOR_READ: |
| 375 | break; |
| 376 | |
| 372 | 377 | case SEEK_WAIT_STEP_TIME: |
| 373 | 378 | sub_state = SEEK_WAIT_STEP_TIME_DONE; |
| 374 | 379 | break; |
| r12869 | r12870 | |
| 697 | 702 | if(cur_live.state == IDLE || cur_live.next_state != -1) |
| 698 | 703 | return; |
| 699 | 704 | |
| 700 | | if(limit == attotime::never) |
| 705 | if(limit == attotime::never) { |
| 701 | 706 | limit = floppy->time_next_index(); |
| 707 | if(limit == attotime::never) { |
| 708 | // Happens when there's no disk, hence no index pulse |
| 709 | // Force a sync from time to time in that case, so that |
| 710 | // the main cpu timeout isn't too painful. Avoid looping |
| 711 | // into infinity looking for data too. |
| 702 | 712 | |
| 713 | limit = machine().time() + attotime::from_msec(1); |
| 714 | t_gen->adjust(attotime::from_msec(1)); |
| 715 | } |
| 716 | } |
| 717 | |
| 703 | 718 | // fprintf(stderr, "%s: live_run(%s)\n", ttsn().cstr(), tts(limit).cstr()); |
| 704 | 719 | |
| 705 | 720 | for(;;) { |