diff options
author | AJR <ajrhacker@users.noreply.github.com> | 2017-11-19 02:12:21 -0500 |
---|---|---|
committer | AJR <ajrhacker@users.noreply.github.com> | 2017-11-19 02:12:21 -0500 |
commit | c834be2454d75feb40725c91e55dbfc7692c5d0c (patch) | |
tree | 85a4ea601bd276fbbd7642144b0d6c383f956dfb | |
parent | 3800cfae0344e49a42515c04aef20444327d46d3 (diff) |
mt5510: DUART drives EEPROMs (nw)
-rw-r--r-- | src/devices/machine/mc68681.cpp | 7 | ||||
-rw-r--r-- | src/devices/machine/mc68681.h | 1 | ||||
-rw-r--r-- | src/mame/drivers/microterm.cpp | 16 |
3 files changed, 22 insertions, 2 deletions
diff --git a/src/devices/machine/mc68681.cpp b/src/devices/machine/mc68681.cpp index da860478f6d..c8bb75f0b1c 100644 --- a/src/devices/machine/mc68681.cpp +++ b/src/devices/machine/mc68681.cpp @@ -763,6 +763,13 @@ WRITE_LINE_MEMBER( mc68681_base_device::ip5_w ) IP_last_state = newIP; } +WRITE_LINE_MEMBER( mc68681_base_device::ip6_w ) +{ + uint8_t newIP = (IP_last_state & ~0x40) | ((state == ASSERT_LINE) ? 0x40 : 0); +// TODO: special mode for ip6 (Ch. B Rx clock) + IP_last_state = newIP; +} + mc68681_channel *mc68681_base_device::get_channel(int chan) { if (chan == 0) diff --git a/src/devices/machine/mc68681.h b/src/devices/machine/mc68681.h index ebc29c98fd1..694e6a45246 100644 --- a/src/devices/machine/mc68681.h +++ b/src/devices/machine/mc68681.h @@ -149,6 +149,7 @@ public: DECLARE_WRITE_LINE_MEMBER( ip3_w ); DECLARE_WRITE_LINE_MEMBER( ip4_w ); DECLARE_WRITE_LINE_MEMBER( ip5_w ); + DECLARE_WRITE_LINE_MEMBER( ip6_w ); protected: mc68681_base_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); diff --git a/src/mame/drivers/microterm.cpp b/src/mame/drivers/microterm.cpp index d9a74e683a0..e16341388f0 100644 --- a/src/mame/drivers/microterm.cpp +++ b/src/mame/drivers/microterm.cpp @@ -8,7 +8,7 @@ Skeleton driver for Micro-Term terminals. #include "emu.h" #include "cpu/z80/z80.h" -//#include "machine/eepromser.h" +#include "machine/eepromser.h" #include "machine/mc68681.h" //#include "video/scn2674.h" //#include "screen.h" @@ -39,7 +39,7 @@ static ADDRESS_MAP_START( mt420_io_map, AS_IO, 8, microterm_state ) ADDRESS_MAP_END static ADDRESS_MAP_START( mt5510_mem_map, AS_PROGRAM, 8, microterm_state ) - AM_RANGE(0x0000, 0x7fff) AM_ROM AM_REGION("maincpu", 0) + AM_RANGE(0x0000, 0x7fff) AM_ROM AM_REGION("maincpu", 0) AM_WRITENOP AM_RANGE(0x8000, 0xbfff) AM_RAM AM_RANGE(0xc000, 0xffff) AM_RAM ADDRESS_MAP_END @@ -68,6 +68,18 @@ static MACHINE_CONFIG_START( mt5510 ) MCFG_DEVICE_ADD("duart", MC68681, XTAL_3_6864MHz) MCFG_MC68681_IRQ_CALLBACK(INPUTLINE("maincpu", 0)) + MCFG_MC68681_OUTPORT_CALLBACK(DEVWRITELINE("eeprom1", eeprom_serial_93cxx_device, di_write)) MCFG_DEVCB_BIT(6) + MCFG_DEVCB_CHAIN_OUTPUT(DEVWRITELINE("eeprom2", eeprom_serial_93cxx_device, di_write)) MCFG_DEVCB_BIT(5) + MCFG_DEVCB_CHAIN_OUTPUT(DEVWRITELINE("eeprom1", eeprom_serial_93cxx_device, cs_write)) MCFG_DEVCB_BIT(4) + MCFG_DEVCB_CHAIN_OUTPUT(DEVWRITELINE("eeprom2", eeprom_serial_93cxx_device, cs_write)) MCFG_DEVCB_BIT(4) + MCFG_DEVCB_CHAIN_OUTPUT(DEVWRITELINE("eeprom1", eeprom_serial_93cxx_device, clk_write)) MCFG_DEVCB_BIT(3) + MCFG_DEVCB_CHAIN_OUTPUT(DEVWRITELINE("eeprom2", eeprom_serial_93cxx_device, clk_write)) MCFG_DEVCB_BIT(3) + + MCFG_EEPROM_SERIAL_93C46_ADD("eeprom1") + MCFG_EEPROM_SERIAL_DO_CALLBACK(DEVWRITELINE("duart", mc68681_device, ip6_w)) + + MCFG_EEPROM_SERIAL_93C46_ADD("eeprom2") + MCFG_EEPROM_SERIAL_DO_CALLBACK(DEVWRITELINE("duart", mc68681_device, ip5_w)) MACHINE_CONFIG_END |