summaryrefslogtreecommitdiffstatshomepage
path: root/src
diff options
context:
space:
mode:
authorGravatarGravatar smf- <smf-@users.noreply.github.com>2014-01-10 16:42:04 +0000
committerGravatarGravatar smf- <smf-@users.noreply.github.com>2014-01-10 16:42:04 +0000
commitd208600d687105adca80a1d4a5f5463bcccca041 (patch)
tree07480df80c19754185552c48c7849a3fc1370855 /src
parent45f17e9c0f92f3a3b229320b99c1283b8efccd70 (diff)
moved variables (nw)
Diffstat (limited to 'src')
-rw-r--r--src/emu/machine/mos6551.c24
-rw-r--r--src/emu/machine/z80dart.c26
2 files changed, 25 insertions, 25 deletions
diff --git a/src/emu/machine/mos6551.c b/src/emu/machine/mos6551.c
index 3818f19071e..e50cf53c420 100644
--- a/src/emu/machine/mos6551.c
+++ b/src/emu/machine/mos6551.c
@@ -202,6 +202,18 @@ void mos6551_device::update_serial()
{
int brg = m_ctrl & CTRL_BRG_MASK;
+ int num_data_bits = 8;
+ int stop_bit_count = 1;
+ int parity_code = PARITY_NONE;
+
+ switch (m_ctrl & CTRL_WL_MASK)
+ {
+ case CTRL_WL_8: num_data_bits = 8; break;
+ case CTRL_WL_7: num_data_bits = 7; break;
+ case CTRL_WL_6: num_data_bits = 6; break;
+ case CTRL_WL_5: num_data_bits = 5; break;
+ }
+
set_data_frame(num_data_bits, stop_bit_count, parity_code, false);
if (brg == CTRL_BRG_16X_EXTCLK)
@@ -223,18 +235,6 @@ void mos6551_device::update_serial()
{
set_rcv_rate(m_ext_rxc / 16);
}
-
- int num_data_bits = 8;
- int stop_bit_count = 1;
- int parity_code = PARITY_NONE;
-
- switch (m_ctrl & CTRL_WL_MASK)
- {
- case CTRL_WL_8: num_data_bits = 8; break;
- case CTRL_WL_7: num_data_bits = 7; break;
- case CTRL_WL_6: num_data_bits = 6; break;
- case CTRL_WL_5: num_data_bits = 5; break;
- }
}
if (m_cmd & CMD_DTR)
diff --git a/src/emu/machine/z80dart.c b/src/emu/machine/z80dart.c
index fe36bb6152a..4dcd79289e3 100644
--- a/src/emu/machine/z80dart.c
+++ b/src/emu/machine/z80dart.c
@@ -1303,10 +1303,22 @@ WRITE_LINE_MEMBER( z80dart_channel::txc_w )
void z80dart_channel::update_serial()
{
- int clocks = get_clock_mode();
+ int num_data_bits = get_rx_word_length();
+ int stop_bit_count = get_stop_bits();
+ int parity_code = PARITY_NONE;
+
+ if (m_wr[4] & WR4_PARITY_ENABLE)
+ {
+ if (m_wr[4] & WR4_PARITY_EVEN)
+ parity_code = PARITY_EVEN;
+ else
+ parity_code = PARITY_ODD;
+ }
set_data_frame(num_data_bits, stop_bit_count, parity_code, false);
+ int clocks = get_clock_mode();
+
if (m_rxc > 0)
{
set_rcv_rate(m_rxc / clocks);
@@ -1316,18 +1328,6 @@ void z80dart_channel::update_serial()
{
set_tra_rate(m_txc / clocks);
}
-
- int num_data_bits = get_rx_word_length();
- int stop_bit_count = get_stop_bits();
- int parity_code = PARITY_NONE;
-
- if (m_wr[4] & WR4_PARITY_ENABLE)
- {
- if (m_wr[4] & WR4_PARITY_EVEN)
- parity_code = PARITY_EVEN;
- else
- parity_code = PARITY_ODD;
- }
}