From 6e35ccc0e883feaa51d302eb0cbe785ce9dbf611 Mon Sep 17 00:00:00 2001 From: Sergey Svishchev Date: Sat, 29 Aug 2015 18:02:44 +0300 Subject: [PATCH 1/2] 68230: handle Port C Data Direction Register (register 4) --- src/emu/machine/68230pit.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/emu/machine/68230pit.c b/src/emu/machine/68230pit.c index d1761cb3652..46c8733f085 100644 --- a/src/emu/machine/68230pit.c +++ b/src/emu/machine/68230pit.c @@ -131,6 +131,10 @@ WRITE8_MEMBER (pit68230_device::write){ m_pbddr = data; break; + case PIT_68230_PCDDR: + m_pcddr = data; + break; + case PIT_68230_PACR: m_pacr = data; // callbacks @@ -205,6 +209,10 @@ READ8_MEMBER (pit68230_device::read){ data = m_pbddr; break; + case PIT_68230_PCDDR: + data = m_pcddr; + break; + case PIT_68230_PACR: data = m_pacr; break; From 3c6ece16c4e4498ee91e92b527a7f9b1d42f75b5 Mon Sep 17 00:00:00 2001 From: Sergey Svishchev Date: Sat, 29 Aug 2015 18:07:33 +0300 Subject: [PATCH 2/2] besta: hook up 68230 --- src/mess/drivers/besta.c | 32 +++++++++++++++++++++----------- 1 file changed, 21 insertions(+), 11 deletions(-) diff --git a/src/mess/drivers/besta.c b/src/mess/drivers/besta.c index 3c93a9febe3..bc9da1510f3 100644 --- a/src/mess/drivers/besta.c +++ b/src/mess/drivers/besta.c @@ -10,6 +10,7 @@ #include "emu.h" #include "cpu/m68000/m68000.h" +#include "machine/68230pit.h" #include "machine/terminal.h" #define VERBOSE_DBG 1 /* general debug messages */ @@ -32,6 +33,8 @@ public: besta_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag), m_maincpu(*this, "maincpu"), + m_pit1 (*this, "pit1"), + m_pit2 (*this, "pit2"), m_terminal(*this, TERMINAL_TAG), m_p_ram(*this, "p_ram") { @@ -44,6 +47,8 @@ public: UINT8 m_mpcc_regs[32]; required_device m_maincpu; + required_device m_pit1; + required_device m_pit2; virtual void machine_reset(); required_device m_terminal; @@ -96,17 +101,18 @@ WRITE8_MEMBER( besta_state::kbd_put ) static ADDRESS_MAP_START(besta_mem, AS_PROGRAM, 32, besta_state) AM_RANGE(0x00000000, 0x001fffff) AM_RAM AM_SHARE("p_ram") // local bus DRAM, 4MB -// AM_RANGE(0x08010000, 0x08011fff) AM_RAM // unknown -- accessed by cp31dssp - AM_RANGE(0xff000000, 0xff00ffff) AM_ROM AM_REGION("user1",0) // actual mapping is up to 0xff03ffff +// AM_RANGE(0x08010000, 0x08011fff) AM_RAM // unknown -- accessed by cp31dssp +// AM_RANGE(0xfca03500, 0xfca0350f) AM_READWRITE8(iscsi_reg_r, iscsi_reg_w, 0xffffffff) + AM_RANGE(0xff000000, 0xff00ffff) AM_ROM AM_REGION("user1", 0) // actual mapping is up to 0xff03ffff AM_RANGE(0xff040000, 0xff07ffff) AM_RAM // onboard SRAM -// 68561 MPCC (console) -// AM_RANGE(0xff800000, 0xff80001f) AM_DEVREADWRITE8("mpcc", mpcc68561_t, reg_r, reg_w, 0xffffffff) - AM_RANGE(0xff800000, 0xff80001f) AM_READWRITE8(mpcc_reg_r, mpcc_reg_w, 0xffffffff) -// AM_RANGE(0xff800200, 0xff800xxx) // 68230 PIT2 -// AM_RANGE(0xff800400, 0xff800xxx) // ??? -- shows up in cp31dssp log -// AM_RANGE(0xff800800, 0xff800xxx) // BIM -// AM_RANGE(0xff800a00, 0xff800xxx) // 62421 RTC -// AM_RANGE(0xff800c00, 0xff800xxx) // 68230 PIT +// AM_RANGE(0xff800000, 0xff80001f) AM_DEVREADWRITE8("mpcc", mpcc68561_t, reg_r, reg_w, 0xffffffff) + AM_RANGE(0xff800000, 0xff80001f) AM_READWRITE8(mpcc_reg_r, mpcc_reg_w, 0xffffffff) // console + AM_RANGE(0xff800200, 0xff800237) AM_DEVREADWRITE8 ("pit2", pit68230_device, read, write, 0xffffffff) +// AM_RANGE(0xff800400, 0xff800xxx) // ??? -- shows up in cp31dssp log +// AM_RANGE(0xff800800, 0xff800xxx) // 68153 BIM +// AM_RANGE(0xff800a00, 0xff800xxx) // 62421 RTC + AM_RANGE(0xff800c00, 0xff800c37) AM_DEVREADWRITE8 ("pit1", pit68230_device, read, write, 0xffffffff) +// AM_RANGE(0xff800e00, 0xff800xxx) // PIT3? ADDRESS_MAP_END /* Input ports */ @@ -131,6 +137,10 @@ static MACHINE_CONFIG_START( besta, besta_state ) MCFG_CPU_ADD("maincpu", M68030, 2*16670000) MCFG_CPU_PROGRAM_MAP(besta_mem) + MCFG_DEVICE_ADD ("pit1", PIT68230, 16670000 / 2) // XXX verify clock + + MCFG_DEVICE_ADD ("pit2", PIT68230, 16670000 / 2) // XXX verify clock + MCFG_DEVICE_ADD(TERMINAL_TAG, GENERIC_TERMINAL, 0) MCFG_GENERIC_TERMINAL_KEYBOARD_CB(WRITE8(besta_state, kbd_put)) MACHINE_CONFIG_END @@ -151,4 +161,4 @@ ROM_END /* Driver */ /* YEAR NAME PARENT COMPAT MACHINE INPUT INIT COMPANY FULLNAME FLAGS */ -COMP( 1988, besta88, 0, 0, besta, besta, driver_device, 0, "Sapsan", "Besta-88", MACHINE_NOT_WORKING | MACHINE_NO_SOUND) +COMP( 1988, besta88, 0, 0, besta, besta, driver_device, 0, "Sapsan", "Besta-88", MACHINE_NOT_WORKING | MACHINE_NO_SOUND_HW)