X-Git-Url: http://git.joshuawise.com/fpgaboy.git/blobdiff_plain/5c83453744afce2e0415f839e8274156b69df83e..62316b58608c6d4333cc301b9906e13d143ba36e:/core/insn_alu_a.v diff --git a/core/insn_alu_a.v b/core/insn_alu_a.v index a51f8bb..36bac34 100644 --- a/core/insn_alu_a.v +++ b/core/insn_alu_a.v @@ -33,19 +33,19 @@ case(opcode[5:3]) `INSN_alu_RLCA: begin `_A <= {`_A[6:0],`_A[7]}; - `_F <= {`_F[7:5],`_A[7],`_F[3:0]}; + `_F <= {3'b0,`_A[7],`_F[3:0]}; end `INSN_alu_RRCA: begin `_A <= {`_A[0],`_A[7:1]}; - `_F <= {`_F[7:5],`_A[0],`_F[3:0]}; + `_F <= {3'b0,`_A[0],`_F[3:0]}; end `INSN_alu_RLA: begin `_A <= {`_A[6:0],`_F[4]}; - `_F <= {`_F[7:5],`_A[7],`_F[3:0]}; + `_F <= {3'b0,`_A[7],`_F[3:0]}; end `INSN_alu_RRA: begin `_A <= {`_F[4],`_A[7:1]}; - `_F <= {`_F[7:5],`_A[0],`_F[3:0]}; + `_F <= {3'b0,`_A[0],`_F[3:0]}; end `INSN_alu_DAA: begin `_A <= daa_tmp[7:0]; @@ -61,10 +61,10 @@ `_F <= {`_F[7],1'b1,1'b1,`_F[4:0]}; end `INSN_alu_SCF: begin - `_F <= {`_F[7:5],1'b1,`_F[3:0]}; + `_F <= {`_F[7],3'b001,`_F[3:0]}; end `INSN_alu_CCF: begin - `_F <= {`_F[7:5],~`_F[4],`_F[3:0]}; + `_F <= {`_F[7],2'b00,~`_F[4],`_F[3:0]}; end endcase end