mirror of
https://github.com/holub/mame
synced 2025-04-22 00:11:58 +03:00
just a little more (nw)
This commit is contained in:
parent
763ad2da30
commit
bdb8b995a9
@ -170,41 +170,41 @@ MACHINE_CONFIG_START(zorba_state::zorba)
|
||||
MCFG_Z80DMA_IN_IORQ_CB(READ8(*this, zorba_state, io_read_byte))
|
||||
MCFG_Z80DMA_OUT_IORQ_CB(WRITE8(*this, zorba_state, io_write_byte))
|
||||
|
||||
MCFG_DEVICE_ADD(m_uart0, I8251, 0) // U32 COM port J2
|
||||
MCFG_I8251_TXD_HANDLER(WRITELINE("rs232", rs232_port_device, write_txd)) // TODO: this line has a LED attached
|
||||
MCFG_I8251_DTR_HANDLER(WRITELINE("rs232", rs232_port_device, write_dtr))
|
||||
MCFG_I8251_RTS_HANDLER(WRITELINE("rs232", rs232_port_device, write_rts))
|
||||
MCFG_I8251_RXRDY_HANDLER(WRITELINE(*this, zorba_state, tx_rx_rdy_w<1>))
|
||||
MCFG_I8251_TXRDY_HANDLER(WRITELINE(*this, zorba_state, tx_rx_rdy_w<0>))
|
||||
I8251(config, m_uart0, 0); // U32 COM port J2
|
||||
m_uart0->txd_handler().set("rs232", FUNC(rs232_port_device::write_txd)); // TODO: this line has a LED attached
|
||||
m_uart0->dtr_handler().set("rs232", FUNC(rs232_port_device::write_dtr));
|
||||
m_uart0->rts_handler().set("rs232", FUNC(rs232_port_device::write_rts));
|
||||
m_uart0->rxrdy_handler().set(FUNC(zorba_state::tx_rx_rdy_w<1>));
|
||||
m_uart0->txrdy_handler().set(FUNC(zorba_state::tx_rx_rdy_w<0>));
|
||||
|
||||
MCFG_DEVICE_ADD(m_uart1, I8251, 0) // U31 printer port J3
|
||||
MCFG_I8251_TXD_HANDLER(WRITELINE("serprn", rs232_port_device, write_txd))
|
||||
MCFG_I8251_RTS_HANDLER(WRITELINE("serprn", rs232_port_device, write_rts))
|
||||
MCFG_I8251_RXRDY_HANDLER(WRITELINE(*this, zorba_state, tx_rx_rdy_w<3>))
|
||||
MCFG_I8251_TXRDY_HANDLER(WRITELINE(*this, zorba_state, tx_rx_rdy_w<2>))
|
||||
I8251(config, m_uart1, 0); // U31 printer port J3
|
||||
m_uart1->txd_handler().set("serprn", FUNC(rs232_port_device::write_txd));
|
||||
m_uart1->rts_handler().set("serprn", FUNC(rs232_port_device::write_rts));
|
||||
m_uart1->rxrdy_handler().set(FUNC(zorba_state::tx_rx_rdy_w<3>));
|
||||
m_uart1->txrdy_handler().set(FUNC(zorba_state::tx_rx_rdy_w<2>));
|
||||
|
||||
MCFG_DEVICE_ADD(m_uart2, I8251, 0) // U30 serial keyboard J6
|
||||
MCFG_I8251_TXD_HANDLER(WRITELINE("keyboard", zorba_keyboard_device, txd_w))
|
||||
MCFG_I8251_RXRDY_HANDLER(WRITELINE(*this, zorba_state, tx_rx_rdy_w<5>))
|
||||
MCFG_I8251_TXRDY_HANDLER(WRITELINE(*this, zorba_state, tx_rx_rdy_w<4>))
|
||||
I8251(config, m_uart2, 0); // U30 serial keyboard J6
|
||||
m_uart2->txd_handler().set("keyboard", FUNC(zorba_keyboard_device::txd_w));
|
||||
m_uart2->rxrdy_handler().set(FUNC(zorba_state::tx_rx_rdy_w<5>));
|
||||
m_uart2->txrdy_handler().set(FUNC(zorba_state::tx_rx_rdy_w<4>));
|
||||
|
||||
// port A - disk select etc, beeper
|
||||
// port B - parallel interface
|
||||
MCFG_DEVICE_ADD(m_pia0, PIA6821, 0)
|
||||
MCFG_PIA_WRITEPA_HANDLER(WRITE8(*this, zorba_state, pia0_porta_w))
|
||||
MCFG_PIA_WRITEPB_HANDLER(WRITE8("parprndata", output_latch_device, bus_w))
|
||||
MCFG_PIA_CB2_HANDLER(WRITELINE("parprn", centronics_device, write_strobe))
|
||||
PIA6821(config, m_pia0, 0);
|
||||
m_pia0->writepa_handler().set(FUNC(zorba_state::pia0_porta_w));
|
||||
m_pia0->writepb_handler().set("parprndata", FUNC(output_latch_device::bus_w));
|
||||
m_pia0->cb2_handler().set("parprn", FUNC(centronics_device::write_strobe));
|
||||
|
||||
// IEEE488 interface
|
||||
MCFG_DEVICE_ADD(m_pia1, PIA6821, 0)
|
||||
MCFG_PIA_READPA_HANDLER(READ8(m_ieee, ieee488_device, dio_r)) // TODO: gated with PB1
|
||||
MCFG_PIA_WRITEPA_HANDLER(WRITE8(m_ieee, ieee488_device, host_dio_w)) // TODO: gated with PB1
|
||||
MCFG_PIA_READPB_HANDLER(READ8(*this, zorba_state, pia1_portb_r))
|
||||
MCFG_PIA_WRITEPB_HANDLER(WRITE8(*this, zorba_state, pia1_portb_w))
|
||||
MCFG_PIA_CA2_HANDLER(WRITELINE(m_ieee, ieee488_device, host_ifc_w))
|
||||
MCFG_PIA_CB2_HANDLER(WRITELINE(m_ieee, ieee488_device, host_ren_w))
|
||||
MCFG_PIA_IRQA_HANDLER(WRITELINE("irq1", input_merger_device, in_w<0>))
|
||||
MCFG_PIA_IRQB_HANDLER(WRITELINE("irq1", input_merger_device, in_w<1>))
|
||||
PIA6821(config, m_pia1, 0);
|
||||
m_pia1->readpa_handler().set(m_ieee, FUNC(ieee488_device::dio_r)); // TODO: gated with PB1
|
||||
m_pia1->writepa_handler().set(m_ieee, FUNC(ieee488_device::host_dio_w)); // TODO: gated with PB1
|
||||
m_pia1->readpb_handler().set(FUNC(zorba_state::pia1_portb_r));
|
||||
m_pia1->writepb_handler().set(FUNC(zorba_state::pia1_portb_w));
|
||||
m_pia1->ca2_handler().set(m_ieee, FUNC(ieee488_device::host_ifc_w));
|
||||
m_pia1->cb2_handler().set(m_ieee, FUNC(ieee488_device::host_ren_w));
|
||||
m_pia1->irqa_handler().set("irq1", FUNC(input_merger_device::in_w<0>));
|
||||
m_pia1->irqb_handler().set("irq1", FUNC(input_merger_device::in_w<1>));
|
||||
|
||||
// PIT
|
||||
pit8254_device &pit(PIT8254(config, "pit", 0));
|
||||
@ -258,10 +258,9 @@ MACHINE_CONFIG_START(zorba_state::zorba)
|
||||
MCFG_RS232_RXD_HANDLER(WRITELINE(m_uart1, i8251_device, write_rxd)) // TODO: this line has a LED attached
|
||||
|
||||
// J6 TTL-level serial keyboard
|
||||
MCFG_DEVICE_ADD("keyboard", ZORBA_KEYBOARD, 0)
|
||||
MCFG_ZORBA_KEYBOARD_RXD_CB(WRITELINE(m_uart2, i8251_device, write_rxd))
|
||||
ZORBA_KEYBOARD(config, "keyboard").rxd_cb().set(m_uart2, FUNC(i8251_device::write_rxd));
|
||||
|
||||
MCFG_SOFTWARE_LIST_ADD("flop_list", "zorba")
|
||||
SOFTWARE_LIST(config, "flop_list").set_original("zorba");
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
|
||||
|
@ -166,12 +166,6 @@ sapphire_ioga_device::sapphire_ioga_device(const machine_config &mconfig, const
|
||||
{
|
||||
}
|
||||
|
||||
void interpro_ioga_device::device_validity_check(validity_checker &valid) const
|
||||
{
|
||||
if (m_memory_device && !m_memory_device->has_space(m_memory_spacenum))
|
||||
osd_printf_error("Device %s (%s) doen't have memory space %d\n", m_memory_device->device().tag(), m_memory_device->device().name(), m_memory_spacenum);
|
||||
}
|
||||
|
||||
void interpro_ioga_device::device_start()
|
||||
{
|
||||
// get the memory space
|
||||
|
@ -243,7 +243,6 @@ public:
|
||||
|
||||
protected:
|
||||
// device-level overrides
|
||||
virtual void device_validity_check(validity_checker &valid) const override;
|
||||
virtual void device_start() override;
|
||||
virtual void device_reset() override;
|
||||
|
||||
|
@ -10,15 +10,12 @@
|
||||
|
||||
DECLARE_DEVICE_TYPE(ZORBA_KEYBOARD, zorba_keyboard_device)
|
||||
|
||||
#define MCFG_ZORBA_KEYBOARD_RXD_CB(cb) \
|
||||
downcast<zorba_keyboard_device &>(*device).set_rxd_cb(DEVCB_##cb);
|
||||
|
||||
class zorba_keyboard_device : public device_t
|
||||
{
|
||||
public:
|
||||
template <typename Obj> devcb_base &set_rxd_cb(Obj &&cb) { return m_rxd_cb.set_callback(std::forward<Obj>(cb)); }
|
||||
auto rxd_cb() { return m_rxd_cb.bind(); }
|
||||
|
||||
zorba_keyboard_device(machine_config const &mconfig, char const *tag, device_t *owner, uint32_t clock);
|
||||
zorba_keyboard_device(machine_config const &mconfig, char const *tag, device_t *owner, uint32_t clock = 0);
|
||||
|
||||
DECLARE_WRITE_LINE_MEMBER(txd_w);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user