src/mess/machine/wd1772.c
| r13732 | r13733 | |
| 48 | 48 | counter = 0; |
| 49 | 49 | status_type_1 = true; |
| 50 | 50 | last_dir = 1; |
| 51 | | cur_live.tm = attotime::never; |
| 52 | 51 | intrq = false; |
| 53 | 52 | drq = false; |
| 53 | live_abort(); |
| 54 | 54 | } |
| 55 | 55 | |
| 56 | 56 | void wd177x_t::set_floppy(floppy_image_device *_floppy) |
| r13732 | r13733 | |
| 1020 | 1020 | } else { |
| 1021 | 1021 | // fprintf(stderr, "%s: Committing (%s)\n", ttsn().cstr(), tts(cur_live.tm).cstr()); |
| 1022 | 1022 | cur_live.pll.commit(floppy, cur_live.tm); |
| 1023 | | if(cur_live.next_state != -1) |
| 1023 | if(cur_live.next_state != -1) { |
| 1024 | 1024 | cur_live.state = cur_live.next_state; |
| 1025 | cur_live.next_state = -1; |
| 1026 | } |
| 1025 | 1027 | if(cur_live.state == IDLE) { |
| 1026 | 1028 | cur_live.pll.stop_writing(floppy, cur_live.tm); |
| 1027 | 1029 | cur_live.tm = attotime::never; |
| r13732 | r13733 | |
| 1034 | 1036 | |
| 1035 | 1037 | void wd177x_t::live_abort() |
| 1036 | 1038 | { |
| 1037 | | if(cur_live.tm > machine().time()) { |
| 1039 | if(!cur_live.tm.is_never() && cur_live.tm > machine().time()) { |
| 1038 | 1040 | rollback(); |
| 1039 | 1041 | live_run(machine().time()); |
| 1040 | 1042 | } |
| r13732 | r13733 | |
| 1649 | 1651 | |
| 1650 | 1652 | bool wd177x_t::pll_t::write_next_bit(bool bit, attotime &tm, floppy_image_device *floppy, attotime limit) |
| 1651 | 1653 | { |
| 1652 | | if(write_start_time == attotime::never) { |
| 1654 | if(write_start_time.is_never()) { |
| 1653 | 1655 | write_start_time = ctime; |
| 1654 | 1656 | write_position = 0; |
| 1655 | 1657 | } |
| r13732 | r13733 | |
| 1679 | 1681 | |
| 1680 | 1682 | void wd177x_t::pll_t::commit(floppy_image_device *floppy, attotime tm) |
| 1681 | 1683 | { |
| 1682 | | if(write_start_time == attotime::never || tm == write_start_time) |
| 1684 | if(write_start_time.is_never() || tm == write_start_time) |
| 1683 | 1685 | return; |
| 1684 | 1686 | |
| 1685 | 1687 | if(floppy) |