From 029e68d48b15229faec36c699316607f4b5cbd45 Mon Sep 17 00:00:00 2001 From: AJR Date: Sun, 12 Nov 2017 02:24:55 -0500 Subject: btchamp: Better handling of uPD4701 control lines (nw) --- src/devices/machine/upd4701.cpp | 3 ++- src/mame/drivers/konamigv.cpp | 8 ++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/devices/machine/upd4701.cpp b/src/devices/machine/upd4701.cpp index 0875ce31861..7a02e8bf1e4 100644 --- a/src/devices/machine/upd4701.cpp +++ b/src/devices/machine/upd4701.cpp @@ -354,11 +354,12 @@ READ8_MEMBER(upd4701_device::read_y) READ8_MEMBER(upd4701_device::read_xy) { + bool old_cs = m_cs; cs_w(0); xy_w(BIT(offset, 1)); ul_w(BIT(offset, 0)); u8 result = d_r(space, 0); - cs_w(1); + cs_w(old_cs); return result; } diff --git a/src/mame/drivers/konamigv.cpp b/src/mame/drivers/konamigv.cpp index 872672c0446..d1f8fa2cc9b 100644 --- a/src/mame/drivers/konamigv.cpp +++ b/src/mame/drivers/konamigv.cpp @@ -502,11 +502,11 @@ WRITE16_MEMBER(konamigv_state::btc_trackball_w) { // osd_printf_debug( "w %08x %08x %08x %08x\n", space.device().safe_pc(), offset, data, mem_mask ); - // Is this correct? The write pattern looks more like CS than RESET... - if (BIT(data, 1)) + for (int i = 0; i < 2; i++) { - m_btc_trackball[0]->reset_xy(space, 0, 0, 0xff); - m_btc_trackball[1]->reset_xy(space, 0, 0, 0xff); + m_btc_trackball[i]->cs_w(BIT(data, 1)); + m_btc_trackball[i]->resetx_w(!BIT(data, 0)); + m_btc_trackball[i]->resety_w(!BIT(data, 0)); } } -- cgit v1.2.3