-`define ADDR_P1 16'hFF10
+`define ADDR_P1 16'hFF00
/* note: buttons are 'pressed' when the input is high */
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