From 7b64fdfd7635e95d87575b06b9426940a7210e9a Mon Sep 17 00:00:00 2001 From: Paul Gardner-Stephen Date: Tue, 30 Jan 2024 10:21:51 +1030 Subject: [PATCH] fix F_CTRL_EN management #781 #778 --- src/vhdl/expansion_port_controller.vhdl | 4 ++++ src/vhdl/mega65r2.vhdl | 1 + src/vhdl/mega65r3.vhdl | 3 ++- src/vhdl/mega65r4.vhdl | 2 ++ src/vhdl/mega65r5.vhdl | 2 ++ src/vhdl/mega65r6.vhdl | 2 ++ src/vhdl/slow_devices.vhdl | 2 ++ 7 files changed, 15 insertions(+), 1 deletion(-) diff --git a/src/vhdl/expansion_port_controller.vhdl b/src/vhdl/expansion_port_controller.vhdl index d7617e8c8..7117a01fb 100644 --- a/src/vhdl/expansion_port_controller.vhdl +++ b/src/vhdl/expansion_port_controller.vhdl @@ -75,6 +75,7 @@ ENTITY expansion_port_controller IS -- Expansion port pins ------------------------------------------------------------------------ cart_ctrl_dir : out std_logic := '1'; + cart_ctrl_en : out std_logic := '0'; -- required for R4/R5/R6 cart_haddr_dir : out std_logic := '1'; cart_laddr_dir : out std_logic := '1'; cart_addr_en : out std_logic := '0'; @@ -419,6 +420,9 @@ begin -- direction for a fraction of a 1MHz cycle, but we need to better -- understand the performance of the buffers to know what latency -- is required. + -- XXX On R4/R5/R6 only the R/W line might need to be read instead + -- of written to. Note has been logged for R7 board design to + -- make R/W open-collector and have a separate read sense on it. report "EXROM: Tri-stating cart_exrom,game, setting cart_ctrl_dir=0"; reprobe_exrom <= '0'; cart_ctrl_dir <= '0'; diff --git a/src/vhdl/mega65r2.vhdl b/src/vhdl/mega65r2.vhdl index ade120ca9..a6bd8ea9f 100644 --- a/src/vhdl/mega65r2.vhdl +++ b/src/vhdl/mega65r2.vhdl @@ -652,6 +652,7 @@ begin -- Expansion/cartridge port ---------------------------------------------------------------------- cart_ctrl_dir => cart_ctrl_dir, + cart_ctrl_en => cart_ctrl_en, cart_haddr_dir => cart_haddr_dir, cart_laddr_dir => cart_laddr_dir, cart_data_dir => cart_data_dir, diff --git a/src/vhdl/mega65r3.vhdl b/src/vhdl/mega65r3.vhdl index c4dcfaee3..ec471e503 100644 --- a/src/vhdl/mega65r3.vhdl +++ b/src/vhdl/mega65r3.vhdl @@ -74,7 +74,7 @@ entity container is -- Expansion/cartridge port ---------------------------------------------------------------------- cart_ctrl_dir : out std_logic; - cart_ctrl_en : out std_logic := '0'; + cart_ctrl_en : out std_logic; cart_haddr_dir : out std_logic; cart_laddr_dir : out std_logic; cart_data_en : out std_logic; @@ -782,6 +782,7 @@ begin -- Expansion/cartridge port ---------------------------------------------------------------------- cart_ctrl_dir => cart_ctrl_dir, + cart_ctrl_en => cart_ctrl_en, cart_haddr_dir => cart_haddr_dir, cart_laddr_dir => cart_laddr_dir, cart_data_dir => cart_data_dir, diff --git a/src/vhdl/mega65r4.vhdl b/src/vhdl/mega65r4.vhdl index 4e6233a86..13f7c6302 100644 --- a/src/vhdl/mega65r4.vhdl +++ b/src/vhdl/mega65r4.vhdl @@ -83,6 +83,7 @@ entity container is -- Expansion/cartridge port ---------------------------------------------------------------------- cart_ctrl_dir : out std_logic; + cart_ctrl_en : out std_logic; cart_haddr_dir : out std_logic; cart_laddr_dir : out std_logic; cart_data_en : out std_logic; @@ -931,6 +932,7 @@ begin -- Expansion/cartridge port ---------------------------------------------------------------------- cart_ctrl_dir => cart_ctrl_dir, + cart_ctrl_en => cart_ctrl_en, cart_haddr_dir => cart_haddr_dir, cart_laddr_dir => cart_laddr_dir, cart_data_dir => cart_data_dir, diff --git a/src/vhdl/mega65r5.vhdl b/src/vhdl/mega65r5.vhdl index 452c3a70c..bc1d91495 100644 --- a/src/vhdl/mega65r5.vhdl +++ b/src/vhdl/mega65r5.vhdl @@ -82,6 +82,7 @@ entity container is -- Expansion/cartridge port ---------------------------------------------------------------------- cart_ctrl_dir : out std_logic; + cart_ctrl_en : out std_logic; cart_haddr_dir : out std_logic; cart_laddr_dir : out std_logic; cart_data_en : out std_logic; @@ -963,6 +964,7 @@ begin -- Expansion/cartridge port ---------------------------------------------------------------------- cart_ctrl_dir => cart_ctrl_dir, + cart_ctrl_en => cart_ctrl_en, cart_haddr_dir => cart_haddr_dir, cart_laddr_dir => cart_laddr_dir, cart_data_dir => cart_data_dir, diff --git a/src/vhdl/mega65r6.vhdl b/src/vhdl/mega65r6.vhdl index 4342afa44..2539d675f 100644 --- a/src/vhdl/mega65r6.vhdl +++ b/src/vhdl/mega65r6.vhdl @@ -82,6 +82,7 @@ entity container is -- Expansion/cartridge port ---------------------------------------------------------------------- cart_ctrl_dir : out std_logic; + cart_ctrl_en : out std_logic; cart_haddr_dir : out std_logic; cart_laddr_dir : out std_logic; cart_data_en : out std_logic; @@ -957,6 +958,7 @@ begin -- Expansion/cartridge port ---------------------------------------------------------------------- cart_ctrl_dir => cart_ctrl_dir, + cart_ctrl_en => cart_ctrl_en, cart_haddr_dir => cart_haddr_dir, cart_laddr_dir => cart_laddr_dir, cart_data_dir => cart_data_dir, diff --git a/src/vhdl/slow_devices.vhdl b/src/vhdl/slow_devices.vhdl index 872a72daa..3205bcf85 100644 --- a/src/vhdl/slow_devices.vhdl +++ b/src/vhdl/slow_devices.vhdl @@ -89,6 +89,7 @@ ENTITY slow_devices IS -- C64-compatible cartridge/expansion port ------------------------------------------------------------------------ cart_ctrl_dir : out std_logic; + cart_ctrl_en : out std_logic; cart_haddr_dir : out std_logic; cart_laddr_dir : out std_logic; cart_data_dir : out std_logic; @@ -219,6 +220,7 @@ begin cart_access_read_strobe => cart_access_read_strobe, cart_ctrl_dir => cart_ctrl_dir, + cart_ctrl_en => cart_ctrl_en, cart_haddr_dir => cart_haddr_dir, cart_laddr_dir => cart_laddr_dir, cart_data_dir => cart_data_dir,