]> Joshua Wise's Git repositories - fpgaboy.git/blobdiff - insn_ldm_a.v
Some LCDC IRQ stuffs. Working on fixing ldm_a
[fpgaboy.git] / insn_ldm_a.v
index 485b6a42171f2c5acf14ba6d315829102adeb28c..ec98fa4b9a6e201349d7c26801f22513cefd1459 100644 (file)
@@ -2,7 +2,7 @@
 // If opcode[1], then ld 16m8, else ld 8m8
 
 `ifdef EXECUTE
 // If opcode[1], then ld 16m8, else ld 8m8
 
 `ifdef EXECUTE
-       `INSN_LDM_A: begin
+       `INSN_LD8M_A,`INSN_LD16M_A: begin
                case (cycle)
                0:      begin
                                `EXEC_INC_PC
                case (cycle)
                0:      begin
                                `EXEC_INC_PC
 `endif
 
 `ifdef WRITEBACK
 `endif
 
 `ifdef WRITEBACK
-       `INSN_LDM_A: begin
+       `INSN_LD8M_A,`INSN_LD16M_A: begin
                case (cycle)
                0:      if (!opcode[1]) begin
                                tmp <= 8'hFF;
                                cycle <= 1;     /* Skip cycle 1 */
                        end
                1:      tmp2 <= rdata;
                case (cycle)
                0:      if (!opcode[1]) begin
                                tmp <= 8'hFF;
                                cycle <= 1;     /* Skip cycle 1 */
                        end
                1:      tmp2 <= rdata;
-               2:      if (opcode[1])
+               2:      if (!opcode[1])
                                tmp2 <= rdata;
                        else
                                tmp <= rdata; 
                                tmp2 <= rdata;
                        else
                                tmp <= rdata; 
This page took 0.025196 seconds and 4 git commands to generate.