diff options
-rw-r--r-- | src/mame/drivers/fccpu30.cpp | 25 |
1 files changed, 11 insertions, 14 deletions
diff --git a/src/mame/drivers/fccpu30.cpp b/src/mame/drivers/fccpu30.cpp index 32024ba7ea5..de6f3036232 100644 --- a/src/mame/drivers/fccpu30.cpp +++ b/src/mame/drivers/fccpu30.cpp @@ -188,6 +188,7 @@ #include "emu.h" #include "cpu/m68000/m68000.h" +#include "machine/msm6242.h" // Supporting also Epson 62423 which is compatible to the Epson 72423 #include "machine/ram.h" // For variants that only differs in amount of RAM #include "machine/scnxx562.h" #include "machine/68230pit.h" @@ -215,6 +216,8 @@ #define FUNCNAME __PRETTY_FUNCTION__ #endif +const device_type EPS72423 = MSM6242; // Informative + #define DUSCC_CLOCK XTAL_14_7456MHz /* Verified */ class cpu30_state : public driver_device @@ -228,6 +231,7 @@ cpu30_state(const machine_config &mconfig, device_type type, const char *tag) , m_pit1 (*this, "pit1") , m_pit2 (*this, "pit2") , m_fga002 (*this, "fga002") + , m_rtc (*this, "rtc") , m_board_id(0x50) { } @@ -236,8 +240,6 @@ cpu30_state(const machine_config &mconfig, device_type type, const char *tag) DECLARE_READ8_MEMBER (fdc_r); DECLARE_WRITE8_MEMBER (scsi_w); DECLARE_READ8_MEMBER (scsi_r); - DECLARE_WRITE8_MEMBER (rtc_w); - DECLARE_READ8_MEMBER (rtc_r); DECLARE_READ8_MEMBER (slot1_status_r); DECLARE_READ32_MEMBER (bootvect_r); DECLARE_WRITE32_MEMBER (bootvect_w); @@ -290,6 +292,8 @@ private: required_device<fga002_device> m_fga002; + required_device <msm6242_device> m_rtc; + // Helper functions void update_irq_to_maincpu(); @@ -310,8 +314,7 @@ static ADDRESS_MAP_START (cpu30_mem, AS_PROGRAM, 32, cpu30_state) AM_RANGE (0xff800e00, 0xff800fff) AM_DEVREADWRITE8("pit2", pit68230_device, read, write, 0xffffffff) AM_RANGE (0xff802000, 0xff8021ff) AM_DEVREADWRITE8("duscc", duscc68562_device, read, write, 0xffffffff) /* Port 1&2 - Dual serial port DUSCC */ AM_RANGE (0xff802200, 0xff8023ff) AM_DEVREADWRITE8("duscc2", duscc68562_device, read, write, 0xffffffff) /* Port 3&4 - Dual serial port DUSCC */ -// AM_RANGE (0xff803000, 0xff8031ff) AM_DEVREADWRITE8("rtc", rtc72423_device, read, write, 0xffffffff) /* TODO: implement Epson RT-72423 RTC (see also konendev.cpp) */ - AM_RANGE (0xff803000, 0xff8031ff) AM_READWRITE8(rtc_r, rtc_w, 0x000000ff) /* mock driver to log calls to device */ + AM_RANGE (0xff803000, 0xff8031ff) AM_DEVREADWRITE8("rtc", msm6242_device, read, write, 0xffffffff) /* device support Epson 62423 which is compatible with Epson 72423 */ // AM_RANGE (0xff803400, 0xff8035ff) AM_DEVREADWRITE8("scsi", mb87033_device, read, write, 0xffffffff) /* TODO: implement MB87344 SCSI device */ AM_RANGE (0xff803400, 0xff8035ff) AM_READWRITE8(scsi_r, scsi_w, 0x000000ff) /* mock driver to log calls to device */ // AM_RANGE (0xff803800, 0xff80397f) AM_DEVREADWRITE8("fdc", wd37c65c_device, read, write, 0xffffffff) /* TODO: implement WD3/C65C fdc controller */ @@ -384,16 +387,6 @@ WRITE8_MEMBER (cpu30_state::scsi_w){ LOG(("%s\n * SCSI write Offset: %04x Data: %02x\n", FUNCNAME, offset, data)); } -/* Mock RTC driver */ -READ8_MEMBER (cpu30_state::rtc_r){ - LOG(("%s\n * RTC read Offset: %04x\n", FUNCNAME, offset)); - return 1; -} - -WRITE8_MEMBER (cpu30_state::rtc_w){ - LOG(("%s\n * RTC write Offset: %04x Data: %02x\n", FUNCNAME, offset, data)); -} - /* 1 = board is in slot 1, 0 = board is NOT in slot 1 */ READ8_MEMBER (cpu30_state::slot1_status_r){ LOG(("%s\n", FUNCNAME)); @@ -722,6 +715,10 @@ static MACHINE_CONFIG_START (cpu30, cpu30_state) MCFG_FGA002_OUT_LIACK4_CB(DEVREAD8("duscc", duscc_device, iack)) MCFG_FGA002_OUT_LIACK5_CB(DEVREAD8("duscc2", duscc_device, iack)) + // RTC + MCFG_DEVICE_ADD("rtc", EPS72423, XTAL_32_768kHz) // Fake crystal value, the 72423 uses it own internal crystal + MCFG_MSM6242_OUT_INT_HANDLER(DEVWRITELINE("fga002", fga002_device, lirq0_w)) + // dual ported ram MCFG_RAM_ADD(RAM_TAG) MCFG_RAM_DEFAULT_SIZE("4M") |