diff options
author | cracyc <cracyc@users.noreply.github.com> | 2019-11-26 14:20:48 -0600 |
---|---|---|
committer | cracyc <cracyc@users.noreply.github.com> | 2019-11-26 14:20:48 -0600 |
commit | 6a42b2e1527501c042d3df62c8feb3306caaf01c (patch) | |
tree | e34370700bca957812b4df66092107743f34d6c4 | |
parent | 248eb9a412bbddff7b40245e6b063c352937e409 (diff) |
bw12: add motor off delay (nw)
-rw-r--r-- | src/mame/drivers/bw12.cpp | 43 | ||||
-rw-r--r-- | src/mame/includes/bw12.h | 2 |
2 files changed, 12 insertions, 33 deletions
diff --git a/src/mame/drivers/bw12.cpp b/src/mame/drivers/bw12.cpp index afc4676795f..9ba20322083 100644 --- a/src/mame/drivers/bw12.cpp +++ b/src/mame/drivers/bw12.cpp @@ -73,41 +73,16 @@ void bw12_state::bankswitch() membank("bank1")->set_entry(m_bank); } -void bw12_state::floppy_motor_off() +TIMER_DEVICE_CALLBACK_MEMBER(bw12_state::floppy_motor_off_tick) { + if (m_motor0 || m_motor1) + return; m_floppy0->mon_w(1); m_floppy1->mon_w(1); m_motor_on = 0; } -TIMER_DEVICE_CALLBACK_MEMBER(bw12_state::floppy_motor_off_tick) -{ - floppy_motor_off(); -} - -void bw12_state::set_floppy_motor_off_timer() -{ - if (m_motor0 || m_motor1) - { - m_motor_on = 1; - m_floppy_timer->enable(false); - } - else - { - /* trigger floppy motor off NE556 timer */ - /* - - R18 = RES_K(100) - C11 = CAP_U(4.7) - - */ - - //m_floppy_timer->adjust(attotime::zero); - floppy_motor_off(); - } -} - void bw12_state::write_ls259(int address, int data) { switch (address) @@ -145,10 +120,16 @@ void bw12_state::write_ls259(int address, int data) break; } - m_motor_on = m_motor0 || m_motor1; - m_floppy0->mon_w(!m_motor_on); - m_floppy1->mon_w(!m_motor_on); + if (m_motor0 || m_motor1) + { + m_motor_on = 1; + m_floppy0->mon_w(0); + m_floppy1->mon_w(0); + m_floppy_timer->adjust(attotime::never); + } + else + m_floppy_timer->adjust(attotime::from_msec(170)); } WRITE8_MEMBER( bw12_state::ls259_w ) diff --git a/src/mame/includes/bw12.h b/src/mame/includes/bw12.h index 893dad9d27c..715001f08bc 100644 --- a/src/mame/includes/bw12.h +++ b/src/mame/includes/bw12.h @@ -62,8 +62,6 @@ public: { } void bankswitch(); - void floppy_motor_off(); - void set_floppy_motor_off_timer(); void write_ls259(int address, int data); DECLARE_READ8_MEMBER( ls259_r ); |