src/mess/machine/isa_com.c
| r14668 | r14669 | |
| 8 | 8 | #include "machine/ser_mouse.h" |
| 9 | 9 | #include "machine/terminal.h" |
| 10 | 10 | #include "machine/null_modem.h" |
| 11 | #include "machine/serial.h" |
| 12 | #include "machine/ins8250.h" |
| 11 | 13 | |
| 12 | | /* called when a interrupt is set/cleared from com hardware */ |
| 13 | | static WRITE_LINE_DEVICE_HANDLER( pc_com_interrupt_1 ) |
| 14 | | { |
| 15 | | isa8_com_device *com = downcast<isa8_com_device *>(device->owner()); |
| 16 | | com->m_isa->irq4_w(state); |
| 17 | | } |
| 18 | | |
| 19 | | static WRITE_LINE_DEVICE_HANDLER( pc_com_interrupt_2 ) |
| 20 | | { |
| 21 | | isa8_com_device *com = downcast<isa8_com_device *>(device->owner()); |
| 22 | | com->m_isa->irq3_w(state); |
| 23 | | } |
| 24 | | |
| 25 | | static void pc_com_tx(device_t *uart, UINT8 state, int n) |
| 26 | | { |
| 27 | | isa8_com_device *com = downcast<isa8_com_device *>(uart->owner()); |
| 28 | | com->get_port(n)->tx(state); |
| 29 | | } |
| 30 | | |
| 31 | | static void pc_com_dtr(device_t *uart, UINT8 state, int n) |
| 32 | | { |
| 33 | | isa8_com_device *com = downcast<isa8_com_device *>(uart->owner()); |
| 34 | | com->get_port(n)->dtr_w(state); |
| 35 | | } |
| 36 | | |
| 37 | | static void pc_com_rts(device_t *uart, UINT8 state, int n) |
| 38 | | { |
| 39 | | isa8_com_device *com = downcast<isa8_com_device *>(uart->owner()); |
| 40 | | com->get_port(n)->rts_w(state); |
| 41 | | } |
| 42 | | |
| 43 | | static WRITE_LINE_DEVICE_HANDLER( pc_com_tx_0 ) { pc_com_tx(device, state, 0); } |
| 44 | | static WRITE_LINE_DEVICE_HANDLER( pc_com_dtr_0 ) { pc_com_dtr(device, state, 0); } |
| 45 | | static WRITE_LINE_DEVICE_HANDLER( pc_com_rts_0 ) { pc_com_rts(device, state, 0); } |
| 46 | | |
| 47 | | static WRITE_LINE_DEVICE_HANDLER( pc_com_tx_1 ) { pc_com_tx(device, state, 1); } |
| 48 | | static WRITE_LINE_DEVICE_HANDLER( pc_com_dtr_1 ) { pc_com_dtr(device, state, 1); } |
| 49 | | static WRITE_LINE_DEVICE_HANDLER( pc_com_rts_1 ) { pc_com_rts(device, state, 1); } |
| 50 | | |
| 51 | | static WRITE_LINE_DEVICE_HANDLER( pc_com_tx_2 ) { pc_com_tx(device, state, 2); } |
| 52 | | static WRITE_LINE_DEVICE_HANDLER( pc_com_dtr_2 ) { pc_com_dtr(device, state, 2); } |
| 53 | | static WRITE_LINE_DEVICE_HANDLER( pc_com_rts_2 ) { pc_com_rts(device, state, 2); } |
| 54 | | |
| 55 | | static WRITE_LINE_DEVICE_HANDLER( pc_com_tx_3 ) { pc_com_tx(device, state, 3); } |
| 56 | | static WRITE_LINE_DEVICE_HANDLER( pc_com_dtr_3 ) { pc_com_dtr(device, state, 3); } |
| 57 | | static WRITE_LINE_DEVICE_HANDLER( pc_com_rts_3 ) { pc_com_rts(device, state, 3); } |
| 58 | | |
| 59 | | static void pc_com_rx(device_t *port, UINT8 state, int n) |
| 60 | | { |
| 61 | | isa8_com_device *com = downcast<isa8_com_device *>(port->owner()); |
| 62 | | com->get_uart(n)->rx_w(state); |
| 63 | | } |
| 64 | | |
| 65 | | static void pc_com_dcd(device_t *port, UINT8 state, int n) |
| 66 | | { |
| 67 | | isa8_com_device *com = downcast<isa8_com_device *>(port->owner()); |
| 68 | | com->get_uart(n)->dcd_w(state); |
| 69 | | } |
| 70 | | |
| 71 | | static void pc_com_dsr(device_t *port, UINT8 state, int n) |
| 72 | | { |
| 73 | | isa8_com_device *com = downcast<isa8_com_device *>(port->owner()); |
| 74 | | com->get_uart(n)->dsr_w(state); |
| 75 | | } |
| 76 | | |
| 77 | | static void pc_com_ri(device_t *port, UINT8 state, int n) |
| 78 | | { |
| 79 | | isa8_com_device *com = downcast<isa8_com_device *>(port->owner()); |
| 80 | | com->get_uart(n)->ri_w(state); |
| 81 | | } |
| 82 | | |
| 83 | | static void pc_com_cts(device_t *port, UINT8 state, int n) |
| 84 | | { |
| 85 | | isa8_com_device *com = downcast<isa8_com_device *>(port->owner()); |
| 86 | | com->get_uart(n)->cts_w(state); |
| 87 | | } |
| 88 | | |
| 89 | | static WRITE_LINE_DEVICE_HANDLER( pc_com_rx_0 ) { pc_com_rx(device, state, 0); } |
| 90 | | static WRITE_LINE_DEVICE_HANDLER( pc_com_dcd_0 ) { pc_com_dcd(device, state, 0); } |
| 91 | | static WRITE_LINE_DEVICE_HANDLER( pc_com_dsr_0 ) { pc_com_dsr(device, state, 0); } |
| 92 | | static WRITE_LINE_DEVICE_HANDLER( pc_com_ri_0 ) { pc_com_ri(device, state, 0); } |
| 93 | | static WRITE_LINE_DEVICE_HANDLER( pc_com_cts_0 ) { pc_com_cts(device, state, 0); } |
| 94 | | |
| 95 | | static WRITE_LINE_DEVICE_HANDLER( pc_com_rx_1 ) { pc_com_rx(device, state, 1); } |
| 96 | | static WRITE_LINE_DEVICE_HANDLER( pc_com_dcd_1 ) { pc_com_dcd(device, state, 1); } |
| 97 | | static WRITE_LINE_DEVICE_HANDLER( pc_com_dsr_1 ) { pc_com_dsr(device, state, 1); } |
| 98 | | static WRITE_LINE_DEVICE_HANDLER( pc_com_ri_1 ) { pc_com_ri(device, state, 1); } |
| 99 | | static WRITE_LINE_DEVICE_HANDLER( pc_com_cts_1 ) { pc_com_cts(device, state, 1); } |
| 100 | | |
| 101 | | static WRITE_LINE_DEVICE_HANDLER( pc_com_rx_2 ) { pc_com_rx(device, state, 2); } |
| 102 | | static WRITE_LINE_DEVICE_HANDLER( pc_com_dcd_2 ) { pc_com_dcd(device, state, 2); } |
| 103 | | static WRITE_LINE_DEVICE_HANDLER( pc_com_dsr_2 ) { pc_com_dsr(device, state, 2); } |
| 104 | | static WRITE_LINE_DEVICE_HANDLER( pc_com_ri_2 ) { pc_com_ri(device, state, 2); } |
| 105 | | static WRITE_LINE_DEVICE_HANDLER( pc_com_cts_2 ) { pc_com_cts(device, state, 2); } |
| 106 | | |
| 107 | | static WRITE_LINE_DEVICE_HANDLER( pc_com_rx_3 ) { pc_com_rx(device, state, 3); } |
| 108 | | static WRITE_LINE_DEVICE_HANDLER( pc_com_dcd_3 ) { pc_com_dcd(device, state, 3); } |
| 109 | | static WRITE_LINE_DEVICE_HANDLER( pc_com_dsr_3 ) { pc_com_dsr(device, state, 3); } |
| 110 | | static WRITE_LINE_DEVICE_HANDLER( pc_com_ri_3 ) { pc_com_ri(device, state, 3); } |
| 111 | | static WRITE_LINE_DEVICE_HANDLER( pc_com_cts_3 ) { pc_com_cts(device, state, 3); } |
| 112 | | |
| 113 | 14 | static const ins8250_interface genpc_com_interface[4]= |
| 114 | 15 | { |
| 115 | 16 | { |
| 116 | | DEVCB_LINE(pc_com_tx_0), |
| 117 | | DEVCB_LINE(pc_com_dtr_0), |
| 118 | | DEVCB_LINE(pc_com_rts_0), |
| 119 | | DEVCB_LINE(pc_com_interrupt_1), |
| 17 | DEVCB_DEVICE_LINE_MEMBER("serport0", serial_port_device, tx), |
| 18 | DEVCB_DEVICE_LINE_MEMBER("serport0", rs232_port_device, dtr_w), |
| 19 | DEVCB_DEVICE_LINE_MEMBER("serport0", rs232_port_device, rts_w), |
| 20 | DEVCB_DEVICE_LINE_MEMBER(DEVICE_SELF_OWNER, isa8_com_device, pc_com_interrupt_1), |
| 120 | 21 | DEVCB_NULL, |
| 121 | 22 | DEVCB_NULL |
| 122 | 23 | }, |
| 123 | 24 | { |
| 124 | | DEVCB_LINE(pc_com_tx_1), |
| 125 | | DEVCB_LINE(pc_com_dtr_1), |
| 126 | | DEVCB_LINE(pc_com_rts_1), |
| 127 | | DEVCB_LINE(pc_com_interrupt_2), |
| 25 | DEVCB_DEVICE_LINE_MEMBER("serport1", serial_port_device, tx), |
| 26 | DEVCB_DEVICE_LINE_MEMBER("serport1", rs232_port_device, dtr_w), |
| 27 | DEVCB_DEVICE_LINE_MEMBER("serport1", rs232_port_device, rts_w), |
| 28 | DEVCB_DEVICE_LINE_MEMBER(DEVICE_SELF_OWNER, isa8_com_device, pc_com_interrupt_2), |
| 128 | 29 | DEVCB_NULL, |
| 129 | 30 | DEVCB_NULL |
| 130 | 31 | }, |
| 131 | 32 | { |
| 132 | | DEVCB_LINE(pc_com_tx_2), |
| 133 | | DEVCB_LINE(pc_com_dtr_2), |
| 134 | | DEVCB_LINE(pc_com_rts_2), |
| 135 | | DEVCB_LINE(pc_com_interrupt_1), |
| 33 | DEVCB_DEVICE_LINE_MEMBER("serport2", serial_port_device, tx), |
| 34 | DEVCB_DEVICE_LINE_MEMBER("serport2", rs232_port_device, dtr_w), |
| 35 | DEVCB_DEVICE_LINE_MEMBER("serport2", rs232_port_device, rts_w), |
| 36 | DEVCB_DEVICE_LINE_MEMBER(DEVICE_SELF_OWNER, isa8_com_device, pc_com_interrupt_1), |
| 136 | 37 | DEVCB_NULL, |
| 137 | 38 | DEVCB_NULL |
| 138 | 39 | }, |
| 139 | 40 | { |
| 140 | | DEVCB_LINE(pc_com_tx_3), |
| 141 | | DEVCB_LINE(pc_com_dtr_3), |
| 142 | | DEVCB_LINE(pc_com_rts_3), |
| 143 | | DEVCB_LINE(pc_com_interrupt_2), |
| 41 | DEVCB_DEVICE_LINE_MEMBER("serport3", serial_port_device, tx), |
| 42 | DEVCB_DEVICE_LINE_MEMBER("serport3", rs232_port_device, dtr_w), |
| 43 | DEVCB_DEVICE_LINE_MEMBER("serport3", rs232_port_device, rts_w), |
| 44 | DEVCB_DEVICE_LINE_MEMBER(DEVICE_SELF_OWNER, isa8_com_device, pc_com_interrupt_2), |
| 144 | 45 | DEVCB_NULL, |
| 145 | 46 | DEVCB_NULL |
| 146 | 47 | } |
| r14668 | r14669 | |
| 149 | 50 | static const rs232_port_interface serport_config[4] = |
| 150 | 51 | { |
| 151 | 52 | { |
| 152 | | DEVCB_LINE( pc_com_rx_0 ), |
| 153 | | DEVCB_LINE( pc_com_dcd_0 ), |
| 154 | | DEVCB_LINE( pc_com_dsr_0 ), |
| 155 | | DEVCB_LINE( pc_com_ri_0 ), |
| 156 | | DEVCB_LINE( pc_com_cts_0 ) |
| 53 | DEVCB_DEVICE_LINE_MEMBER("uart_0", ins8250_uart_device, rx_w), |
| 54 | DEVCB_DEVICE_LINE_MEMBER("uart_0", ins8250_uart_device, dcd_w), |
| 55 | DEVCB_DEVICE_LINE_MEMBER("uart_0", ins8250_uart_device, dsr_w), |
| 56 | DEVCB_DEVICE_LINE_MEMBER("uart_0", ins8250_uart_device, ri_w), |
| 57 | DEVCB_DEVICE_LINE_MEMBER("uart_0", ins8250_uart_device, cts_w) |
| 157 | 58 | }, |
| 158 | 59 | { |
| 159 | | DEVCB_LINE( pc_com_rx_1 ), |
| 160 | | DEVCB_LINE( pc_com_dcd_1 ), |
| 161 | | DEVCB_LINE( pc_com_dsr_1 ), |
| 162 | | DEVCB_LINE( pc_com_ri_1 ), |
| 163 | | DEVCB_LINE( pc_com_cts_1 ) |
| 60 | DEVCB_DEVICE_LINE_MEMBER("uart_1", ins8250_uart_device, rx_w), |
| 61 | DEVCB_DEVICE_LINE_MEMBER("uart_1", ins8250_uart_device, dcd_w), |
| 62 | DEVCB_DEVICE_LINE_MEMBER("uart_1", ins8250_uart_device, dsr_w), |
| 63 | DEVCB_DEVICE_LINE_MEMBER("uart_1", ins8250_uart_device, ri_w), |
| 64 | DEVCB_DEVICE_LINE_MEMBER("uart_1", ins8250_uart_device, cts_w) |
| 164 | 65 | }, |
| 165 | 66 | { |
| 166 | | DEVCB_LINE( pc_com_rx_2 ), |
| 167 | | DEVCB_LINE( pc_com_dcd_2 ), |
| 168 | | DEVCB_LINE( pc_com_dsr_2 ), |
| 169 | | DEVCB_LINE( pc_com_ri_2 ), |
| 170 | | DEVCB_LINE( pc_com_cts_2 ) |
| 67 | DEVCB_DEVICE_LINE_MEMBER("uart_2", ins8250_uart_device, rx_w), |
| 68 | DEVCB_DEVICE_LINE_MEMBER("uart_2", ins8250_uart_device, dcd_w), |
| 69 | DEVCB_DEVICE_LINE_MEMBER("uart_2", ins8250_uart_device, dsr_w), |
| 70 | DEVCB_DEVICE_LINE_MEMBER("uart_2", ins8250_uart_device, ri_w), |
| 71 | DEVCB_DEVICE_LINE_MEMBER("uart_2", ins8250_uart_device, cts_w) |
| 171 | 72 | }, |
| 172 | 73 | { |
| 173 | | DEVCB_LINE( pc_com_rx_3 ), |
| 174 | | DEVCB_LINE( pc_com_dcd_3 ), |
| 175 | | DEVCB_LINE( pc_com_dsr_3 ), |
| 176 | | DEVCB_LINE( pc_com_ri_3 ), |
| 177 | | DEVCB_LINE( pc_com_cts_3 ) |
| 74 | DEVCB_DEVICE_LINE_MEMBER("uart_3", ins8250_uart_device, rx_w), |
| 75 | DEVCB_DEVICE_LINE_MEMBER("uart_3", ins8250_uart_device, dcd_w), |
| 76 | DEVCB_DEVICE_LINE_MEMBER("uart_3", ins8250_uart_device, dsr_w), |
| 77 | DEVCB_DEVICE_LINE_MEMBER("uart_3", ins8250_uart_device, ri_w), |
| 78 | DEVCB_DEVICE_LINE_MEMBER("uart_3", ins8250_uart_device, cts_w) |
| 178 | 79 | } |
| 179 | 80 | }; |
| 180 | 81 | |
| r14668 | r14669 | |
| 240 | 141 | void isa8_com_device::device_start() |
| 241 | 142 | { |
| 242 | 143 | set_isa_device(); |
| 243 | | m_uart[0] = subdevice<ins8250_uart_device>("uart_0"); |
| 244 | | m_uart[1] = subdevice<ins8250_uart_device>("uart_1"); |
| 245 | | m_uart[2] = subdevice<ins8250_uart_device>("uart_2"); |
| 246 | | m_uart[3] = subdevice<ins8250_uart_device>("uart_3"); |
| 247 | | m_isa->install_device(0x03f8, 0x03ff, 0, 0, read8_delegate(FUNC(ins8250_device::ins8250_r), m_uart[0]), write8_delegate(FUNC(ins8250_device::ins8250_w), m_uart[0]) ); |
| 248 | | m_isa->install_device(0x02f8, 0x02ff, 0, 0, read8_delegate(FUNC(ins8250_device::ins8250_r), m_uart[1]), write8_delegate(FUNC(ins8250_device::ins8250_w), m_uart[1]) ); |
| 249 | | m_isa->install_device(0x03e8, 0x03ef, 0, 0, read8_delegate(FUNC(ins8250_device::ins8250_r), m_uart[2]), write8_delegate(FUNC(ins8250_device::ins8250_w), m_uart[2]) ); |
| 250 | | m_isa->install_device(0x02e8, 0x02ef, 0, 0, read8_delegate(FUNC(ins8250_device::ins8250_r), m_uart[3]), write8_delegate(FUNC(ins8250_device::ins8250_w), m_uart[3]) ); |
| 251 | | |
| 252 | | m_serport[0] = subdevice<rs232_port_device>("serport0"); |
| 253 | | m_serport[1] = subdevice<rs232_port_device>("serport1"); |
| 254 | | m_serport[2] = subdevice<rs232_port_device>("serport2"); |
| 255 | | m_serport[3] = subdevice<rs232_port_device>("serport3"); |
| 144 | m_isa->install_device(0x03f8, 0x03ff, 0, 0, read8_delegate(FUNC(ins8250_device::ins8250_r), subdevice<ins8250_uart_device>("uart_0")), write8_delegate(FUNC(ins8250_device::ins8250_w), subdevice<ins8250_uart_device>("uart_0")) ); |
| 145 | m_isa->install_device(0x02f8, 0x02ff, 0, 0, read8_delegate(FUNC(ins8250_device::ins8250_r), subdevice<ins8250_uart_device>("uart_1")), write8_delegate(FUNC(ins8250_device::ins8250_w), subdevice<ins8250_uart_device>("uart_1")) ); |
| 146 | m_isa->install_device(0x03e8, 0x03ef, 0, 0, read8_delegate(FUNC(ins8250_device::ins8250_r), subdevice<ins8250_uart_device>("uart_2")), write8_delegate(FUNC(ins8250_device::ins8250_w), subdevice<ins8250_uart_device>("uart_2")) ); |
| 147 | m_isa->install_device(0x02e8, 0x02ef, 0, 0, read8_delegate(FUNC(ins8250_device::ins8250_r), subdevice<ins8250_uart_device>("uart_3")), write8_delegate(FUNC(ins8250_device::ins8250_w), subdevice<ins8250_uart_device>("uart_3")) ); |
| 256 | 148 | } |
| 257 | 149 | |
| 258 | 150 | //------------------------------------------------- |
src/mess/machine/pc.c
| r14668 | r14669 | |
| 356 | 356 | pic8259_ir3_w(st->m_pic8259, state); |
| 357 | 357 | } |
| 358 | 358 | |
| 359 | | static void pc_com_tx(device_t *uart, UINT8 state, const char *portn) |
| 360 | | { |
| 361 | | rs232_port_device *port = uart->owner()->subdevice<rs232_port_device>(portn); |
| 362 | | port->tx(state); |
| 363 | | } |
| 364 | | |
| 365 | | static void pc_com_dtr(device_t *uart, UINT8 state, const char *portn) |
| 366 | | { |
| 367 | | rs232_port_device *port = uart->owner()->subdevice<rs232_port_device>(portn); |
| 368 | | port->dtr_w(state); |
| 369 | | } |
| 370 | | |
| 371 | | static void pc_com_rts(device_t *uart, UINT8 state, const char *portn) |
| 372 | | { |
| 373 | | rs232_port_device *port = uart->owner()->subdevice<rs232_port_device>(portn); |
| 374 | | port->rts_w(state); |
| 375 | | } |
| 376 | | |
| 377 | | static WRITE_LINE_DEVICE_HANDLER( pc_com_tx_0 ) { pc_com_tx(device, state, "serport0"); } |
| 378 | | static WRITE_LINE_DEVICE_HANDLER( pc_com_dtr_0 ) { pc_com_dtr(device, state, "serport0"); } |
| 379 | | static WRITE_LINE_DEVICE_HANDLER( pc_com_rts_0 ) { pc_com_rts(device, state, "serport0"); } |
| 380 | | |
| 381 | | static WRITE_LINE_DEVICE_HANDLER( pc_com_tx_1 ) { pc_com_tx(device, state, "serport1"); } |
| 382 | | static WRITE_LINE_DEVICE_HANDLER( pc_com_dtr_1 ) { pc_com_dtr(device, state, "serport1"); } |
| 383 | | static WRITE_LINE_DEVICE_HANDLER( pc_com_rts_1 ) { pc_com_rts(device, state, "serport1"); } |
| 384 | | |
| 385 | | static WRITE_LINE_DEVICE_HANDLER( pc_com_tx_2 ) { pc_com_tx(device, state, "serport2"); } |
| 386 | | static WRITE_LINE_DEVICE_HANDLER( pc_com_dtr_2 ) { pc_com_dtr(device, state, "serport2"); } |
| 387 | | static WRITE_LINE_DEVICE_HANDLER( pc_com_rts_2 ) { pc_com_rts(device, state, "serport2"); } |
| 388 | | |
| 389 | | static WRITE_LINE_DEVICE_HANDLER( pc_com_tx_3 ) { pc_com_tx(device, state, "serport3"); } |
| 390 | | static WRITE_LINE_DEVICE_HANDLER( pc_com_dtr_3 ) { pc_com_dtr(device, state, "serport3"); } |
| 391 | | static WRITE_LINE_DEVICE_HANDLER( pc_com_rts_3 ) { pc_com_rts(device, state, "serport3"); } |
| 392 | | |
| 393 | | static void pc_com_rx(device_t *port, UINT8 state, const char *uartn) |
| 394 | | { |
| 395 | | ins8250_uart_device *uart = port->owner()->subdevice<ins8250_uart_device>(uartn); |
| 396 | | uart->rx_w(state); |
| 397 | | } |
| 398 | | |
| 399 | | static void pc_com_dcd(device_t *port, UINT8 state, const char *uartn) |
| 400 | | { |
| 401 | | ins8250_uart_device *uart = port->owner()->subdevice<ins8250_uart_device>(uartn); |
| 402 | | uart->dcd_w(state); |
| 403 | | } |
| 404 | | |
| 405 | | static void pc_com_dsr(device_t *port, UINT8 state, const char *uartn) |
| 406 | | { |
| 407 | | ins8250_uart_device *uart = port->owner()->subdevice<ins8250_uart_device>(uartn); |
| 408 | | uart->dsr_w(state); |
| 409 | | } |
| 410 | | |
| 411 | | static void pc_com_ri(device_t *port, UINT8 state, const char *uartn) |
| 412 | | { |
| 413 | | ins8250_uart_device *uart = port->owner()->subdevice<ins8250_uart_device>(uartn); |
| 414 | | uart->ri_w(state); |
| 415 | | } |
| 416 | | |
| 417 | | static void pc_com_cts(device_t *port, UINT8 state, const char *uartn) |
| 418 | | { |
| 419 | | ins8250_uart_device *uart = port->owner()->subdevice<ins8250_uart_device>(uartn); |
| 420 | | uart->cts_w(state); |
| 421 | | } |
| 422 | | |
| 423 | | static WRITE_LINE_DEVICE_HANDLER( pc_com_rx_0 ) { pc_com_rx(device, state, "ins8250_0"); } |
| 424 | | static WRITE_LINE_DEVICE_HANDLER( pc_com_dcd_0 ) { pc_com_dcd(device, state, "ins8250_0"); } |
| 425 | | static WRITE_LINE_DEVICE_HANDLER( pc_com_dsr_0 ) { pc_com_dsr(device, state, "ins8250_0"); } |
| 426 | | static WRITE_LINE_DEVICE_HANDLER( pc_com_ri_0 ) { pc_com_ri(device, state, "ins8250_0"); } |
| 427 | | static WRITE_LINE_DEVICE_HANDLER( pc_com_cts_0 ) { pc_com_cts(device, state, "ins8250_0"); } |
| 428 | | |
| 429 | | static WRITE_LINE_DEVICE_HANDLER( pc_com_rx_1 ) { pc_com_rx(device, state, "ins8250_1"); } |
| 430 | | static WRITE_LINE_DEVICE_HANDLER( pc_com_dcd_1 ) { pc_com_dcd(device, state, "ins8250_1"); } |
| 431 | | static WRITE_LINE_DEVICE_HANDLER( pc_com_dsr_1 ) { pc_com_dsr(device, state, "ins8250_1"); } |
| 432 | | static WRITE_LINE_DEVICE_HANDLER( pc_com_ri_1 ) { pc_com_ri(device, state, "ins8250_1"); } |
| 433 | | static WRITE_LINE_DEVICE_HANDLER( pc_com_cts_1 ) { pc_com_cts(device, state, "ins8250_1"); } |
| 434 | | |
| 435 | | static WRITE_LINE_DEVICE_HANDLER( pc_com_rx_2 ) { pc_com_rx(device, state, "ins8250_2"); } |
| 436 | | static WRITE_LINE_DEVICE_HANDLER( pc_com_dcd_2 ) { pc_com_dcd(device, state, "ins8250_2"); } |
| 437 | | static WRITE_LINE_DEVICE_HANDLER( pc_com_dsr_2 ) { pc_com_dsr(device, state, "ins8250_2"); } |
| 438 | | static WRITE_LINE_DEVICE_HANDLER( pc_com_ri_2 ) { pc_com_ri(device, state, "ins8250_2"); } |
| 439 | | static WRITE_LINE_DEVICE_HANDLER( pc_com_cts_2 ) { pc_com_cts(device, state, "ins8250_2"); } |
| 440 | | |
| 441 | | static WRITE_LINE_DEVICE_HANDLER( pc_com_rx_3 ) { pc_com_rx(device, state, "ins8250_3"); } |
| 442 | | static WRITE_LINE_DEVICE_HANDLER( pc_com_dcd_3 ) { pc_com_dcd(device, state, "ins8250_3"); } |
| 443 | | static WRITE_LINE_DEVICE_HANDLER( pc_com_dsr_3 ) { pc_com_dsr(device, state, "ins8250_3"); } |
| 444 | | static WRITE_LINE_DEVICE_HANDLER( pc_com_ri_3 ) { pc_com_ri(device, state, "ins8250_3"); } |
| 445 | | static WRITE_LINE_DEVICE_HANDLER( pc_com_cts_3 ) { pc_com_cts(device, state, "ins8250_3"); } |
| 446 | | |
| 447 | | /* PC interface to PC-com hardware. Done this way because PCW16 also |
| 448 | | uses PC-com hardware and doesn't have the same setup! */ |
| 449 | 359 | const ins8250_interface ibm5150_com_interface[4]= |
| 450 | 360 | { |
| 451 | 361 | { |
| 452 | | DEVCB_LINE(pc_com_tx_0), |
| 453 | | DEVCB_LINE(pc_com_dtr_0), |
| 454 | | DEVCB_LINE(pc_com_rts_0), |
| 362 | DEVCB_DEVICE_LINE_MEMBER("serport0", serial_port_device, tx), |
| 363 | DEVCB_DEVICE_LINE_MEMBER("serport0", rs232_port_device, dtr_w), |
| 364 | DEVCB_DEVICE_LINE_MEMBER("serport0", rs232_port_device, rts_w), |
| 455 | 365 | DEVCB_LINE(pc_com_interrupt_1), |
| 456 | 366 | DEVCB_NULL, |
| 457 | 367 | DEVCB_NULL |
| 458 | 368 | }, |
| 459 | 369 | { |
| 460 | | DEVCB_LINE(pc_com_tx_1), |
| 461 | | DEVCB_LINE(pc_com_dtr_1), |
| 462 | | DEVCB_LINE(pc_com_rts_1), |
| 370 | DEVCB_DEVICE_LINE_MEMBER("serport1", serial_port_device, tx), |
| 371 | DEVCB_DEVICE_LINE_MEMBER("serport1", rs232_port_device, dtr_w), |
| 372 | DEVCB_DEVICE_LINE_MEMBER("serport1", rs232_port_device, rts_w), |
| 463 | 373 | DEVCB_LINE(pc_com_interrupt_2), |
| 464 | 374 | DEVCB_NULL, |
| 465 | 375 | DEVCB_NULL |
| 466 | 376 | }, |
| 467 | 377 | { |
| 468 | | DEVCB_LINE(pc_com_tx_2), |
| 469 | | DEVCB_LINE(pc_com_dtr_2), |
| 470 | | DEVCB_LINE(pc_com_rts_2), |
| 378 | DEVCB_DEVICE_LINE_MEMBER("serport2", serial_port_device, tx), |
| 379 | DEVCB_DEVICE_LINE_MEMBER("serport2", rs232_port_device, dtr_w), |
| 380 | DEVCB_DEVICE_LINE_MEMBER("serport2", rs232_port_device, rts_w), |
| 471 | 381 | DEVCB_LINE(pc_com_interrupt_1), |
| 472 | 382 | DEVCB_NULL, |
| 473 | 383 | DEVCB_NULL |
| 474 | 384 | }, |
| 475 | 385 | { |
| 476 | | DEVCB_LINE(pc_com_tx_3), |
| 477 | | DEVCB_LINE(pc_com_dtr_3), |
| 478 | | DEVCB_LINE(pc_com_rts_3), |
| 386 | DEVCB_DEVICE_LINE_MEMBER("serport3", serial_port_device, tx), |
| 387 | DEVCB_DEVICE_LINE_MEMBER("serport3", rs232_port_device, dtr_w), |
| 388 | DEVCB_DEVICE_LINE_MEMBER("serport3", rs232_port_device, rts_w), |
| 479 | 389 | DEVCB_LINE(pc_com_interrupt_2), |
| 480 | 390 | DEVCB_NULL, |
| 481 | 391 | DEVCB_NULL |
| r14668 | r14669 | |
| 485 | 395 | const rs232_port_interface ibm5150_serport_config[4] = |
| 486 | 396 | { |
| 487 | 397 | { |
| 488 | | DEVCB_LINE( pc_com_rx_0 ), |
| 489 | | DEVCB_LINE( pc_com_dcd_0 ), |
| 490 | | DEVCB_LINE( pc_com_dsr_0 ), |
| 491 | | DEVCB_LINE( pc_com_ri_0 ), |
| 492 | | DEVCB_LINE( pc_com_cts_0 ) |
| 398 | DEVCB_DEVICE_LINE_MEMBER("ins8250_0", ins8250_uart_device, rx_w), |
| 399 | DEVCB_DEVICE_LINE_MEMBER("ins8250_0", ins8250_uart_device, dcd_w), |
| 400 | DEVCB_DEVICE_LINE_MEMBER("ins8250_0", ins8250_uart_device, dsr_w), |
| 401 | DEVCB_DEVICE_LINE_MEMBER("ins8250_0", ins8250_uart_device, ri_w), |
| 402 | DEVCB_DEVICE_LINE_MEMBER("ins8250_0", ins8250_uart_device, cts_w) |
| 493 | 403 | }, |
| 494 | 404 | { |
| 495 | | DEVCB_LINE( pc_com_rx_1 ), |
| 496 | | DEVCB_LINE( pc_com_dcd_1 ), |
| 497 | | DEVCB_LINE( pc_com_dsr_1 ), |
| 498 | | DEVCB_LINE( pc_com_ri_1 ), |
| 499 | | DEVCB_LINE( pc_com_cts_1 ) |
| 405 | DEVCB_DEVICE_LINE_MEMBER("ins8250_1", ins8250_uart_device, rx_w), |
| 406 | DEVCB_DEVICE_LINE_MEMBER("ins8250_1", ins8250_uart_device, dcd_w), |
| 407 | DEVCB_DEVICE_LINE_MEMBER("ins8250_1", ins8250_uart_device, dsr_w), |
| 408 | DEVCB_DEVICE_LINE_MEMBER("ins8250_1", ins8250_uart_device, ri_w), |
| 409 | DEVCB_DEVICE_LINE_MEMBER("ins8250_1", ins8250_uart_device, cts_w) |
| 500 | 410 | }, |
| 501 | 411 | { |
| 502 | | DEVCB_LINE( pc_com_rx_2 ), |
| 503 | | DEVCB_LINE( pc_com_dcd_2 ), |
| 504 | | DEVCB_LINE( pc_com_dsr_2 ), |
| 505 | | DEVCB_LINE( pc_com_ri_2 ), |
| 506 | | DEVCB_LINE( pc_com_cts_2 ) |
| 412 | DEVCB_DEVICE_LINE_MEMBER("ins8250_2", ins8250_uart_device, rx_w), |
| 413 | DEVCB_DEVICE_LINE_MEMBER("ins8250_2", ins8250_uart_device, dcd_w), |
| 414 | DEVCB_DEVICE_LINE_MEMBER("ins8250_2", ins8250_uart_device, dsr_w), |
| 415 | DEVCB_DEVICE_LINE_MEMBER("ins8250_2", ins8250_uart_device, ri_w), |
| 416 | DEVCB_DEVICE_LINE_MEMBER("ins8250_2", ins8250_uart_device, cts_w) |
| 507 | 417 | }, |
| 508 | 418 | { |
| 509 | | DEVCB_LINE( pc_com_rx_3 ), |
| 510 | | DEVCB_LINE( pc_com_dcd_3 ), |
| 511 | | DEVCB_LINE( pc_com_dsr_3 ), |
| 512 | | DEVCB_LINE( pc_com_ri_3 ), |
| 513 | | DEVCB_LINE( pc_com_cts_3 ) |
| 419 | DEVCB_DEVICE_LINE_MEMBER("ins8250_3", ins8250_uart_device, rx_w), |
| 420 | DEVCB_DEVICE_LINE_MEMBER("ins8250_3", ins8250_uart_device, dcd_w), |
| 421 | DEVCB_DEVICE_LINE_MEMBER("ins8250_3", ins8250_uart_device, dsr_w), |
| 422 | DEVCB_DEVICE_LINE_MEMBER("ins8250_3", ins8250_uart_device, ri_w), |
| 423 | DEVCB_DEVICE_LINE_MEMBER("ins8250_3", ins8250_uart_device, cts_w) |
| 514 | 424 | } |
| 515 | 425 | }; |
| 516 | 426 | |