Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions scripts/src/bus.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3451,6 +3451,8 @@ if (BUSES["RS232"]~=null) then
files {
MAME_DIR .. "src/devices/bus/rs232/exorterm.cpp",
MAME_DIR .. "src/devices/bus/rs232/exorterm.h",
MAME_DIR .. "src/devices/bus/rs232/heath_h19.cpp",
MAME_DIR .. "src/devices/bus/rs232/heath_h19.h",
MAME_DIR .. "src/devices/bus/rs232/hlemouse.cpp",
MAME_DIR .. "src/devices/bus/rs232/hlemouse.h",
MAME_DIR .. "src/devices/bus/rs232/ie15.cpp",
Expand Down
7 changes: 4 additions & 3 deletions src/devices/bus/heathzenith/h8/h_8_5.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -176,14 +176,15 @@ void h_8_5_device::map_io(address_space_installer & space)
// The usual baud rate is 600. The H8 supported baud rates from 110 to
// 9600. You can change the baud rate if it is changed here and in the
// other places that specify 600 baud.
static DEVICE_INPUT_DEFAULTS_START(terminal)
static DEVICE_INPUT_DEFAULTS_START(h19)
DEVICE_INPUT_DEFAULTS("RS232_RXBAUD", 0xff, RS232_BAUD_600)
DEVICE_INPUT_DEFAULTS("RS232_TXBAUD", 0xff, RS232_BAUD_600)
DEVICE_INPUT_DEFAULTS("RS232_DATABITS", 0xff, RS232_DATABITS_8)
DEVICE_INPUT_DEFAULTS("RS232_PARITY", 0xff, RS232_PARITY_NONE)
DEVICE_INPUT_DEFAULTS("RS232_STOPBITS", 0xff, RS232_STOPBITS_1)
DEVICE_INPUT_DEFAULTS_END


void h_8_5_device::device_add_mconfig(machine_config &config)
{
I8251(config, m_uart, 0);
Expand All @@ -208,11 +209,11 @@ void h_8_5_device::device_add_mconfig(machine_config &config)
console_clock.signal_handler().set(m_console, FUNC(i8251_device::write_txc));
console_clock.signal_handler().append(m_console, FUNC(i8251_device::write_rxc));

rs232_port_device &rs232(RS232_PORT(config, "rs232", default_rs232_devices, "terminal"));
rs232_port_device &rs232(RS232_PORT(config, "rs232", default_rs232_devices, "h19"));
rs232.rxd_handler().set(m_console, FUNC(i8251_device::write_rxd));
rs232.cts_handler().set(m_console, FUNC(i8251_device::write_cts));
rs232.dsr_handler().set(m_console, FUNC(i8251_device::write_dsr));
rs232.set_option_device_input_defaults("terminal", DEVICE_INPUT_DEFAULTS_NAME(terminal));
rs232.set_option_device_input_defaults("h19", DEVICE_INPUT_DEFAULTS_NAME(h19));

SPEAKER(config, "mono").front_right();

Expand Down
64 changes: 64 additions & 0 deletions src/devices/bus/rs232/heath_h19.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
// license:BSD-3-Clause
// copyright-holders:Mark Garlanger
/******************************************************************************

Heath H19 Terminal(Serial interface)

******************************************************************************/

#include "emu.h"
#include "heath_h19.h"

#include "bus/heathzenith/h19/tlb.h"


namespace {

class serial_heath_h19_device : public device_t, public device_rs232_port_interface
{
public:
serial_heath_h19_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, SERIAL_TERMINAL_H19, tag, owner, clock)
, device_rs232_port_interface(mconfig, *this)
, m_tlbc(*this, "tlbc")
{
}

virtual void input_txd(int state) override { m_tlbc->serial_in_w(state); }
virtual void input_rts(int state) override { m_tlbc->cts_in_w(state); }
virtual void input_dtr(int state) override { m_tlbc->dsr_in_w(state); }

protected:

virtual void device_start() override ATTR_COLD { }
virtual void device_add_mconfig(machine_config &config) override ATTR_COLD;

private:
required_device<heath_tlb_connector> m_tlbc;

static void tlb_options(device_slot_interface &device);
};

void serial_heath_h19_device::tlb_options(device_slot_interface &device)
{
device.option_add("heath", HEATH_TLB);
device.option_add("gp19", HEATH_GP19);
device.option_add("imaginator", HEATH_IMAGINATOR);
device.option_add("super19", HEATH_SUPER19);
device.option_add("superset", HEATH_SUPERSET);
device.option_add("ultrarom", HEATH_ULTRA);
device.option_add("watzman", HEATH_WATZ);
}

void serial_heath_h19_device::device_add_mconfig(machine_config &config)
{
HEATH_TLB_CONNECTOR(config, m_tlbc, tlb_options, "heath");
m_tlbc->serial_data_callback().set(FUNC(serial_heath_h19_device::output_rxd));
m_tlbc->rts_callback().set(FUNC(serial_heath_h19_device::output_cts));
m_tlbc->dtr_callback().set(FUNC(serial_heath_h19_device::input_dtr));
}

} // anonymous namespace


DEFINE_DEVICE_TYPE_PRIVATE(SERIAL_TERMINAL_H19, device_rs232_port_interface, serial_heath_h19_device, "serial_heath_h19", "Heath H19 Terminal (Serial Port)")
13 changes: 13 additions & 0 deletions src/devices/bus/rs232/heath_h19.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
// license:BSD-3-Clause
// copyright-holders:Mark Garlanger

#ifndef MAME_BUS_RS232_HEATH_H19_H
#define MAME_BUS_RS232_HEATH_H19_H

#pragma once

#include "rs232.h"

DECLARE_DEVICE_TYPE(SERIAL_TERMINAL_H19, device_rs232_port_interface)

#endif // MAME_BUS_RS232_HEATH_H19_H
2 changes: 2 additions & 0 deletions src/devices/bus/rs232/rs232.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,7 @@ device_rs232_port_interface::~device_rs232_port_interface()


#include "ie15.h"
#include "heath_h19.h"
#include "hlemouse.h"
#include "keyboard.h"
#include "loopback.h"
Expand All @@ -177,6 +178,7 @@ template class device_finder<device_rs232_port_interface, true>;
void default_rs232_devices(device_slot_interface &device)
{
device.option_add("dec_loopback", DEC_RS232_LOOPBACK);
device.option_add("h19", SERIAL_TERMINAL_H19);
device.option_add("ie15", SERIAL_TERMINAL_IE15);
device.option_add("keyboard", SERIAL_KEYBOARD);
device.option_add("loopback", RS232_LOOPBACK);
Expand Down
Loading