mirror of
https://github.com/holub/mame
synced 2025-07-02 16:49:22 +03:00
iwm/swim: Fix annoyingly subtle write issue in the iwm and add some paranoia
This commit is contained in:
parent
1c177c16a6
commit
e35f24a487
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user