]> Joshua Wise's Git repositories - fpgaboy.git/blobdiff - insn_alu8.v
Latest shit, I can't remember
[fpgaboy.git] / insn_alu8.v
index 6abcb90befbf1bc0421739c5c97c223bfbad7e47..b6d4c636820f8c95c337a81a439ae5dd9831fa48 100644 (file)
@@ -1,10 +1,13 @@
 `ifdef EXECUTE
 `ifdef EXECUTE
-       `INSN_ALU8: begin
-               if ((opcode[2:0] == `INSN_reg_dHL) && (cycle == 0))
-                       `EXEC_READ(_HL);
+       `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
                else begin
-                       `EXEC_NEWCYCLE;
-                       `EXEC_INC_PC;
+                       `EXEC_NEWCYCLE
+                       `EXEC_INC_PC
                        case (opcode[2:0])
                        `INSN_reg_A:    tmp <= `_A;
                        `INSN_reg_B:    tmp <= `_B;
                        case (opcode[2:0])
                        `INSN_reg_A:    tmp <= `_A;
                        `INSN_reg_B:    tmp <= `_B;
@@ -20,8 +23,8 @@
 `endif
 
 `ifdef WRITEBACK
 `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])
                        /* Sit on our asses. */
                end else begin          /* Actually do the computation! */
                        case (opcode[5:3])
This page took 0.028336 seconds and 4 git commands to generate.