diff options
author | Olivier Galibert <galibert@pobox.com> | 2021-03-02 09:31:47 +0100 |
---|---|---|
committer | Olivier Galibert <galibert@pobox.com> | 2021-03-02 09:32:11 +0100 |
commit | e35f24a48772987d5a3c9d28e44f7aa245d3e070 (patch) | |
tree | 9b1454159bb982ab992d077ba8f5fc8c5b11c0e3 | |
parent | 1c177c16a6e504e46e1a56fb93bf63861bae9636 (diff) |
iwm/swim: Fix annoyingly subtle write issue in the iwm and add some paranoia
-rw-r--r-- | src/devices/machine/iwm.cpp | 8 | ||||
-rw-r--r-- | src/devices/machine/iwm.h | 3 | ||||
-rw-r--r-- | src/devices/machine/swim1.cpp | 6 | ||||
-rw-r--r-- | src/devices/machine/swim1.h | 3 |
4 files changed, 17 insertions, 3 deletions
diff --git a/src/devices/machine/iwm.cpp b/src/devices/machine/iwm.cpp index 4a300ecfb81..e2d1c0202be 100644 --- a/src/devices/machine/iwm.cpp +++ b/src/devices/machine/iwm.cpp @@ -469,6 +469,8 @@ void iwm_device::sync() m_flux_write_start = 0; m_whd &= ~0x40; m_last_sync = next_sync; + m_rw_state = SW_UNDERRUN; + } else { m_wsh = m_data; m_rw_state = SW_WINDOW_MIDDLE; @@ -490,7 +492,7 @@ void iwm_device::sync() case SW_WINDOW_END: if(m_flux_write_count == m_flux_write.size()) - flush_write(next_sync); + flush_write(); if(m_mode & 0x02) { m_rw_bit_count --; if(m_rw_bit_count == 0) { @@ -509,6 +511,10 @@ void iwm_device::sync() m_rw_state = SW_WINDOW_MIDDLE; } break; + + case SW_UNDERRUN: + m_last_sync = next_sync; + break; } } break; diff --git a/src/devices/machine/iwm.h b/src/devices/machine/iwm.h index 9f77b1c53fc..4cb4edb18cf 100644 --- a/src/devices/machine/iwm.h +++ b/src/devices/machine/iwm.h @@ -53,7 +53,8 @@ private: SR_WINDOW_EDGE_1, SW_WINDOW_LOAD, SW_WINDOW_MIDDLE, - SW_WINDOW_END + SW_WINDOW_END, + SW_UNDERRUN, }; floppy_image_device *m_floppy; diff --git a/src/devices/machine/swim1.cpp b/src/devices/machine/swim1.cpp index 03dbe46cd2d..f5f82d27566 100644 --- a/src/devices/machine/swim1.cpp +++ b/src/devices/machine/swim1.cpp @@ -768,6 +768,8 @@ void swim1_device::iwm_sync() m_flux_write_start = 0; m_iwm_whd &= ~0x40; m_last_sync = next_sync; + m_iwm_rw_state = SW_UNDERRUN; + } else { m_iwm_wsh = m_iwm_data; m_iwm_rw_state = SW_WINDOW_MIDDLE; @@ -802,6 +804,10 @@ void swim1_device::iwm_sync() m_iwm_rw_state = SW_WINDOW_MIDDLE; } break; + + case SW_UNDERRUN: + m_last_sync = next_sync; + break; } } break; diff --git a/src/devices/machine/swim1.h b/src/devices/machine/swim1.h index fdbfb57d474..1ce4f7f3a56 100644 --- a/src/devices/machine/swim1.h +++ b/src/devices/machine/swim1.h @@ -51,7 +51,8 @@ private: SR_WINDOW_EDGE_1, SW_WINDOW_LOAD, SW_WINDOW_MIDDLE, - SW_WINDOW_END + SW_WINDOW_END, + SW_UNDERRUN, }; // ism buffered byte marks |