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

This commit is contained in:
Curt Coder 2013-02-15 20:09:51 +00:00
parent c4f6d234e8
commit d6a522bb2c
2 changed files with 56 additions and 1 deletions

View file

@ -702,6 +702,49 @@ void mm1_state::fdc_drq_w(bool state)
}
//-------------------------------------------------
// rs232_port_interface rs232a_intf
//-------------------------------------------------
static const rs232_port_interface rs232a_intf =
{
DEVCB_NULL,
DEVCB_NULL,
DEVCB_NULL,
DEVCB_NULL,
DEVCB_NULL
};
//-------------------------------------------------
// rs232_port_interface rs232b_intf
//-------------------------------------------------
static const rs232_port_interface rs232b_intf =
{
DEVCB_NULL,
DEVCB_NULL,
DEVCB_NULL,
DEVCB_NULL,
DEVCB_NULL
};
//-------------------------------------------------
// rs232_port_interface rs232c_intf
//-------------------------------------------------
static const rs232_port_interface rs232c_intf =
{
DEVCB_NULL,
DEVCB_NULL,
DEVCB_NULL,
DEVCB_NULL,
DEVCB_DEVICE_LINE_MEMBER(UPD7201_TAG, upd7201_device, ctsb_w)
};
//**************************************************************************
// MACHINE INITIALIZATION
//**************************************************************************
@ -776,9 +819,11 @@ static MACHINE_CONFIG_START( mm1, mm1_state )
MCFG_PIT8253_ADD(I8253_TAG, pit_intf)
MCFG_UPD765A_ADD(UPD765_TAG, /* XTAL_16MHz/2/2 */ true, true)
MCFG_UPD7201_ADD(UPD7201_TAG, XTAL_6_144MHz/2, mpsc_intf)
MCFG_FLOPPY_DRIVE_ADD(UPD765_TAG ":0", mm1_floppies, "525qd", 0, mm1_state::floppy_formats)
MCFG_FLOPPY_DRIVE_ADD(UPD765_TAG ":1", mm1_floppies, "525qd", 0, mm1_state::floppy_formats)
MCFG_RS232_PORT_ADD(RS232_A_TAG, rs232a_intf, default_rs232_devices, NULL, NULL)
MCFG_RS232_PORT_ADD(RS232_B_TAG, rs232b_intf, default_rs232_devices, NULL, NULL)
MCFG_RS232_PORT_ADD(RS232_C_TAG, rs232c_intf, default_rs232_devices, NULL, NULL)
// internal ram
MCFG_RAM_ADD(RAM_TAG)

View file

@ -10,6 +10,7 @@
#include "machine/i8212.h"
#include "machine/pit8253.h"
#include "machine/ram.h"
#include "machine/serial.h"
#include "machine/upd7201.h"
#include "machine/upd765.h"
#include "sound/speaker.h"
@ -25,6 +26,9 @@
#define I8275_TAG "ic59"
#define UPD7201_TAG "ic11"
#define UPD7220_TAG "ic101"
#define RS232_A_TAG "rs232a"
#define RS232_B_TAG "rs232b"
#define RS232_C_TAG "rs232c"
class mm1_state : public driver_device
{
@ -42,6 +46,9 @@ public:
m_speaker(*this, SPEAKER_TAG),
m_floppy0(*this, UPD765_TAG ":0:525qd"),
m_floppy1(*this, UPD765_TAG ":1:525qd"),
m_rs232a(*this, RS232_A_TAG),
m_rs232b(*this, RS232_B_TAG),
m_rs232c(*this, RS232_C_TAG),
m_ram(*this, RAM_TAG),
m_rom(*this, I8085A_TAG),
m_mmu_rom(*this, "address"),
@ -77,6 +84,9 @@ public:
required_device<speaker_sound_device> m_speaker;
required_device<floppy_image_device> m_floppy0;
required_device<floppy_image_device> m_floppy1;
required_device<rs232_port_device> m_rs232a;
required_device<rs232_port_device> m_rs232b;
required_device<rs232_port_device> m_rs232c;
required_device<ram_device> m_ram;
required_memory_region m_rom;
required_memory_region m_mmu_rom;