iwm/swim: Fix annoyingly subtle write issue in the iwm and add some paranoia

This commit is contained in:
Olivier Galibert 2021-03-02 09:31:47 +01:00
parent 1c177c16a6
commit e35f24a487
4 changed files with 17 additions and 3 deletions

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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