Skip to content

Commit

Permalink
extra button fix
Browse files Browse the repository at this point in the history
  • Loading branch information
vossstef committed Oct 4, 2024
1 parent 3e9857f commit 5479ca9
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 24 deletions.
16 changes: 8 additions & 8 deletions src/tang_nano_20k_c64_top.vhd
Original file line number Diff line number Diff line change
Expand Up @@ -997,23 +997,23 @@ pot4 <= pd2 when joyswap = '1' else pd4;
pd1 <= not paddle_1 when port_1_sel = "0110" else
joystick1_x_pos(7 downto 0) when port_1_sel = "0111" else
('0' & std_logic_vector(mouse_x_pos(6 downto 1)) & '0') when port_1_sel = "0101" else
x"00" when port_1_sel < 5 and joyA_c64(5) = '1' else
x"ff";
x"ff" when unsigned(port_1_sel) < 5 and joyA(5) = '1' else
x"00";
pd2 <= not paddle_2 when port_1_sel = "0110" else
joystick1_y_pos(7 downto 0) when port_1_sel = "0111" else
('0' & std_logic_vector(mouse_y_pos(6 downto 1)) & '0') when port_1_sel = "0101" else
x"00" when port_1_sel < 5 and joyA_c64(6) = '1' else
x"ff";
x"ff" when unsigned(port_1_sel) < 5 and joyA(6) = '1' else
x"00";
pd3 <= not paddle_3 when port_2_sel = "0110" else
joystick2_x_pos(7 downto 0) when port_2_sel = "1000" else
('0' & std_logic_vector(mouse_x_pos(6 downto 1)) & '0') when port_2_sel = "0101" else
x"00" when port_2_sel < 5 and joyB_c64(5) = '1' else
x"ff";
x"ff" when unsigned(port_2_sel) < 5 and joyB(5) = '1' else
x"00";
pd4 <= not paddle_4 when port_2_sel = "0110" else
joystick2_y_pos(7 downto 0) when port_2_sel = "1000" else
('0' & std_logic_vector(mouse_y_pos(6 downto 1)) & '0') when port_2_sel = "0101" else
x"00" when port_2_sel < 5 and joyB_c64(6) = '1' else
x"ff";
x"ff" when unsigned(port_2_sel) < 5 and joyB(6) = '1' else
x"00";

process(clk32, reset_n)
variable mov_x: signed(6 downto 0);
Expand Down
16 changes: 8 additions & 8 deletions src/tang_nano_20k_c64_top_138k.vhd
Original file line number Diff line number Diff line change
Expand Up @@ -913,23 +913,23 @@ pot4 <= pd2 when joyswap = '1' else pd4;
pd1 <= not paddle_1 when port_1_sel = "0110" else
joystick1_x_pos(7 downto 0) when port_1_sel = "0111" else
('0' & std_logic_vector(mouse_x_pos(6 downto 1)) & '0') when port_1_sel = "0101" else
x"00" when port_1_sel < 5 and joyA_c64(5) = '1' else
x"ff";
x"ff" when unsigned(port_1_sel) < 5 and joyA(5) = '1' else
x"00";
pd2 <= not paddle_2 when port_1_sel = "0110" else
joystick1_y_pos(7 downto 0) when port_1_sel = "0111" else
('0' & std_logic_vector(mouse_y_pos(6 downto 1)) & '0') when port_1_sel = "0101" else
x"00" when port_1_sel < 5 and joyA_c64(6) = '1' else
x"ff";
x"ff" when unsigned(port_1_sel) < 5 and joyA(6) = '1' else
x"00";
pd3 <= not paddle_3 when port_2_sel = "0110" else
joystick2_x_pos(7 downto 0) when port_2_sel = "1000" else
('0' & std_logic_vector(mouse_x_pos(6 downto 1)) & '0') when port_2_sel = "0101" else
x"00" when port_2_sel < 5 and joyB_c64(5) = '1' else
x"ff";
x"ff" when unsigned(port_2_sel) < 5 and joyB(5) = '1' else
x"00";
pd4 <= not paddle_4 when port_2_sel = "0110" else
joystick2_y_pos(7 downto 0) when port_2_sel = "1000" else
('0' & std_logic_vector(mouse_y_pos(6 downto 1)) & '0') when port_2_sel = "0101" else
x"00" when port_2_sel < 5 and joyB_c64(6) = '1' else
x"ff";
x"ff" when unsigned(port_2_sel) < 5 and joyB(6) = '1' else
x"00";

process(clk32, reset_n)
variable mov_x: signed(6 downto 0);
Expand Down
16 changes: 8 additions & 8 deletions src/tang_nano_20k_c64_top_25k.vhd
Original file line number Diff line number Diff line change
Expand Up @@ -856,23 +856,23 @@ pot4 <= pd2 when joyswap = '1' else pd4;
pd1 <= not paddle_1 when port_1_sel = "0110" else
joystick1_x_pos(7 downto 0) when port_1_sel = "0111" else
('0' & std_logic_vector(mouse_x_pos(6 downto 1)) & '0') when port_1_sel = "0101" else
x"00" when port_1_sel < 5 and joyA_c64(5) = '1' else
x"ff";
x"ff" when unsigned(port_1_sel) < 5 and joyA(5) = '1' else
x"00";
pd2 <= not paddle_2 when port_1_sel = "0110" else
joystick1_y_pos(7 downto 0) when port_1_sel = "0111" else
('0' & std_logic_vector(mouse_y_pos(6 downto 1)) & '0') when port_1_sel = "0101" else
x"00" when port_1_sel < 5 and joyA_c64(6) = '1' else
x"ff";
x"ff" when unsigned(port_1_sel) < 5 and joyA(6) = '1' else
x"00";
pd3 <= not paddle_3 when port_2_sel = "0110" else
joystick2_x_pos(7 downto 0) when port_2_sel = "1000" else
('0' & std_logic_vector(mouse_x_pos(6 downto 1)) & '0') when port_2_sel = "0101" else
x"00" when port_2_sel < 5 and joyB_c64(5) = '1' else
x"ff";
x"ff" when unsigned(port_2_sel) < 5 and joyB(5) = '1' else
x"00";
pd4 <= not paddle_4 when port_2_sel = "0110" else
joystick2_y_pos(7 downto 0) when port_2_sel = "1000" else
('0' & std_logic_vector(mouse_y_pos(6 downto 1)) & '0') when port_2_sel = "0101" else
x"00" when port_2_sel < 5 and joyB_c64(6) = '1' else
x"ff";
x"ff" when unsigned(port_2_sel) < 5 and joyB(6) = '1' else
x"00";

process(clk32, reset_n)
variable mov_x: signed(6 downto 0);
Expand Down

0 comments on commit 5479ca9

Please sign in to comment.