Previous 15994 Revisions Next

r13733 Tuesday 27th December, 2011 at 11:29:48 UTC by Olivier Galibert
wd1772: cleanups (nw)
[src/mess/machine]wd1772.c

src/mess/machine/wd1772.c
r13732r13733
4848   counter = 0;
4949   status_type_1 = true;
5050   last_dir = 1;
51   cur_live.tm = attotime::never;
5251   intrq = false;
5352   drq = false;
53   live_abort();
5454}
5555
5656void wd177x_t::set_floppy(floppy_image_device *_floppy)
r13732r13733
10201020      } else {
10211021         //          fprintf(stderr, "%s: Committing (%s)\n", ttsn().cstr(), tts(cur_live.tm).cstr());
10221022         cur_live.pll.commit(floppy, cur_live.tm);
1023         if(cur_live.next_state != -1)
1023         if(cur_live.next_state != -1) {
10241024            cur_live.state = cur_live.next_state;
1025            cur_live.next_state = -1;
1026         }
10251027         if(cur_live.state == IDLE) {
10261028            cur_live.pll.stop_writing(floppy, cur_live.tm);
10271029            cur_live.tm = attotime::never;
r13732r13733
10341036
10351037void wd177x_t::live_abort()
10361038{
1037   if(cur_live.tm > machine().time()) {
1039   if(!cur_live.tm.is_never() && cur_live.tm > machine().time()) {
10381040      rollback();
10391041      live_run(machine().time());
10401042   }
r13732r13733
16491651
16501652bool wd177x_t::pll_t::write_next_bit(bool bit, attotime &tm, floppy_image_device *floppy, attotime limit)
16511653{
1652   if(write_start_time == attotime::never) {
1654   if(write_start_time.is_never()) {
16531655      write_start_time = ctime;
16541656      write_position = 0;
16551657   }
r13732r13733
16791681
16801682void wd177x_t::pll_t::commit(floppy_image_device *floppy, attotime tm)
16811683{
1682   if(write_start_time == attotime::never || tm == write_start_time)
1684   if(write_start_time.is_never() || tm == write_start_time)
16831685      return;
16841686
16851687   if(floppy)

Previous 15994 Revisions Next


© 1998-2018 The MESS Team