(MESS) prof80: Added RS-232 ports. (nw)

This commit is contained in:
Curt Coder 2013-02-15 19:49:49 +00:00
parent 2d0d151ca3
commit 2c9ac3e1ed
2 changed files with 31 additions and 1 deletions

View file

@ -178,9 +178,11 @@ void prof80_state::ls259_w(int fa, int sa, int fb, int sb)
break;
case 2: // _RTS
m_rs232a->rts_w(fb);
break;
case 3: // TX
m_rs232a->tx(fb);
break;
case 4: // _MSTOP
@ -192,6 +194,7 @@ void prof80_state::ls259_w(int fa, int sa, int fb, int sb)
break;
case 5: // TXP
m_rs232b->tx(fb);
break;
case 6: // TSTB
@ -262,9 +265,11 @@ READ8_MEMBER( prof80_state::status_r )
UINT8 data = 0;
// serial receive
data |= !m_rs232a->rx();
// clear to send
data |= 0x10;
data |= m_rs232a->cts_r() << 4;
data |= m_rs232b->cts_r() << 7;
// floppy index
data |= (m_floppy0->get_device() ? m_floppy0->get_device()->idx_r() : m_floppy1->get_device() ? m_floppy1->get_device()->idx_r() : 1) << 5;
@ -523,6 +528,20 @@ static SLOT_INTERFACE_START( prof80_ecb_cards )
SLOT_INTERFACE_END
//-------------------------------------------------
// rs232_port_interface rs232_intf
//-------------------------------------------------
static const rs232_port_interface rs232_intf =
{
DEVCB_NULL,
DEVCB_NULL,
DEVCB_NULL,
DEVCB_NULL,
DEVCB_NULL
};
//**************************************************************************
// MACHINE INITIALIZATION
@ -610,6 +629,10 @@ static MACHINE_CONFIG_START( prof80, prof80_state )
MCFG_ECBBUS_SLOT_ADD(4, "ecb_4", prof80_ecb_cards, NULL, NULL)
MCFG_ECBBUS_SLOT_ADD(5, "ecb_5", prof80_ecb_cards, NULL, NULL)
// V24
MCFG_RS232_PORT_ADD(RS232_A_TAG, rs232_intf, default_rs232_devices, NULL, NULL)
MCFG_RS232_PORT_ADD(RS232_B_TAG, rs232_intf, default_rs232_devices, NULL, NULL)
// internal ram
MCFG_RAM_ADD(RAM_TAG)
MCFG_RAM_DEFAULT_SIZE("128K")

View file

@ -11,12 +11,15 @@
#include "machine/ecb_grip.h"
#include "machine/ram.h"
#include "machine/rescap.h"
#include "machine/serial.h"
#include "machine/upd1990a.h"
#include "machine/upd765.h"
#define Z80_TAG "z1"
#define UPD765_TAG "z38"
#define UPD1990A_TAG "z43"
#define RS232_A_TAG "rs232a"
#define RS232_B_TAG "rs232b"
// ------------------------------------------------------------------------
@ -38,6 +41,8 @@ public:
m_floppy0(*this, UPD765_TAG":0"),
m_floppy1(*this, UPD765_TAG":1"),
m_ecb(*this, ECBBUS_TAG),
m_rs232a(*this, RS232_A_TAG),
m_rs232b(*this, RS232_B_TAG),
m_rom(*this, Z80_TAG),
m_j4(*this, "J4"),
m_j5(*this, "J5")
@ -50,6 +55,8 @@ public:
required_device<floppy_connector> m_floppy0;
required_device<floppy_connector> m_floppy1;
required_device<ecbbus_device> m_ecb;
required_device<rs232_port_device> m_rs232a;
required_device<rs232_port_device> m_rs232b;
required_memory_region m_rom;
required_ioport m_j4;
required_ioport m_j5;