X-Git-Url: http://git.joshuawise.com/fpgaboy.git/blobdiff_plain/5c33c5c001049403ac33d71bfbe0115c318c1b4c..6d070aeeba66499d17bd9abb9c5dfbb1317bf1c5:/insn_alu8.v diff --git a/insn_alu8.v b/insn_alu8.v index 161418b..b6d4c63 100644 --- a/insn_alu8.v +++ b/insn_alu8.v @@ -1,6 +1,9 @@ `ifdef EXECUTE - `INSN_ALU8: begin - if ((opcode[2:0] == `INSN_reg_dHL) && (cycle == 0)) + `INSN_ALU8,`INSN_ALU8IMM: begin + if ((opcode[7:6] == 2'b11) && (cycle == 0)) begin // alu8imm + `EXEC_INC_PC + `EXEC_READ(`_PC + 1) + end else if ((opcode[2:0] == `INSN_reg_dHL) && (cycle == 0)) `EXEC_READ(`_HL) else begin `EXEC_NEWCYCLE @@ -20,8 +23,8 @@ `endif `ifdef WRITEBACK - `INSN_ALU8: begin - if ((opcode[2:0] == `INSN_reg_dHL) && (cycle == 0)) begin + `INSN_ALU8,`INSN_ALU8IMM: begin + if (((opcode[2:0] == `INSN_reg_dHL) || (opcode[7:6] == 2'b11)) && (cycle == 0)) begin /* Sit on our asses. */ end else begin /* Actually do the computation! */ case (opcode[5:3])