1
0
mirror of https://github.com/mist-devel/mist-board.git synced 2026-01-26 03:41:46 +00:00

Added scandoubler_disable option

This commit is contained in:
phoboz
2016-12-25 22:03:24 +01:00
parent 9b0cf5004e
commit fe36c5e212
2 changed files with 9 additions and 5 deletions

View File

@@ -143,6 +143,7 @@ architecture Behavioral of sms_mist is
status: out std_logic_vector(7 downto 0);
SWITCHES : out std_logic_vector(1 downto 0);
BUTTONS : out std_logic_vector(1 downto 0);
scandoubler_disable : out std_logic;
-- clk : in std_logic;
ps2_clk : out std_logic;
ps2_data : out std_logic
@@ -299,7 +300,7 @@ begin
vs_out => sd_vs
);
scandoubler_disable <= '1';
--scandoubler_disable <= '1';
VGA_HS <= not(hs xor vs) when scandoubler_disable = '1' else sd_hs;
VGA_VS <= '1' when scandoubler_disable = '1' else sd_vs;
@@ -392,6 +393,7 @@ begin
JOY1 => joy1,
SWITCHES => switches,
BUTTONS => buttons,
scandoubler_disable => scandoubler_disable,
-- clk => open,
ps2_clk => open,
ps2_data => open

View File

@@ -34,8 +34,9 @@ module user_io #(parameter STRLEN=0) (
output [5:0] JOY1,
output [1:0] BUTTONS,
output [1:0] SWITCHES,
output reg [7:0] status,
output scandoubler_disable,
output reg [7:0] status,
input clk,
output ps2_clk,
@@ -48,12 +49,13 @@ reg [2:0] bit_cnt; // counts bits 0-7 0-7 ...
reg [7:0] byte_cnt; // counts bytes
reg [5:0] joystick0;
reg [5:0] joystick1;
reg [3:0] but_sw;
reg [4:0] but_sw;
assign JOY0 = joystick0;
assign JOY1 = joystick1;
assign BUTTONS = but_sw[1:0];
assign SWITCHES = but_sw[3:2];
assign scandoubler_disable = but_sw[4];
// this variant of user_io is for 8 bit cores (type == a4) only
wire [7:0] core_type = 8'ha4;
@@ -164,7 +166,7 @@ always@(posedge SPI_CLK or posedge SPI_SS_IO) begin
if(byte_cnt != 0) begin
if(cmd == 8'h01)
but_sw <= { sbuf[2:0], SPI_MOSI };
but_sw <= { sbuf[3:0], SPI_MOSI };
if(cmd == 8'h02)
joystick0 <= { sbuf[4:0], SPI_MOSI };