]> Joshua Wise's Git repositories - fpgaboy.git/blobdiff - GBZ80Core.v
New generation makefile. Code that will reliably break the machine.
[fpgaboy.git] / GBZ80Core.v
index 6039b300f2e98ccad1660ece6899db2036b29f07..f4383397978f92fd5539f45dd90b7c40ee1415fd 100644 (file)
 `define INSN_alu_SCF           3'b110
 `define INSN_alu_CCF           3'b111
 
-`define EXEC_INC_PC \
-       `_PC <= `_PC + 1
-`define EXEC_NEXTADDR_PCINC \
-       address <= `_PC + 1
-`define EXEC_NEWCYCLE \
-       begin newcycle <= 1; rd <= 1; wr <= 0; end
-`define EXEC_WRITE(ad, da) \
-       begin address <= (ad); \
-       wdata <= (da); \
-       wr <= 1; end
-`define EXEC_READ(ad) \
-       begin address <= (ad); \
-       rd <= 1; end
+`define EXEC_INC_PC            `_PC <= `_PC + 1;
+`define EXEC_NEXTADDR_PCINC    address <= `_PC + 1;
+`define EXEC_NEWCYCLE          begin newcycle <= 1; rd <= 1; wr <= 0; end
+`define EXEC_WRITE(ad, da)     begin address <= (ad); wdata <= (da); wr <= 1; end end
+`define EXEC_READ(ad)          begin address <= (ad); rd <= 1; end end
 
 module GBZ80Core(
        input clk,
@@ -217,19 +209,10 @@ module GBZ80Core(
                        state <= `STATE_EXECUTE;
                end
                `STATE_EXECUTE: begin
-
                        casex (opcode)
                        `define EXECUTE
                        `include "allinsns.v"
                        `undef EXECUTE
-                       `INSN_DI: begin
-                               `EXEC_NEWCYCLE;
-                               `EXEC_INC_PC;
-                       end
-                       `INSN_EI: begin
-                               `EXEC_NEWCYCLE;
-                               `EXEC_INC_PC;
-                       end
                        default:
                                $stop;
                        endcase
This page took 0.02727 seconds and 4 git commands to generate.