From 45d9d1c679e9ccbac6cad76107a2977d6cb69ddc Mon Sep 17 00:00:00 2001 From: Joshua Wise Date: Fri, 9 May 2008 06:25:50 -0400 Subject: [PATCH 1/1] Working input in GB BASIC! --- Buttons.v | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Buttons.v b/Buttons.v index 4d8a171..f81060c 100644 --- a/Buttons.v +++ b/Buttons.v @@ -1,4 +1,4 @@ -`define ADDR_P1 16'hFF10 +`define ADDR_P1 16'hFF00 /* note: buttons are 'pressed' when the input is high */ @@ -20,7 +20,7 @@ module Buttons( assign data = (rdlatch && (addrlatch == `ADDR_P1)) ? p1 : 8'bzzzzzzzz; - wire p1013 = (p1[4] ? 4'b1111 : ~buttons[3:0]) | (p1[5] ? 4'b1111 : ~buttons[7:4]); + wire [3:0] p1013 = (p1[4] ? 4'b1111 : ~buttons[3:0]) & (p1[5] ? 4'b1111 : ~buttons[7:4]); always @ (posedge core_clk) begin if(wr) begin -- 2.43.0