mt5510: DUART drives EEPROMs (nw)

This commit is contained in:
AJR 2017-11-19 02:12:21 -05:00
parent 3800cfae03
commit c834be2454
3 changed files with 22 additions and 2 deletions

View File

@ -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)

View File

@ -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);

View File

@ -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