Previous 199869 Revisions Next

r26601 Thursday 12th December, 2013 at 21:40:27 UTC by Michael Zapf
(MESS) ti99: Fixed TI floppy disk controller. [Michael Zapf]
[src/mess/machine/ti99]ti_fdc.c

trunk/src/mess/machine/ti99/ti_fdc.c
r26600r26601
7878{
7979   // This is the wait state logic
8080   if (TRACE_SIGNALS) logerror("tifdc: address=%04x, DRQ=%d, INTRQ=%d, MOTOR=%d\n", m_address & 0xffff, m_DRQ, m_IRQ, m_DVENA);
81   line_state nready = (m_WDsel &&             // Are we accessing 5ffx?
81   line_state nready = (m_WDsel &&             // Are we accessing 5ffx (even addr)?
8282         m_WAITena &&                        // and the wait state generation is active (SBO 2)
8383         (m_DRQ==CLEAR_LINE) &&              // and we are waiting for a byte
8484         (m_IRQ==CLEAR_LINE) &&              // and there is no interrupt yet
8585         (m_DVENA==ASSERT_LINE)              // and the motor is turning?
8686         )? ASSERT_LINE : CLEAR_LINE;        // In that case, clear READY and thus trigger wait states
8787
88   if (TRACE_READY) if (nready==ASSERT_LINE) logerror("tifdc: READY line = %d\n", (nready==CLEAR_LINE)? 1:0);
88   if (TRACE_READY) logerror("tifdc: READY line = %d\n", (nready==CLEAR_LINE)? 1:0);
8989   m_slot->set_ready((nready==CLEAR_LINE)? ASSERT_LINE : CLEAR_LINE);
9090}
9191
r26600r26601
102102   if (TRACE_ADDRESS) logerror("tifdc: set address = %04x\n", offset & 0xffff);
103103
104104   // Is the WD chip on the card being selected?
105   m_WDsel = m_inDsrArea && ((m_address & 0x1ff0)==0x1ff0);
105   m_WDsel = m_inDsrArea && ((m_address & 0x1ff1)==0x1ff0);
106106
107107   // Clear or assert the outgoing READY line
108108   set_ready_line();

Previous 199869 Revisions Next


© 1997-2024 The MAME Team