From ee6ed24526b58ad4949d15697c0cec63f2f959aa Mon Sep 17 00:00:00 2001 From: Roberto Fresca Date: Wed, 24 Apr 2019 15:03:02 +0200 Subject: Miniboy7.cpp: Documented the way PIA port B lines 4-7 are multiplexed through a 74LS157 to read the 8 lines of DSW2 using the AY8910 port B line 7 as selector. Added ASCII diagram. [Roberto Fresca] --- src/mame/drivers/miniboy7.cpp | 25 +++++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) diff --git a/src/mame/drivers/miniboy7.cpp b/src/mame/drivers/miniboy7.cpp index aa99b8cec9e..4320d15620b 100644 --- a/src/mame/drivers/miniboy7.cpp +++ b/src/mame/drivers/miniboy7.cpp @@ -347,14 +347,31 @@ uint8_t miniboy7_state::lamp_latch_r() void miniboy7_state::ay_pb_w(uint8_t data) { - // ---- xxxx unused - // -xxx ---- HCD - // x--- ---- DSW2 select - +/* ---- xxxx unused + -xxx ---- HCD + x--- ---- DSW2 select +*/ m_ay_pb = data; } uint8_t miniboy7_state::pia_pb_r() +/* + PIA PB0-3 are connected to regular inputs. + AY8910, PortB-D7, is the selector of a 74LS157 that multiplexes the PIA PB4-7 input lines + to read the 8 DIP switches bank lines. See the following diagram. + + 74LS157 + .-------V-------. + AY8910 PB7 -|01 SEL B0 03|- DSW2-8 + -| B1 06|- DSW2-7 + PIA PB7 -|04 Y0 B3 13|- DSW2-6 + PIA PB6 -|07 Y1 B2 10|- DSW2-5 + PIA PB5 -|12 Y3 A0 02|- DSW2-4 + PIA PB4 -|09 Y2 A1 05|- DSW2-3 + -| A3 14|- DSW2-2 + -| A2 11|- DSW2-1 + '---------------' +*/ { return (m_input2->read() & 0x0f) | ((m_dsw2->read() << (BIT(m_ay_pb, 7) ? 0 : 4)) & 0xf0); } -- cgit v1.2.3