summaryrefslogtreecommitdiffstatshomepage
path: root/src
diff options
context:
space:
mode:
author Michael Zapf <Michael.Zapf@mizapf.de>2018-05-09 23:19:27 +0200
committer Michael Zapf <Michael.Zapf@mizapf.de>2018-05-09 23:19:27 +0200
commit48dad9990ee986b2933cb9dc3b325a72f23deb07 (patch)
treef2ddb21850233465ffd05f27b103c5dba177893b /src
parent68b39c7b6bfab82f63874336af39150cd1f3c756 (diff)
Fixed bitrate autodetect (nw)
Diffstat (limited to 'src')
-rw-r--r--src/lib/formats/hxchfe_dsk.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/lib/formats/hxchfe_dsk.cpp b/src/lib/formats/hxchfe_dsk.cpp
index f85b1d31678..15fa48b240a 100644
--- a/src/lib/formats/hxchfe_dsk.cpp
+++ b/src/lib/formats/hxchfe_dsk.cpp
@@ -544,11 +544,12 @@ void hfe_format::generate_hfe_bitstream_from_track(int cyl, int head, int& sampl
bool mfm_recording = false;
int time0 = 0;
int minflux = 4000;
+ int fluxlen = 0;
// Skip the beginning (may have a short cell)
for (int i=2; (i < tbuf.size()-1) && (time0 < 2000000) && !mfm_recording; i++)
{
- int time0 = tbuf[i] & floppy_image::TIME_MASK;
- int fluxlen = (tbuf[i+1] & floppy_image::TIME_MASK) - time0;
+ time0 = tbuf[i] & floppy_image::TIME_MASK;
+ fluxlen = (tbuf[i+1] & floppy_image::TIME_MASK) - time0;
if ((fluxlen < 3500) || (fluxlen > 5500 && fluxlen < 6500))
mfm_recording = true;
if (fluxlen < minflux) minflux = fluxlen;