]> Joshua Wise's Git repositories - fpgaboy.git/blame_incremental - insn_alu_ext.v
Semi-working, but prone to anus, keyboard driver
[fpgaboy.git] / insn_alu_ext.v
... / ...
CommitLineData
1`ifdef EXECUTE
2 `INSN_ALU_EXT: begin
3 if ((opcode[2:0] == `INSN_reg_dHL) && (cycle == 0))
4 `EXEC_READ(`_HL)
5 else begin
6 `EXEC_INC_PC
7 case (opcode[2:0])
8 `INSN_reg_A: tmp <= `_A;
9 `INSN_reg_B: tmp <= `_B;
10 `INSN_reg_C: tmp <= `_C;
11 `INSN_reg_D: tmp <= `_D;
12 `INSN_reg_E: tmp <= `_E;
13 `INSN_reg_H: tmp <= `_H;
14 `INSN_reg_L: tmp <= `_L;
15 `INSN_reg_dHL: tmp <= rdata;
16 endcase
17 end
18 end
19`endif
20
21`ifdef WRITEBACK
22 `INSN_ALU_EXT: begin
23 if (opcode[2:0] == `INSN_reg_dHL) begin
24 if(cycle == 0) begin end
25 else if(cycle == 1) begin
26 `EXEC_WRITE(`_HL, alu_res)
27 end else begin
28 `EXEC_NEWCYCLE
29 end
30 end else begin
31 case(opcode[2:0])
32 `INSN_reg_B: `_B <= alu_res;
33 `INSN_reg_C: `_C <= alu_res;
34 `INSN_reg_D: `_D <= alu_res;
35 `INSN_reg_E: `_E <= alu_res;
36 `INSN_reg_H: `_H <= alu_res;
37 `INSN_reg_L: `_L <= alu_res;
38 `INSN_reg_A: `_A <= alu_res;
39 `INSN_reg_dHL: begin end /* eat dicks */
40 endcase
41 `_F <= {f_res,`_F[3:0]};
42 `EXEC_NEWCYCLE
43 end
44 end
45`endif
This page took 0.024187 seconds and 4 git commands to generate.