diff --git a/cores/c64/rtl/c1541/c1541_sd.vhd b/cores/c64/rtl/c1541/c1541_sd.vhd index 4e8a6df..6f29f65 100644 --- a/cores/c64/rtl/c1541/c1541_sd.vhd +++ b/cores/c64/rtl/c1541/c1541_sd.vhd @@ -33,6 +33,7 @@ port( disk_num : in std_logic_vector(9 downto 0); disk_change : in std_logic; + disk_readonly : in std_logic; iec_atn_i : in std_logic; iec_data_i : in std_logic; @@ -171,7 +172,7 @@ begin freq => freq, -- motor frequency sync_n => sync_n, -- reading SYNC bytes byte_n => byte_n, -- byte ready - wps_n => '1', -- write-protect sense (0 = protected) + wps_n => not disk_readonly, -- write-protect sense (0 = protected) tr00_sense_n => '1', -- track 0 sense (unused?) act => act, -- activity LED diff --git a/cores/c64/rtl/mist/c64_mist.vhd b/cores/c64/rtl/mist/c64_mist.vhd index 29d5479..edd7254 100644 --- a/cores/c64/rtl/mist/c64_mist.vhd +++ b/cores/c64/rtl/mist/c64_mist.vhd @@ -128,14 +128,14 @@ constant CONF_STR : string := "F,CRT,Load Cartridge;" &--3 -- "F,TAP,Load File;"&--4 -- "F,T64,Load File;"&--5 + "OE,Disk Write,Enable,Disable;"& "O2,Video standard,PAL,NTSC;"& "O8A,Scandoubler Fx,None,HQ2x-320,HQ2x-160,CRT 25%,CRT 50%;"& "OD,SID,6581,8580;"& "O3,Joysticks,normal,swapped;"& "O6,Audio filter,On,Off;"& -- "OB,BIOS,C64,C64GS;" & - "T5,Reset & Detach Cartridge;"& - "V0,v0.35.00"; + "T5,Reset & Detach Cartridge;"; -- convert string to std_logic_vector to be given to user_io function to_slv(s: string) return std_logic_vector is @@ -840,6 +840,8 @@ begin reset_key => reset_key ); + disk_readonly <= status(14); + c64_iec_data_i <= c1541_iec_data_o; c64_iec_clk_i <= c1541_iec_clk_o; @@ -878,7 +880,7 @@ begin disk_change => sd_change, disk_num => (others => '0'), -- always 0 on MiST, the image is selected by the OSD menu - --disk_readonly => disk_readonly, + disk_readonly => disk_readonly, iec_atn_i => c1541_iec_atn_i, iec_data_i => c1541_iec_data_i,