Merged in changes from earlier commit.

This commit is contained in:
Curt Coder 2009-02-09 10:09:19 +00:00
parent 08a218dc80
commit 87ba17e145

View File

@ -183,8 +183,7 @@ static DEVICE_RESET( acia6850 )
{ {
acia_p->first_reset = 0; acia_p->first_reset = 0;
acia_p->rts = 1; RTS(1);
RTS(acia_p->rts);
} }
else else
{ {
@ -275,7 +274,6 @@ WRITE8_DEVICE_HANDLER( acia6850_ctrl_w )
int wordsel; int wordsel;
int divide; int divide;
acia_p->ctrl = data;
// Counter Divide Select Bits // Counter Divide Select Bits
@ -337,21 +335,26 @@ WRITE8_DEVICE_HANDLER( acia6850_ctrl_w )
break; break;
} }
// After writing the word type, start receive clock // After writing the word type, set the rx/tx clocks (provided the divide values have changed)
if (!acia_p->reset) if ((acia_p->ctrl ^ data) & CR1_0)
{ {
if (acia_p->rx_clock) if (!acia_p->reset)
{ {
attotime rx_period = attotime_mul(ATTOTIME_IN_HZ(acia_p->rx_clock), acia_p->divide); if (acia_p->rx_clock)
timer_adjust_periodic(acia_p->rx_timer, rx_period, 0, rx_period); {
} attotime rx_period = attotime_mul(ATTOTIME_IN_HZ(acia_p->rx_clock), acia_p->divide);
if (acia_p->tx_clock) timer_adjust_periodic(acia_p->rx_timer, rx_period, 0, rx_period);
{ }
attotime tx_period = attotime_mul(ATTOTIME_IN_HZ(acia_p->tx_clock), acia_p->divide);
timer_adjust_periodic(acia_p->tx_timer, tx_period, 0, tx_period); if (acia_p->tx_clock)
{
attotime tx_period = attotime_mul(ATTOTIME_IN_HZ(acia_p->tx_clock), acia_p->divide);
timer_adjust_periodic(acia_p->tx_timer, tx_period, 0, tx_period);
}
} }
} }
acia_p->ctrl = data;
} }