summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author Michael Zapf <Michael.Zapf@mizapf.de>2015-08-23 12:59:06 +0200
committer Michael Zapf <Michael.Zapf@mizapf.de>2015-08-23 12:59:40 +0200
commita7b945eda6d2476da11b20de21dc1d930f7ca9ff (patch)
treed57277a3191b717f782d2e5b2d8d36f3cc3f72b5
parent2af923ff8cce61caaf6ac4335052a6692281ba32 (diff)
Invoke step on cylinder change
-rw-r--r--src/emu/imagedev/floppy.c21
-rw-r--r--src/emu/imagedev/floppy.h1
2 files changed, 6 insertions, 16 deletions
diff --git a/src/emu/imagedev/floppy.c b/src/emu/imagedev/floppy.c
index 01d2872a9a7..b85f60d7ef7 100644
--- a/src/emu/imagedev/floppy.c
+++ b/src/emu/imagedev/floppy.c
@@ -591,7 +591,11 @@ void floppy_image_device::stp_w(int state)
if ( cyl < tracks-1 ) cyl++;
}
if(ocyl != cyl)
+ {
if (TRACE_STEP) logerror("%s: track %d\n", tag(), cyl);
+ // Do we want a stepper sound?
+ if (m_make_sound) m_sound_out->step();
+ }
/* Update disk detection if applicable */
if (exists())
{
@@ -599,8 +603,6 @@ void floppy_image_device::stp_w(int state)
}
}
subcyl = 0;
- // Do we want a stepper sound?
- if (m_make_sound) m_sound_out->step();
}
}
@@ -1084,7 +1086,6 @@ void floppy_sound_device::register_for_save_states()
save_item(NAME(m_samplepos_step));
save_item(NAME(m_step_mintime));
save_item(NAME(m_step_time));
- save_item(NAME(m_step_ignore_time));
}
void floppy_sound_device::device_start()
@@ -1111,9 +1112,6 @@ void floppy_sound_device::device_start()
m_motor_time = 0;
m_step_time = 0;
- // Number of updates until the step pulse may restart the sample
- m_step_ignore_time = 44; // 1 ms
-
// Initialize position
m_samplepos_step = m_samplestart_step;
m_samplepos_motor = m_samplestart_motor;
@@ -1131,19 +1129,12 @@ void floppy_sound_device::motor(bool state)
/*
Activate the step sound.
-
- Since some drives may use another polarity of the step pulse, we remove
- the state dependence. Whenever something happens with the head, the
- sound starts, unless it is too close to the previous sound event.
*/
void floppy_sound_device::step()
{
m_sound->update(); // required
- if (m_step_time < m_step_mintime - m_step_ignore_time)
- {
- m_step_time = m_step_mintime;
- m_samplepos_step = m_samplestart_step;
- }
+ m_step_time = m_step_mintime;
+ m_samplepos_step = m_samplestart_step;
}
//-------------------------------------------------
diff --git a/src/emu/imagedev/floppy.h b/src/emu/imagedev/floppy.h
index 193e20ff788..95f2442d308 100644
--- a/src/emu/imagedev/floppy.h
+++ b/src/emu/imagedev/floppy.h
@@ -299,7 +299,6 @@ private:
int m_samplepos_step;
int m_step_mintime;
int m_step_time;
- int m_step_ignore_time;
};
class floppy_connector: public device_t,