summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author AJR <ajrhacker@users.noreply.github.com>2017-09-23 16:34:27 -0400
committer AJR <ajrhacker@users.noreply.github.com>2017-09-23 16:34:41 -0400
commit027123bea82f1466b2dfcd31ac60f248dc84ac3b (patch)
tree8cb21d69408a29deb5722421501374376a8a5463
parent561cdd764d32cdaaed5bae3bcc9baf52238a58d1 (diff)
vme_mzr8300: Use Am9513 to generate 9615 baud for all SIO channels (nw)
-rw-r--r--src/devices/bus/vme/vme_mzr8300.cpp31
1 files changed, 23 insertions, 8 deletions
diff --git a/src/devices/bus/vme/vme_mzr8300.cpp b/src/devices/bus/vme/vme_mzr8300.cpp
index 37c2b4f4e38..06a24306217 100644
--- a/src/devices/bus/vme/vme_mzr8300.cpp
+++ b/src/devices/bus/vme/vme_mzr8300.cpp
@@ -84,9 +84,9 @@
#include "emu.h"
#include "vme_mzr8300.h"
+#include "machine/am9513.h"
#include "machine/z80sio.h"
#include "bus/rs232/rs232.h"
-#include "machine/clock.h"
#define LOG_GENERAL 0x01
#define LOG_SETUP 0x02
@@ -120,25 +120,37 @@ DEFINE_DEVICE_TYPE(VME_MZR8300, vme_mzr8300_card_device, "mzr8300", "Mizar 8300
* once a proper serial board hardware (ie MZ 8300) is found and emulated. */
+static DEVICE_INPUT_DEFAULTS_START( terminal )
+ DEVICE_INPUT_DEFAULTS( "RS232_RXBAUD", 0xff, RS232_BAUD_9615 )
+ DEVICE_INPUT_DEFAULTS( "RS232_TXBAUD", 0xff, RS232_BAUD_9615 )
+DEVICE_INPUT_DEFAULTS_END
+
//-------------------------------------------------
// device_add_mconfig - add device configuration
//-------------------------------------------------
-#define BAUDGEN_CLOCK XTAL_19_6608MHz /* fake */
-#define SIO_CLOCK (BAUDGEN_CLOCK / 128) /* This will give prompt */
-
MACHINE_CONFIG_MEMBER( vme_mzr8300_card_device::device_add_mconfig )
- MCFG_UPD7201_ADD("sio0", XTAL_4MHz, SIO_CLOCK, SIO_CLOCK, SIO_CLOCK, SIO_CLOCK )
-
+ MCFG_UPD7201_ADD("sio0", XTAL_4MHz, 0, 0, 0, 0 )
MCFG_Z80SIO_OUT_TXDB_CB(DEVWRITELINE("rs232p1", rs232_port_device, write_txd))
MCFG_Z80SIO_OUT_DTRB_CB(DEVWRITELINE("rs232p1", rs232_port_device, write_dtr))
MCFG_Z80SIO_OUT_RTSB_CB(DEVWRITELINE("rs232p1", rs232_port_device, write_rts))
+ MCFG_UPD7201_ADD("sio1", XTAL_4MHz, 0, 0, 0, 0 )
+
MCFG_RS232_PORT_ADD ("rs232p1", default_rs232_devices, "terminal")
MCFG_RS232_RXD_HANDLER (DEVWRITELINE ("sio0", upd7201_new_device, rxb_w))
MCFG_RS232_CTS_HANDLER (DEVWRITELINE ("sio0", upd7201_new_device, ctsb_w))
-
- MCFG_Z80SIO_ADD("sio1", XTAL_4MHz, 0, 0, 0, 0 )
+ MCFG_DEVICE_CARD_DEVICE_INPUT_DEFAULTS("terminal", terminal)
+
+ MCFG_DEVICE_ADD("stc", AM9513, XTAL_4MHz)
+ MCFG_AM9513_OUT1_CALLBACK(DEVWRITELINE("sio0", upd7201_new_device, rxca_w))
+ MCFG_DEVCB_CHAIN_OUTPUT(DEVWRITELINE("sio0", upd7201_new_device, txca_w))
+ MCFG_AM9513_OUT2_CALLBACK(DEVWRITELINE("sio0", upd7201_new_device, rxcb_w))
+ MCFG_DEVCB_CHAIN_OUTPUT(DEVWRITELINE("sio0", upd7201_new_device, txcb_w))
+ MCFG_AM9513_OUT3_CALLBACK(DEVWRITELINE("sio1", upd7201_new_device, rxca_w))
+ MCFG_DEVCB_CHAIN_OUTPUT(DEVWRITELINE("sio1", upd7201_new_device, txca_w))
+ MCFG_AM9513_OUT4_CALLBACK(DEVWRITELINE("sio1", upd7201_new_device, rxcb_w))
+ MCFG_DEVCB_CHAIN_OUTPUT(DEVWRITELINE("sio1", upd7201_new_device, txcb_w))
MACHINE_CONFIG_END
@@ -179,6 +191,9 @@ void vme_mzr8300_card_device::device_start()
m_vme->install_device(vme_device::A16_SC, base + 6, base + 7, // Channel A - Control
read8_delegate(FUNC(z80sio_device::ca_r), subdevice<z80sio_device>("sio0")),
write8_delegate(FUNC(z80sio_device::ca_w), subdevice<z80sio_device>("sio0")), 0x00ff);
+ m_vme->install_device(vme_device::A16_SC, base + 0x10, base + 0x13, // Am9513
+ read8_delegate(FUNC(am9513_device::read8), subdevice<am9513_device>("stc")),
+ write8_delegate(FUNC(am9513_device::write8), subdevice<am9513_device>("stc")), 0x00ff);
}
void vme_mzr8300_card_device::device_reset()