From 8bf7012b79cabf1977be4de793cd240697d6a771 Mon Sep 17 00:00:00 2001 From: Gyorgy Szombathelyi Date: Tue, 17 Mar 2020 00:05:15 +0100 Subject: [PATCH] C64: direct SD Card transfer (good for large TAPs) --- cores/c64/C64_mist.qsf | 1 + cores/c64/rtl/mist/c64_mist.vhd | 14 +++++++++++--- mist-modules | 2 +- 3 files changed, 13 insertions(+), 4 deletions(-) diff --git a/cores/c64/C64_mist.qsf b/cores/c64/C64_mist.qsf index 5471243..fb7d9ac 100644 --- a/cores/c64/C64_mist.qsf +++ b/cores/c64/C64_mist.qsf @@ -77,6 +77,7 @@ set_location_assignment PIN_88 -to SPI_DI set_location_assignment PIN_126 -to SPI_SCK set_location_assignment PIN_127 -to SPI_SS2 set_location_assignment PIN_91 -to SPI_SS3 +set_location_assignment PIN_90 -to SPI_SS4 set_location_assignment PIN_13 -to CONF_DATA0 set_location_assignment PIN_49 -to SDRAM_A[0] set_location_assignment PIN_44 -to SDRAM_A[1] diff --git a/cores/c64/rtl/mist/c64_mist.vhd b/cores/c64/rtl/mist/c64_mist.vhd index 31da337..72f775b 100644 --- a/cores/c64/rtl/mist/c64_mist.vhd +++ b/cores/c64/rtl/mist/c64_mist.vhd @@ -69,6 +69,7 @@ entity c64_mist is port SPI_DI : in std_logic; SPI_SS2 : in std_logic; SPI_SS3 : in std_logic; + SPI_SS4 : in std_logic; CONF_DATA0 : in std_logic; UART_RX : in std_logic; @@ -144,16 +145,21 @@ constant FILE_TAP : std_logic_vector(7 downto 0) := x"42"; constant FILE_CRT : std_logic_vector(7 downto 0) := x"82"; constant FILE_ROM : std_logic_vector(7 downto 0) := x"03"; -component data_io port +component data_io +generic +( + ROM_DIRECT_UPLOAD : boolean := true +); +port ( clk_sys : in std_logic; - SPI_SCK, SPI_SS2, SPI_DI :in std_logic; + SPI_SCK, SPI_SS2, SPI_SS4, SPI_DI, SPI_DO :in std_logic; ioctl_download : out std_logic; ioctl_index : out std_logic_vector(7 downto 0); ioctl_wr : out std_logic; ioctl_addr : out std_logic_vector(24 downto 0); ioctl_dout : out std_logic_vector(7 downto 0) - ); +); end component data_io; --------- @@ -532,7 +538,9 @@ begin clk_sys => clk_c64, SPI_SCK => SPI_SCK, SPI_SS2 => SPI_SS2, + SPI_SS4 => SPI_SS4, SPI_DI => SPI_DI, + SPI_DO => SPI_DO, ioctl_download => ioctl_download, ioctl_index => ioctl_index, diff --git a/mist-modules b/mist-modules index f4f624e..5e66f8e 160000 --- a/mist-modules +++ b/mist-modules @@ -1 +1 @@ -Subproject commit f4f624eeb31c6faa0ed556edcd37752140769e73 +Subproject commit 5e66f8e039e2c5f569bf7ace5bea37148450d908