trunk/src/emu/machine/i8251.c
r22875 | r22876 | |
390 | 390 | |
391 | 391 | LOG(("Character length: %d\n", (((data>>2) & 0x03)+5))); |
392 | 392 | |
| 393 | int parity = SERIAL_PARITY_NONE; |
| 394 | |
393 | 395 | if (data & (1<<4)) |
394 | 396 | { |
395 | 397 | LOG(("enable parity checking\n")); |
| 398 | |
| 399 | if (data & (1<<5)) |
| 400 | { |
| 401 | LOG(("even parity\n")); |
| 402 | parity = SERIAL_PARITY_EVEN; |
| 403 | } |
| 404 | else |
| 405 | { |
| 406 | LOG(("odd parity\n")); |
| 407 | parity = SERIAL_PARITY_ODD; |
| 408 | } |
396 | 409 | } |
397 | 410 | else |
398 | 411 | { |
399 | 412 | LOG(("parity check disabled\n")); |
400 | 413 | } |
401 | 414 | |
402 | | if (data & (1<<5)) |
403 | 415 | { |
404 | | LOG(("even parity\n")); |
405 | | } |
406 | | else |
407 | | { |
408 | | LOG(("odd parity\n")); |
409 | | } |
410 | | |
411 | | { |
412 | 416 | UINT8 stop_bit_length; |
413 | 417 | |
414 | 418 | stop_bit_length = (data>>6) & 0x03; |
r22875 | r22876 | |
446 | 450 | } |
447 | 451 | |
448 | 452 | int word_length = ((data>>2) & 0x03)+5; |
449 | | int parity = SERIAL_PARITY_NONE; |
450 | 453 | int stop_bit_count = 1; |
451 | 454 | switch ((data>>6) & 0x03) |
452 | 455 | { |
r22875 | r22876 | |
667 | 670 | |
668 | 671 | /* writing clears */ |
669 | 672 | m_status &=~I8251_STATUS_TX_READY; |
| 673 | m_status &=~I8251_STATUS_TX_EMPTY; |
670 | 674 | |
671 | 675 | /* if transmitter is active, then tx empty will be signalled */ |
672 | 676 | |
673 | 677 | update_tx_ready(); |
| 678 | update_tx_empty(); |
674 | 679 | } |
675 | 680 | |
676 | 681 | |
trunk/src/mess/drivers/softbox.c
r22875 | r22876 | |
247 | 247 | WRITE_LINE_MEMBER( softbox_state::fr_w ) |
248 | 248 | { |
249 | 249 | m_rx_clock++; |
250 | | logerror("rx %u\n", m_rx_clock); |
| 250 | |
251 | 251 | if (m_rx_clock & 0x10) |
252 | 252 | { |
253 | 253 | m_rx_clock = 0; |
r22875 | r22876 | |
258 | 258 | WRITE_LINE_MEMBER( softbox_state::ft_w ) |
259 | 259 | { |
260 | 260 | m_tx_clock++; |
261 | | logerror("tx %u\n", m_tx_clock); |
| 261 | |
262 | 262 | if (m_tx_clock & 0x10) |
263 | 263 | { |
264 | 264 | m_tx_clock = 0; |
r22875 | r22876 | |
285 | 285 | DEVICE_INPUT_DEFAULTS( "TERM_FRAME", 0x30, 0x10 ) // 7E1 |
286 | 286 | DEVICE_INPUT_DEFAULTS_END |
287 | 287 | |
288 | | WRITE8_MEMBER( softbox_state::dummy_w ) |
289 | | { |
290 | | // handled in usart_intf |
291 | | } |
292 | | |
293 | 288 | static const serial_terminal_interface terminal_intf = |
294 | 289 | { |
295 | | DEVCB_DRIVER_MEMBER(softbox_state, dummy_w) |
| 290 | DEVCB_NULL |
296 | 291 | }; |
297 | 292 | |
298 | 293 | |