From efa81db65b1ab5d96b4e69d3e126ec19ed15d969 Mon Sep 17 00:00:00 2001 From: Gyorgy Szombathelyi Date: Tue, 18 Oct 2022 12:51:20 +0200 Subject: [PATCH] PIA6821: always read the input for port A Feedback of the output can be applied externally --- common/IO/pia6821.vhd | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/common/IO/pia6821.vhd b/common/IO/pia6821.vhd index 49152452..7c3787b9 100644 --- a/common/IO/pia6821.vhd +++ b/common/IO/pia6821.vhd @@ -31,6 +31,14 @@ -- Set output to low level when in data is in input mode -- (to avoid infered latch warning) -- +-- 18 October 2022 0.0.3 Slingshot +-- Run through VHDLFormatter. +-- Port A always read the input data. +-- Feedback of output can be applied externally if required, as: +-- pa_i <= (pa_o and pa_oe) or (pa_input and not pa_oe); +-- In some applications, the input is stronger than the output, +-- and the feedback is suppressed. +-- --===========================================================================---- -- -- Memory Map @@ -134,11 +142,7 @@ BEGIN data_out(count) <= porta_ddr(count); porta_read <= '0'; ELSE - IF porta_ddr(count) = '1' THEN - data_out(count) <= porta_data(count); - ELSE - data_out(count) <= pa_i(count); - END IF; + data_out(count) <= pa_i(count); porta_read <= cs; END IF; END LOOP;