From 71c8e5edc8b437ece6b1dcfd1ac0ec47b8f89781 Mon Sep 17 00:00:00 2001 From: Matt Jenkins Date: Mon, 1 Sep 2025 20:22:20 +0100 Subject: [PATCH] Fixed and working --- README.md | 2 ++ mfm/pd.py | 11 ++++++----- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 31bae9a..e897406 100644 --- a/README.md +++ b/README.md @@ -6,3 +6,5 @@ Original project: https://www.sardis-technologies.com/ufdr/pulseview.htm * Fixed for modern PulseView * Ported to support DSView * Added support for hard drives + +Thanks to **rasz_pl** for the bulk of the work diff --git a/mfm/pd.py b/mfm/pd.py index 1c36b58..f2069c3 100644 --- a/mfm/pd.py +++ b/mfm/pd.py @@ -66,10 +66,11 @@ class Decoder(srd.Decoder): outputs = ['mfm'] tags = ['Disk', 'PC'] channels = ( - {'id': 'data', 'name': 'Read data', 'desc': 'channel 0', 'idn':'dec_mfm_chan_data'}, - {'id': 'extra', 'name': 'Extra pulses', 'desc': 'channel 1', 'idn':'dec_mfm_chan_extra'}, - {'id': 'suppress', 'name': 'Suppress pulses', 'desc': 'channel 2', 'idn':'dec_mfm_chan_suppress'}, + {'id': 'data', 'type': 0, 'name': 'Read data', 'desc': 'channel 0', 'idn':'dec_mfm_chan_data'}, + {'id': 'extra', 'type': 107, 'name': 'Extra pulses', 'desc': 'channel 1', 'idn':'dec_mfm_chan_extra'}, + {'id': 'suppress', 'type': 107, 'name': 'Suppress pulses', 'desc': 'channel 2', 'idn':'dec_mfm_chan_suppress'}, ) + annotations = ( ('erw', 'erw'), ('unk', 'unknown'), @@ -1024,9 +1025,9 @@ class Decoder(srd.Decoder): # extra pulses on channel 1, and disable/suppress signal on channel 2. if self.rising_edge: - pin = self.wait([{0: 'r', 2: 'l'}, {1: 'r', 2: 'l'}]) + (data_pin, extra_pin, suppress_pin) = self.wait([{0: 'r', 2: 'l'}, {1: 'r', 2: 'l'}]) else: - pin = self.wait([{0: 'f', 2: 'l'}, {1: 'r', 2: 'l'}]) + (data_pin, extra_pin, suppress_pin) = self.wait([{0: 'f', 2: 'l'}, {1: 'r', 2: 'l'}]) # Display summary report on last annotation row. Reporting # sample number must be on or before last leading edge.