Mercurial > repos > blastem
annotate z80inst.c @ 261:f0c53a4bbfa3
Implement LDIR and fix a bug in which context was not restored after a call to z80_handle_code_write
author | Mike Pavone <pavone@retrodev.com> |
---|---|
date | Tue, 30 Apr 2013 01:00:10 -0700 |
parents | ce7ce2b9c2df |
children | df5bf4c113dc |
rev | line source |
---|---|
199
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1 #include "z80inst.h" |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
2 #include <string.h> |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
3 #include <stdio.h> |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
4 |
202
693ad04b965e
Distinguish between 1-byte and 2-byte NOPs
Mike Pavone <pavone@retrodev.com>
parents:
201
diff
changeset
|
5 #define NOP {Z80_NOP, Z80_UNUSED, Z80_UNUSED, Z80_UNUSED, 1} |
693ad04b965e
Distinguish between 1-byte and 2-byte NOPs
Mike Pavone <pavone@retrodev.com>
parents:
201
diff
changeset
|
6 #define NOP2 {Z80_NOP, Z80_UNUSED, Z80_UNUSED, Z80_UNUSED, 2} |
200
d3066ceb29d1
Add support for EXTD group 2-byte Z80 instructions in decoder
Mike Pavone <pavone@retrodev.com>
parents:
199
diff
changeset
|
7 |
199
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
8 z80inst z80_tbl_a[256] = { |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
9 //0 |
200
d3066ceb29d1
Add support for EXTD group 2-byte Z80 instructions in decoder
Mike Pavone <pavone@retrodev.com>
parents:
199
diff
changeset
|
10 NOP, |
199
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
11 {Z80_LD, Z80_BC, Z80_IMMED, Z80_UNUSED, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
12 {Z80_LD, Z80_A, Z80_REG_INDIRECT | Z80_DIR, Z80_BC, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
13 {Z80_INC, Z80_BC, Z80_UNUSED, Z80_UNUSED, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
14 {Z80_INC, Z80_B, Z80_UNUSED, Z80_UNUSED, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
15 {Z80_DEC, Z80_B, Z80_UNUSED, Z80_UNUSED, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
16 {Z80_LD, Z80_B, Z80_IMMED, Z80_UNUSED, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
17 {Z80_RLC, Z80_A, Z80_UNUSED, Z80_UNUSED, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
18 {Z80_EX, Z80_AF, Z80_REG, Z80_AF, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
19 {Z80_ADD, Z80_HL, Z80_REG, Z80_BC, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
20 {Z80_LD, Z80_A, Z80_REG_INDIRECT, Z80_BC, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
21 {Z80_DEC, Z80_BC, Z80_UNUSED, Z80_UNUSED, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
22 {Z80_INC, Z80_C, Z80_UNUSED, Z80_UNUSED, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
23 {Z80_DEC, Z80_C, Z80_UNUSED, Z80_UNUSED, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
24 {Z80_LD, Z80_C, Z80_IMMED, Z80_UNUSED, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
25 {Z80_RRC, Z80_A, Z80_UNUSED, Z80_UNUSED, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
26 //1 |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
27 {Z80_DJNZ, Z80_UNUSED, Z80_IMMED, Z80_UNUSED, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
28 {Z80_LD, Z80_DE, Z80_IMMED, Z80_UNUSED, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
29 {Z80_LD, Z80_A, Z80_REG_INDIRECT | Z80_DIR, Z80_DE, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
30 {Z80_INC, Z80_DE, Z80_UNUSED, Z80_UNUSED, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
31 {Z80_INC, Z80_D, Z80_UNUSED, Z80_UNUSED, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
32 {Z80_DEC, Z80_D, Z80_UNUSED, Z80_UNUSED, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
33 {Z80_LD, Z80_D, Z80_IMMED, Z80_UNUSED, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
34 {Z80_RL, Z80_A, Z80_UNUSED, Z80_UNUSED, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
35 {Z80_JR, Z80_UNUSED, Z80_IMMED, Z80_UNUSED, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
36 {Z80_ADD, Z80_HL, Z80_REG, Z80_DE, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
37 {Z80_LD, Z80_A, Z80_REG_INDIRECT, Z80_DE, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
38 {Z80_DEC, Z80_DE, Z80_UNUSED, Z80_UNUSED, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
39 {Z80_INC, Z80_E, Z80_UNUSED, Z80_UNUSED, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
40 {Z80_DEC, Z80_E, Z80_UNUSED, Z80_UNUSED, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
41 {Z80_LD, Z80_E, Z80_IMMED, Z80_UNUSED, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
42 {Z80_RR, Z80_A, Z80_UNUSED, Z80_UNUSED, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
43 //2 |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
44 {Z80_JRCC, Z80_CC_NZ, Z80_IMMED, Z80_UNUSED, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
45 {Z80_LD, Z80_HL, Z80_IMMED, Z80_UNUSED, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
46 {Z80_LD, Z80_HL, Z80_IMMED_INDIRECT | Z80_DIR, Z80_UNUSED, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
47 {Z80_INC, Z80_HL, Z80_UNUSED, Z80_UNUSED, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
48 {Z80_INC, Z80_H, Z80_UNUSED, Z80_UNUSED, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
49 {Z80_DEC, Z80_H, Z80_UNUSED, Z80_UNUSED, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
50 {Z80_LD, Z80_H, Z80_IMMED, Z80_UNUSED, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
51 {Z80_DAA, Z80_UNUSED, Z80_UNUSED, Z80_UNUSED, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
52 {Z80_JRCC, Z80_CC_Z, Z80_IMMED, Z80_UNUSED, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
53 {Z80_ADD, Z80_HL, Z80_REG, Z80_HL, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
54 {Z80_LD, Z80_HL, Z80_IMMED_INDIRECT, Z80_IMMED, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
55 {Z80_DEC, Z80_HL, Z80_UNUSED, Z80_UNUSED, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
56 {Z80_INC, Z80_L, Z80_UNUSED, Z80_UNUSED, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
57 {Z80_DEC, Z80_L, Z80_UNUSED, Z80_UNUSED, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
58 {Z80_LD, Z80_L, Z80_IMMED, Z80_UNUSED, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
59 {Z80_CPL, Z80_UNUSED, Z80_UNUSED, Z80_UNUSED, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
60 //3 |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
61 {Z80_JRCC, Z80_CC_NC, Z80_IMMED, Z80_UNUSED, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
62 {Z80_LD, Z80_SP, Z80_IMMED, Z80_UNUSED, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
63 {Z80_LD, Z80_A, Z80_IMMED_INDIRECT | Z80_DIR, Z80_UNUSED, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
64 {Z80_INC, Z80_SP, Z80_UNUSED, Z80_UNUSED, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
65 {Z80_INC, Z80_UNUSED, Z80_REG_INDIRECT, Z80_HL, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
66 {Z80_DEC, Z80_UNUSED, Z80_REG_INDIRECT, Z80_HL, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
67 {Z80_LD, Z80_USE_IMMED, Z80_REG_INDIRECT | Z80_DIR, Z80_HL, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
68 {Z80_SCF, Z80_UNUSED, Z80_UNUSED, Z80_UNUSED, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
69 {Z80_JRCC, Z80_CC_C, Z80_IMMED, Z80_UNUSED, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
70 {Z80_ADD, Z80_HL, Z80_REG, Z80_SP, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
71 {Z80_LD, Z80_A, Z80_IMMED_INDIRECT, Z80_IMMED, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
72 {Z80_DEC, Z80_SP, Z80_UNUSED, Z80_UNUSED, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
73 {Z80_INC, Z80_A, Z80_UNUSED, Z80_UNUSED, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
74 {Z80_DEC, Z80_A, Z80_UNUSED, Z80_UNUSED, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
75 {Z80_LD, Z80_A, Z80_IMMED, Z80_UNUSED, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
76 {Z80_CCF, Z80_UNUSED, Z80_UNUSED, Z80_UNUSED, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
77 //4 |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
78 {Z80_LD, Z80_B, Z80_REG, Z80_B, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
79 {Z80_LD, Z80_B, Z80_REG, Z80_C, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
80 {Z80_LD, Z80_B, Z80_REG, Z80_D, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
81 {Z80_LD, Z80_B, Z80_REG, Z80_E, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
82 {Z80_LD, Z80_B, Z80_REG, Z80_H, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
83 {Z80_LD, Z80_B, Z80_REG, Z80_L, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
84 {Z80_LD, Z80_B, Z80_REG_INDIRECT, Z80_HL, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
85 {Z80_LD, Z80_B, Z80_REG, Z80_A, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
86 {Z80_LD, Z80_C, Z80_REG, Z80_B, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
87 {Z80_LD, Z80_C, Z80_REG, Z80_C, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
88 {Z80_LD, Z80_C, Z80_REG, Z80_D, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
89 {Z80_LD, Z80_C, Z80_REG, Z80_E, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
90 {Z80_LD, Z80_C, Z80_REG, Z80_H, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
91 {Z80_LD, Z80_C, Z80_REG, Z80_L, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
92 {Z80_LD, Z80_C, Z80_REG_INDIRECT, Z80_HL, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
93 {Z80_LD, Z80_C, Z80_REG, Z80_A, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
94 //5 |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
95 {Z80_LD, Z80_D, Z80_REG, Z80_B, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
96 {Z80_LD, Z80_D, Z80_REG, Z80_C, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
97 {Z80_LD, Z80_D, Z80_REG, Z80_D, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
98 {Z80_LD, Z80_D, Z80_REG, Z80_E, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
99 {Z80_LD, Z80_D, Z80_REG, Z80_H, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
100 {Z80_LD, Z80_D, Z80_REG, Z80_L, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
101 {Z80_LD, Z80_D, Z80_REG_INDIRECT, Z80_HL, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
102 {Z80_LD, Z80_D, Z80_REG, Z80_A, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
103 {Z80_LD, Z80_E, Z80_REG, Z80_B, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
104 {Z80_LD, Z80_E, Z80_REG, Z80_C, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
105 {Z80_LD, Z80_E, Z80_REG, Z80_D, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
106 {Z80_LD, Z80_E, Z80_REG, Z80_E, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
107 {Z80_LD, Z80_E, Z80_REG, Z80_H, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
108 {Z80_LD, Z80_E, Z80_REG, Z80_L, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
109 {Z80_LD, Z80_E, Z80_REG_INDIRECT, Z80_HL, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
110 {Z80_LD, Z80_E, Z80_REG, Z80_A, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
111 //6 |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
112 {Z80_LD, Z80_H, Z80_REG, Z80_B, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
113 {Z80_LD, Z80_H, Z80_REG, Z80_C, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
114 {Z80_LD, Z80_H, Z80_REG, Z80_D, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
115 {Z80_LD, Z80_H, Z80_REG, Z80_E, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
116 {Z80_LD, Z80_H, Z80_REG, Z80_H, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
117 {Z80_LD, Z80_H, Z80_REG, Z80_L, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
118 {Z80_LD, Z80_H, Z80_REG_INDIRECT, Z80_HL, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
119 {Z80_LD, Z80_H, Z80_REG, Z80_A, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
120 {Z80_LD, Z80_L, Z80_REG, Z80_B, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
121 {Z80_LD, Z80_L, Z80_REG, Z80_C, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
122 {Z80_LD, Z80_L, Z80_REG, Z80_D, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
123 {Z80_LD, Z80_L, Z80_REG, Z80_E, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
124 {Z80_LD, Z80_L, Z80_REG, Z80_H, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
125 {Z80_LD, Z80_L, Z80_REG, Z80_L, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
126 {Z80_LD, Z80_L, Z80_REG_INDIRECT, Z80_HL, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
127 {Z80_LD, Z80_L, Z80_REG, Z80_A, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
128 //7 |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
129 {Z80_LD, Z80_B, Z80_REG_INDIRECT | Z80_DIR, Z80_HL, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
130 {Z80_LD, Z80_C, Z80_REG_INDIRECT | Z80_DIR, Z80_HL, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
131 {Z80_LD, Z80_D, Z80_REG_INDIRECT | Z80_DIR, Z80_HL, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
132 {Z80_LD, Z80_E, Z80_REG_INDIRECT | Z80_DIR, Z80_HL, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
133 {Z80_LD, Z80_H, Z80_REG_INDIRECT | Z80_DIR, Z80_HL, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
134 {Z80_LD, Z80_L, Z80_REG_INDIRECT | Z80_DIR, Z80_HL, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
135 {Z80_HALT, Z80_UNUSED, Z80_UNUSED, Z80_UNUSED, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
136 {Z80_LD, Z80_A, Z80_REG_INDIRECT | Z80_DIR, Z80_HL, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
137 {Z80_LD, Z80_A, Z80_REG, Z80_B, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
138 {Z80_LD, Z80_A, Z80_REG, Z80_C, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
139 {Z80_LD, Z80_A, Z80_REG, Z80_D, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
140 {Z80_LD, Z80_A, Z80_REG, Z80_E, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
141 {Z80_LD, Z80_A, Z80_REG, Z80_H, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
142 {Z80_LD, Z80_A, Z80_REG, Z80_L, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
143 {Z80_LD, Z80_A, Z80_REG_INDIRECT, Z80_HL, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
144 {Z80_LD, Z80_A, Z80_REG, Z80_A, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
145 //8 |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
146 {Z80_ADD, Z80_A, Z80_REG, Z80_B, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
147 {Z80_ADD, Z80_A, Z80_REG, Z80_C, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
148 {Z80_ADD, Z80_A, Z80_REG, Z80_D, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
149 {Z80_ADD, Z80_A, Z80_REG, Z80_E, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
150 {Z80_ADD, Z80_A, Z80_REG, Z80_H, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
151 {Z80_ADD, Z80_A, Z80_REG, Z80_L, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
152 {Z80_ADD, Z80_A, Z80_REG_INDIRECT, Z80_HL, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
153 {Z80_ADD, Z80_A, Z80_REG, Z80_A, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
154 {Z80_ADC, Z80_A, Z80_REG, Z80_B, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
155 {Z80_ADC, Z80_A, Z80_REG, Z80_C, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
156 {Z80_ADC, Z80_A, Z80_REG, Z80_D, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
157 {Z80_ADC, Z80_A, Z80_REG, Z80_E, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
158 {Z80_ADC, Z80_A, Z80_REG, Z80_H, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
159 {Z80_ADC, Z80_A, Z80_REG, Z80_L, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
160 {Z80_ADC, Z80_A, Z80_REG_INDIRECT, Z80_HL, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
161 {Z80_ADC, Z80_A, Z80_REG, Z80_A, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
162 //9 |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
163 {Z80_SUB, Z80_A, Z80_REG, Z80_B, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
164 {Z80_SUB, Z80_A, Z80_REG, Z80_C, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
165 {Z80_SUB, Z80_A, Z80_REG, Z80_D, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
166 {Z80_SUB, Z80_A, Z80_REG, Z80_E, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
167 {Z80_SUB, Z80_A, Z80_REG, Z80_H, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
168 {Z80_SUB, Z80_A, Z80_REG, Z80_L, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
169 {Z80_SUB, Z80_A, Z80_REG_INDIRECT, Z80_HL, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
170 {Z80_SUB, Z80_A, Z80_REG, Z80_A, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
171 {Z80_SBC, Z80_A, Z80_REG, Z80_B, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
172 {Z80_SBC, Z80_A, Z80_REG, Z80_C, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
173 {Z80_SBC, Z80_A, Z80_REG, Z80_D, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
174 {Z80_SBC, Z80_A, Z80_REG, Z80_E, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
175 {Z80_SBC, Z80_A, Z80_REG, Z80_H, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
176 {Z80_SBC, Z80_A, Z80_REG, Z80_L, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
177 {Z80_SBC, Z80_A, Z80_REG_INDIRECT, Z80_HL, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
178 {Z80_SBC, Z80_A, Z80_REG, Z80_A, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
179 //A |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
180 {Z80_AND, Z80_A, Z80_REG, Z80_B, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
181 {Z80_AND, Z80_A, Z80_REG, Z80_C, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
182 {Z80_AND, Z80_A, Z80_REG, Z80_D, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
183 {Z80_AND, Z80_A, Z80_REG, Z80_E, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
184 {Z80_AND, Z80_A, Z80_REG, Z80_H, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
185 {Z80_AND, Z80_A, Z80_REG, Z80_L, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
186 {Z80_AND, Z80_A, Z80_REG_INDIRECT, Z80_HL, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
187 {Z80_AND, Z80_A, Z80_REG, Z80_A, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
188 {Z80_XOR, Z80_A, Z80_REG, Z80_B, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
189 {Z80_XOR, Z80_A, Z80_REG, Z80_C, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
190 {Z80_XOR, Z80_A, Z80_REG, Z80_D, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
191 {Z80_XOR, Z80_A, Z80_REG, Z80_E, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
192 {Z80_XOR, Z80_A, Z80_REG, Z80_H, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
193 {Z80_XOR, Z80_A, Z80_REG, Z80_L, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
194 {Z80_XOR, Z80_A, Z80_REG_INDIRECT, Z80_HL, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
195 {Z80_XOR, Z80_A, Z80_REG, Z80_A, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
196 //B |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
197 {Z80_OR, Z80_A, Z80_REG, Z80_B, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
198 {Z80_OR, Z80_A, Z80_REG, Z80_C, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
199 {Z80_OR, Z80_A, Z80_REG, Z80_D, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
200 {Z80_OR, Z80_A, Z80_REG, Z80_E, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
201 {Z80_OR, Z80_A, Z80_REG, Z80_H, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
202 {Z80_OR, Z80_A, Z80_REG, Z80_L, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
203 {Z80_OR, Z80_A, Z80_REG_INDIRECT, Z80_HL, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
204 {Z80_OR, Z80_A, Z80_REG, Z80_A, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
205 {Z80_OR, Z80_CP, Z80_REG, Z80_B, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
206 {Z80_OR, Z80_CP, Z80_REG, Z80_C, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
207 {Z80_OR, Z80_CP, Z80_REG, Z80_D, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
208 {Z80_OR, Z80_CP, Z80_REG, Z80_E, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
209 {Z80_OR, Z80_CP, Z80_REG, Z80_H, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
210 {Z80_OR, Z80_CP, Z80_REG, Z80_L, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
211 {Z80_OR, Z80_CP, Z80_REG_INDIRECT, Z80_HL, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
212 {Z80_OR, Z80_CP, Z80_REG, Z80_A, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
213 //C |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
214 {Z80_RETCC, Z80_CC_NZ, Z80_UNUSED, Z80_UNUSED, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
215 {Z80_POP, Z80_BC, Z80_UNUSED, Z80_UNUSED, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
216 {Z80_JPCC, Z80_CC_NZ, Z80_IMMED, Z80_UNUSED, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
217 {Z80_JP, Z80_UNUSED, Z80_IMMED, Z80_UNUSED, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
218 {Z80_CALLCC, Z80_CC_NZ, Z80_IMMED, Z80_UNUSED, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
219 {Z80_PUSH, Z80_BC, Z80_UNUSED, Z80_UNUSED, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
220 {Z80_ADD, Z80_A, Z80_IMMED, Z80_UNUSED, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
221 {Z80_RST, Z80_UNUSED, Z80_IMMED, Z80_UNUSED, 0x0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
222 {Z80_RETCC, Z80_CC_Z, Z80_UNUSED, Z80_UNUSED, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
223 {Z80_RET, Z80_UNUSED, Z80_UNUSED, Z80_UNUSED, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
224 {Z80_JPCC, Z80_CC_Z, Z80_IMMED, Z80_UNUSED, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
225 {0, 0, 0, 0, 0},//BITS Prefix |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
226 {Z80_CALLCC, Z80_CC_Z, Z80_IMMED, Z80_UNUSED, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
227 {Z80_CALL, Z80_UNUSED, Z80_IMMED, Z80_UNUSED, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
228 {Z80_ADC, Z80_A, Z80_IMMED, Z80_UNUSED, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
229 {Z80_RST, Z80_UNUSED, Z80_IMMED, Z80_UNUSED, 0x8}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
230 //D |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
231 {Z80_RETCC, Z80_CC_NC, Z80_UNUSED, Z80_UNUSED, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
232 {Z80_POP, Z80_DE, Z80_UNUSED, Z80_UNUSED, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
233 {Z80_JPCC, Z80_CC_NC, Z80_IMMED, Z80_UNUSED, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
234 {Z80_OUT, Z80_A, Z80_IMMED_INDIRECT, Z80_UNUSED, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
235 {Z80_CALLCC, Z80_CC_NC, Z80_IMMED, Z80_UNUSED, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
236 {Z80_PUSH, Z80_DE, Z80_UNUSED, Z80_UNUSED, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
237 {Z80_SUB, Z80_A, Z80_IMMED, Z80_UNUSED, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
238 {Z80_RST, Z80_UNUSED, Z80_IMMED, Z80_UNUSED, 0x10}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
239 {Z80_RETCC, Z80_CC_C, Z80_UNUSED, Z80_UNUSED, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
240 {Z80_EXX, Z80_UNUSED, Z80_UNUSED, Z80_UNUSED, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
241 {Z80_JPCC, Z80_CC_C, Z80_IMMED, Z80_UNUSED, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
242 {Z80_IN, Z80_A, Z80_IMMED_INDIRECT, Z80_UNUSED, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
243 {Z80_CALLCC, Z80_CC_C, Z80_IMMED, Z80_UNUSED, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
244 {0, 0, 0, 0, 0},//IX Prefix |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
245 {Z80_SBC, Z80_A, Z80_IMMED, Z80_UNUSED, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
246 {Z80_RST, Z80_UNUSED, Z80_IMMED, Z80_UNUSED, 0x18}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
247 //E |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
248 {Z80_RETCC, Z80_CC_PO, Z80_UNUSED, Z80_UNUSED, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
249 {Z80_POP, Z80_HL, Z80_UNUSED, Z80_UNUSED, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
250 {Z80_JPCC, Z80_CC_PO, Z80_IMMED, Z80_UNUSED, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
251 {Z80_EX, Z80_HL, Z80_REG_INDIRECT | Z80_DIR, Z80_SP, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
252 {Z80_CALLCC, Z80_CC_PO, Z80_IMMED, Z80_UNUSED, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
253 {Z80_PUSH, Z80_HL, Z80_UNUSED, Z80_UNUSED, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
254 {Z80_AND, Z80_A, Z80_IMMED, Z80_UNUSED, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
255 {Z80_RST, Z80_UNUSED, Z80_IMMED, Z80_UNUSED, 0x20}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
256 {Z80_RETCC, Z80_CC_PE, Z80_UNUSED, Z80_UNUSED, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
257 {Z80_JP, Z80_UNUSED, Z80_REG_INDIRECT, Z80_HL, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
258 {Z80_JPCC, Z80_CC_PE, Z80_IMMED, Z80_UNUSED, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
259 {Z80_EX, Z80_DE, Z80_REG, Z80_HL, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
260 {Z80_CALLCC, Z80_CC_PE, Z80_IMMED, Z80_UNUSED, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
261 {0, 0, 0, 0, 0},//EXTD Prefix |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
262 {Z80_XOR, Z80_A, Z80_IMMED, Z80_UNUSED, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
263 {Z80_RST, Z80_UNUSED, Z80_IMMED, Z80_UNUSED, 0x28}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
264 //F |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
265 {Z80_RETCC, Z80_CC_P, Z80_UNUSED, Z80_UNUSED, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
266 {Z80_POP, Z80_AF, Z80_UNUSED, Z80_UNUSED, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
267 {Z80_JPCC, Z80_CC_P, Z80_IMMED, Z80_UNUSED, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
268 {Z80_DI, Z80_UNUSED, Z80_UNUSED, Z80_UNUSED, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
269 {Z80_CALLCC, Z80_CC_P, Z80_IMMED, Z80_UNUSED, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
270 {Z80_PUSH, Z80_AF, Z80_UNUSED, Z80_UNUSED, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
271 {Z80_OR, Z80_A, Z80_IMMED, Z80_UNUSED, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
272 {Z80_RST, Z80_UNUSED, Z80_IMMED, Z80_UNUSED, 0x30}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
273 {Z80_RETCC, Z80_CC_M, Z80_UNUSED, Z80_UNUSED, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
274 {Z80_LD, Z80_SP, Z80_REG, Z80_HL, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
275 {Z80_JPCC, Z80_CC_M, Z80_IMMED, Z80_UNUSED, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
276 {Z80_EI, Z80_UNUSED, Z80_UNUSED, Z80_UNUSED, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
277 {Z80_CALLCC, Z80_CC_M, Z80_IMMED, Z80_UNUSED, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
278 {0, 0, 0, 0, 0},//IY Prefix |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
279 {Z80_CP, Z80_A, Z80_IMMED, Z80_UNUSED, 0}, |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
280 {Z80_RST, Z80_UNUSED, Z80_IMMED, Z80_UNUSED, 0x38} |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
281 }; |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
282 |
200
d3066ceb29d1
Add support for EXTD group 2-byte Z80 instructions in decoder
Mike Pavone <pavone@retrodev.com>
parents:
199
diff
changeset
|
283 z80inst z80_tbl_extd[0xC0-0x40] = { |
d3066ceb29d1
Add support for EXTD group 2-byte Z80 instructions in decoder
Mike Pavone <pavone@retrodev.com>
parents:
199
diff
changeset
|
284 //4 |
d3066ceb29d1
Add support for EXTD group 2-byte Z80 instructions in decoder
Mike Pavone <pavone@retrodev.com>
parents:
199
diff
changeset
|
285 {Z80_IN, Z80_B, Z80_REG_INDIRECT, Z80_C, 0}, |
d3066ceb29d1
Add support for EXTD group 2-byte Z80 instructions in decoder
Mike Pavone <pavone@retrodev.com>
parents:
199
diff
changeset
|
286 {Z80_OUT, Z80_B, Z80_REG_INDIRECT | Z80_DIR, Z80_C, 0}, |
d3066ceb29d1
Add support for EXTD group 2-byte Z80 instructions in decoder
Mike Pavone <pavone@retrodev.com>
parents:
199
diff
changeset
|
287 {Z80_SBC, Z80_HL, Z80_REG, Z80_BC, 0}, |
d3066ceb29d1
Add support for EXTD group 2-byte Z80 instructions in decoder
Mike Pavone <pavone@retrodev.com>
parents:
199
diff
changeset
|
288 {Z80_LD, Z80_BC, Z80_IMMED_INDIRECT | Z80_DIR, Z80_UNUSED, 0}, |
d3066ceb29d1
Add support for EXTD group 2-byte Z80 instructions in decoder
Mike Pavone <pavone@retrodev.com>
parents:
199
diff
changeset
|
289 {Z80_NEG, Z80_A, Z80_UNUSED, Z80_UNUSED, 0}, |
d3066ceb29d1
Add support for EXTD group 2-byte Z80 instructions in decoder
Mike Pavone <pavone@retrodev.com>
parents:
199
diff
changeset
|
290 {Z80_RETN, Z80_UNUSED, Z80_UNUSED, Z80_UNUSED, 0}, |
d3066ceb29d1
Add support for EXTD group 2-byte Z80 instructions in decoder
Mike Pavone <pavone@retrodev.com>
parents:
199
diff
changeset
|
291 {Z80_IM, Z80_UNUSED, Z80_IMMED, Z80_UNUSED, 0}, |
d3066ceb29d1
Add support for EXTD group 2-byte Z80 instructions in decoder
Mike Pavone <pavone@retrodev.com>
parents:
199
diff
changeset
|
292 {Z80_LD, Z80_I, Z80_REG, Z80_A, 0}, |
d3066ceb29d1
Add support for EXTD group 2-byte Z80 instructions in decoder
Mike Pavone <pavone@retrodev.com>
parents:
199
diff
changeset
|
293 {Z80_IN, Z80_C, Z80_REG_INDIRECT, Z80_C, 0}, |
d3066ceb29d1
Add support for EXTD group 2-byte Z80 instructions in decoder
Mike Pavone <pavone@retrodev.com>
parents:
199
diff
changeset
|
294 {Z80_OUT, Z80_C, Z80_REG_INDIRECT | Z80_DIR, Z80_C, 0}, |
d3066ceb29d1
Add support for EXTD group 2-byte Z80 instructions in decoder
Mike Pavone <pavone@retrodev.com>
parents:
199
diff
changeset
|
295 {Z80_ADC, Z80_HL, Z80_REG, Z80_BC, 0}, |
d3066ceb29d1
Add support for EXTD group 2-byte Z80 instructions in decoder
Mike Pavone <pavone@retrodev.com>
parents:
199
diff
changeset
|
296 {Z80_LD, Z80_BC, Z80_IMMED_INDIRECT, Z80_UNUSED, 0}, |
d3066ceb29d1
Add support for EXTD group 2-byte Z80 instructions in decoder
Mike Pavone <pavone@retrodev.com>
parents:
199
diff
changeset
|
297 {Z80_NEG, Z80_A, Z80_UNUSED, Z80_UNUSED, 0}, |
d3066ceb29d1
Add support for EXTD group 2-byte Z80 instructions in decoder
Mike Pavone <pavone@retrodev.com>
parents:
199
diff
changeset
|
298 {Z80_RETI, Z80_UNUSED, Z80_UNUSED, Z80_UNUSED, 0}, |
d3066ceb29d1
Add support for EXTD group 2-byte Z80 instructions in decoder
Mike Pavone <pavone@retrodev.com>
parents:
199
diff
changeset
|
299 {Z80_IM, Z80_UNUSED, Z80_IMMED, Z80_UNUSED, 3},//Set undocumented mode 0/1 |
d3066ceb29d1
Add support for EXTD group 2-byte Z80 instructions in decoder
Mike Pavone <pavone@retrodev.com>
parents:
199
diff
changeset
|
300 {Z80_LD, Z80_R, Z80_REG, Z80_A, 0}, |
d3066ceb29d1
Add support for EXTD group 2-byte Z80 instructions in decoder
Mike Pavone <pavone@retrodev.com>
parents:
199
diff
changeset
|
301 //5 |
d3066ceb29d1
Add support for EXTD group 2-byte Z80 instructions in decoder
Mike Pavone <pavone@retrodev.com>
parents:
199
diff
changeset
|
302 {Z80_IN, Z80_D, Z80_REG_INDIRECT, Z80_C, 0}, |
d3066ceb29d1
Add support for EXTD group 2-byte Z80 instructions in decoder
Mike Pavone <pavone@retrodev.com>
parents:
199
diff
changeset
|
303 {Z80_OUT, Z80_D, Z80_REG_INDIRECT | Z80_DIR, Z80_C, 0}, |
d3066ceb29d1
Add support for EXTD group 2-byte Z80 instructions in decoder
Mike Pavone <pavone@retrodev.com>
parents:
199
diff
changeset
|
304 {Z80_SBC, Z80_HL, Z80_REG, Z80_DE, 0}, |
d3066ceb29d1
Add support for EXTD group 2-byte Z80 instructions in decoder
Mike Pavone <pavone@retrodev.com>
parents:
199
diff
changeset
|
305 {Z80_LD, Z80_DE, Z80_IMMED_INDIRECT | Z80_DIR, Z80_UNUSED, 0}, |
d3066ceb29d1
Add support for EXTD group 2-byte Z80 instructions in decoder
Mike Pavone <pavone@retrodev.com>
parents:
199
diff
changeset
|
306 {Z80_NEG, Z80_A, Z80_UNUSED, Z80_UNUSED, 0}, |
d3066ceb29d1
Add support for EXTD group 2-byte Z80 instructions in decoder
Mike Pavone <pavone@retrodev.com>
parents:
199
diff
changeset
|
307 {Z80_RETN, Z80_UNUSED, Z80_UNUSED, Z80_UNUSED, 0}, |
d3066ceb29d1
Add support for EXTD group 2-byte Z80 instructions in decoder
Mike Pavone <pavone@retrodev.com>
parents:
199
diff
changeset
|
308 {Z80_IM, Z80_UNUSED, Z80_IMMED, Z80_UNUSED, 1}, |
d3066ceb29d1
Add support for EXTD group 2-byte Z80 instructions in decoder
Mike Pavone <pavone@retrodev.com>
parents:
199
diff
changeset
|
309 {Z80_LD, Z80_A, Z80_REG, Z80_I, 0}, |
d3066ceb29d1
Add support for EXTD group 2-byte Z80 instructions in decoder
Mike Pavone <pavone@retrodev.com>
parents:
199
diff
changeset
|
310 {Z80_IN, Z80_E, Z80_REG_INDIRECT, Z80_C, 0}, |
d3066ceb29d1
Add support for EXTD group 2-byte Z80 instructions in decoder
Mike Pavone <pavone@retrodev.com>
parents:
199
diff
changeset
|
311 {Z80_OUT, Z80_E, Z80_REG_INDIRECT | Z80_DIR, Z80_C, 0}, |
d3066ceb29d1
Add support for EXTD group 2-byte Z80 instructions in decoder
Mike Pavone <pavone@retrodev.com>
parents:
199
diff
changeset
|
312 {Z80_ADC, Z80_HL, Z80_REG, Z80_DE, 0}, |
d3066ceb29d1
Add support for EXTD group 2-byte Z80 instructions in decoder
Mike Pavone <pavone@retrodev.com>
parents:
199
diff
changeset
|
313 {Z80_LD, Z80_DE, Z80_IMMED_INDIRECT, Z80_UNUSED, 0}, |
d3066ceb29d1
Add support for EXTD group 2-byte Z80 instructions in decoder
Mike Pavone <pavone@retrodev.com>
parents:
199
diff
changeset
|
314 {Z80_NEG, Z80_A, Z80_UNUSED, Z80_UNUSED, 0}, |
d3066ceb29d1
Add support for EXTD group 2-byte Z80 instructions in decoder
Mike Pavone <pavone@retrodev.com>
parents:
199
diff
changeset
|
315 {Z80_RETN, Z80_UNUSED, Z80_UNUSED, Z80_UNUSED, 0}, |
d3066ceb29d1
Add support for EXTD group 2-byte Z80 instructions in decoder
Mike Pavone <pavone@retrodev.com>
parents:
199
diff
changeset
|
316 {Z80_IM, Z80_UNUSED, Z80_IMMED, Z80_UNUSED, 2}, |
d3066ceb29d1
Add support for EXTD group 2-byte Z80 instructions in decoder
Mike Pavone <pavone@retrodev.com>
parents:
199
diff
changeset
|
317 {Z80_LD, Z80_A, Z80_REG, Z80_R, 0}, |
d3066ceb29d1
Add support for EXTD group 2-byte Z80 instructions in decoder
Mike Pavone <pavone@retrodev.com>
parents:
199
diff
changeset
|
318 //6 |
d3066ceb29d1
Add support for EXTD group 2-byte Z80 instructions in decoder
Mike Pavone <pavone@retrodev.com>
parents:
199
diff
changeset
|
319 {Z80_IN, Z80_H, Z80_REG_INDIRECT, Z80_C, 0}, |
d3066ceb29d1
Add support for EXTD group 2-byte Z80 instructions in decoder
Mike Pavone <pavone@retrodev.com>
parents:
199
diff
changeset
|
320 {Z80_OUT, Z80_H, Z80_REG_INDIRECT | Z80_DIR, Z80_C, 0}, |
d3066ceb29d1
Add support for EXTD group 2-byte Z80 instructions in decoder
Mike Pavone <pavone@retrodev.com>
parents:
199
diff
changeset
|
321 {Z80_SBC, Z80_HL, Z80_REG, Z80_HL, 0}, |
d3066ceb29d1
Add support for EXTD group 2-byte Z80 instructions in decoder
Mike Pavone <pavone@retrodev.com>
parents:
199
diff
changeset
|
322 {Z80_LD, Z80_HL, Z80_IMMED_INDIRECT | Z80_DIR, Z80_UNUSED, 0}, |
d3066ceb29d1
Add support for EXTD group 2-byte Z80 instructions in decoder
Mike Pavone <pavone@retrodev.com>
parents:
199
diff
changeset
|
323 {Z80_NEG, Z80_A, Z80_UNUSED, Z80_UNUSED, 0}, |
d3066ceb29d1
Add support for EXTD group 2-byte Z80 instructions in decoder
Mike Pavone <pavone@retrodev.com>
parents:
199
diff
changeset
|
324 {Z80_RETN, Z80_UNUSED, Z80_UNUSED, Z80_UNUSED, 0}, |
d3066ceb29d1
Add support for EXTD group 2-byte Z80 instructions in decoder
Mike Pavone <pavone@retrodev.com>
parents:
199
diff
changeset
|
325 {Z80_IM, Z80_UNUSED, Z80_IMMED, Z80_UNUSED, 0}, |
d3066ceb29d1
Add support for EXTD group 2-byte Z80 instructions in decoder
Mike Pavone <pavone@retrodev.com>
parents:
199
diff
changeset
|
326 {Z80_RRD, Z80_UNUSED, Z80_UNUSED, Z80_UNUSED, 0}, |
d3066ceb29d1
Add support for EXTD group 2-byte Z80 instructions in decoder
Mike Pavone <pavone@retrodev.com>
parents:
199
diff
changeset
|
327 {Z80_IN, Z80_L, Z80_REG_INDIRECT, Z80_C, 0}, |
d3066ceb29d1
Add support for EXTD group 2-byte Z80 instructions in decoder
Mike Pavone <pavone@retrodev.com>
parents:
199
diff
changeset
|
328 {Z80_OUT, Z80_L, Z80_REG_INDIRECT | Z80_DIR, Z80_C, 0}, |
d3066ceb29d1
Add support for EXTD group 2-byte Z80 instructions in decoder
Mike Pavone <pavone@retrodev.com>
parents:
199
diff
changeset
|
329 {Z80_ADC, Z80_HL, Z80_REG, Z80_HL, 0}, |
d3066ceb29d1
Add support for EXTD group 2-byte Z80 instructions in decoder
Mike Pavone <pavone@retrodev.com>
parents:
199
diff
changeset
|
330 {Z80_LD, Z80_HL, Z80_IMMED_INDIRECT, Z80_UNUSED, 0}, |
d3066ceb29d1
Add support for EXTD group 2-byte Z80 instructions in decoder
Mike Pavone <pavone@retrodev.com>
parents:
199
diff
changeset
|
331 {Z80_NEG, Z80_A, Z80_UNUSED, Z80_UNUSED, 0}, |
d3066ceb29d1
Add support for EXTD group 2-byte Z80 instructions in decoder
Mike Pavone <pavone@retrodev.com>
parents:
199
diff
changeset
|
332 {Z80_RETN, Z80_UNUSED, Z80_UNUSED, Z80_UNUSED, 0}, |
d3066ceb29d1
Add support for EXTD group 2-byte Z80 instructions in decoder
Mike Pavone <pavone@retrodev.com>
parents:
199
diff
changeset
|
333 {Z80_IM, Z80_UNUSED, Z80_IMMED, Z80_UNUSED, 3},//Set undocumented mode 0/1 |
d3066ceb29d1
Add support for EXTD group 2-byte Z80 instructions in decoder
Mike Pavone <pavone@retrodev.com>
parents:
199
diff
changeset
|
334 {Z80_RLD, Z80_UNUSED, Z80_UNUSED, Z80_UNUSED, 0}, |
d3066ceb29d1
Add support for EXTD group 2-byte Z80 instructions in decoder
Mike Pavone <pavone@retrodev.com>
parents:
199
diff
changeset
|
335 //7 |
d3066ceb29d1
Add support for EXTD group 2-byte Z80 instructions in decoder
Mike Pavone <pavone@retrodev.com>
parents:
199
diff
changeset
|
336 {Z80_IN, Z80_UNUSED, Z80_REG_INDIRECT, Z80_C, 0}, |
d3066ceb29d1
Add support for EXTD group 2-byte Z80 instructions in decoder
Mike Pavone <pavone@retrodev.com>
parents:
199
diff
changeset
|
337 {Z80_OUT, Z80_USE_IMMED, Z80_REG_INDIRECT | Z80_DIR, Z80_C, 0}, |
d3066ceb29d1
Add support for EXTD group 2-byte Z80 instructions in decoder
Mike Pavone <pavone@retrodev.com>
parents:
199
diff
changeset
|
338 {Z80_SBC, Z80_HL, Z80_REG, Z80_SP, 0}, |
d3066ceb29d1
Add support for EXTD group 2-byte Z80 instructions in decoder
Mike Pavone <pavone@retrodev.com>
parents:
199
diff
changeset
|
339 {Z80_LD, Z80_SP, Z80_IMMED_INDIRECT | Z80_DIR, Z80_UNUSED, 0}, |
d3066ceb29d1
Add support for EXTD group 2-byte Z80 instructions in decoder
Mike Pavone <pavone@retrodev.com>
parents:
199
diff
changeset
|
340 {Z80_NEG, Z80_A, Z80_UNUSED, Z80_UNUSED, 0}, |
d3066ceb29d1
Add support for EXTD group 2-byte Z80 instructions in decoder
Mike Pavone <pavone@retrodev.com>
parents:
199
diff
changeset
|
341 {Z80_RETN, Z80_UNUSED, Z80_UNUSED, Z80_UNUSED, 0}, |
d3066ceb29d1
Add support for EXTD group 2-byte Z80 instructions in decoder
Mike Pavone <pavone@retrodev.com>
parents:
199
diff
changeset
|
342 {Z80_IM, Z80_UNUSED, Z80_IMMED, Z80_UNUSED, 1}, |
202
693ad04b965e
Distinguish between 1-byte and 2-byte NOPs
Mike Pavone <pavone@retrodev.com>
parents:
201
diff
changeset
|
343 NOP2, |
200
d3066ceb29d1
Add support for EXTD group 2-byte Z80 instructions in decoder
Mike Pavone <pavone@retrodev.com>
parents:
199
diff
changeset
|
344 {Z80_IN, Z80_A, Z80_REG_INDIRECT, Z80_C, 0}, |
d3066ceb29d1
Add support for EXTD group 2-byte Z80 instructions in decoder
Mike Pavone <pavone@retrodev.com>
parents:
199
diff
changeset
|
345 {Z80_OUT, Z80_A, Z80_REG_INDIRECT | Z80_DIR, Z80_C, 0}, |
d3066ceb29d1
Add support for EXTD group 2-byte Z80 instructions in decoder
Mike Pavone <pavone@retrodev.com>
parents:
199
diff
changeset
|
346 {Z80_ADC, Z80_HL, Z80_REG, Z80_SP, 0}, |
d3066ceb29d1
Add support for EXTD group 2-byte Z80 instructions in decoder
Mike Pavone <pavone@retrodev.com>
parents:
199
diff
changeset
|
347 {Z80_LD, Z80_SP, Z80_IMMED_INDIRECT, Z80_UNUSED, 0}, |
d3066ceb29d1
Add support for EXTD group 2-byte Z80 instructions in decoder
Mike Pavone <pavone@retrodev.com>
parents:
199
diff
changeset
|
348 {Z80_NEG, Z80_A, Z80_UNUSED, Z80_UNUSED, 0}, |
d3066ceb29d1
Add support for EXTD group 2-byte Z80 instructions in decoder
Mike Pavone <pavone@retrodev.com>
parents:
199
diff
changeset
|
349 {Z80_RETN, Z80_UNUSED, Z80_UNUSED, Z80_UNUSED, 0}, |
d3066ceb29d1
Add support for EXTD group 2-byte Z80 instructions in decoder
Mike Pavone <pavone@retrodev.com>
parents:
199
diff
changeset
|
350 {Z80_IM, Z80_UNUSED, Z80_IMMED, Z80_UNUSED, 2}, |
202
693ad04b965e
Distinguish between 1-byte and 2-byte NOPs
Mike Pavone <pavone@retrodev.com>
parents:
201
diff
changeset
|
351 NOP2, |
200
d3066ceb29d1
Add support for EXTD group 2-byte Z80 instructions in decoder
Mike Pavone <pavone@retrodev.com>
parents:
199
diff
changeset
|
352 //8 |
202
693ad04b965e
Distinguish between 1-byte and 2-byte NOPs
Mike Pavone <pavone@retrodev.com>
parents:
201
diff
changeset
|
353 NOP2, |
693ad04b965e
Distinguish between 1-byte and 2-byte NOPs
Mike Pavone <pavone@retrodev.com>
parents:
201
diff
changeset
|
354 NOP2, |
693ad04b965e
Distinguish between 1-byte and 2-byte NOPs
Mike Pavone <pavone@retrodev.com>
parents:
201
diff
changeset
|
355 NOP2, |
693ad04b965e
Distinguish between 1-byte and 2-byte NOPs
Mike Pavone <pavone@retrodev.com>
parents:
201
diff
changeset
|
356 NOP2, |
693ad04b965e
Distinguish between 1-byte and 2-byte NOPs
Mike Pavone <pavone@retrodev.com>
parents:
201
diff
changeset
|
357 NOP2, |
693ad04b965e
Distinguish between 1-byte and 2-byte NOPs
Mike Pavone <pavone@retrodev.com>
parents:
201
diff
changeset
|
358 NOP2, |
693ad04b965e
Distinguish between 1-byte and 2-byte NOPs
Mike Pavone <pavone@retrodev.com>
parents:
201
diff
changeset
|
359 NOP2, |
693ad04b965e
Distinguish between 1-byte and 2-byte NOPs
Mike Pavone <pavone@retrodev.com>
parents:
201
diff
changeset
|
360 NOP2, |
693ad04b965e
Distinguish between 1-byte and 2-byte NOPs
Mike Pavone <pavone@retrodev.com>
parents:
201
diff
changeset
|
361 NOP2, |
693ad04b965e
Distinguish between 1-byte and 2-byte NOPs
Mike Pavone <pavone@retrodev.com>
parents:
201
diff
changeset
|
362 NOP2, |
693ad04b965e
Distinguish between 1-byte and 2-byte NOPs
Mike Pavone <pavone@retrodev.com>
parents:
201
diff
changeset
|
363 NOP2, |
693ad04b965e
Distinguish between 1-byte and 2-byte NOPs
Mike Pavone <pavone@retrodev.com>
parents:
201
diff
changeset
|
364 NOP2, |
693ad04b965e
Distinguish between 1-byte and 2-byte NOPs
Mike Pavone <pavone@retrodev.com>
parents:
201
diff
changeset
|
365 NOP2, |
693ad04b965e
Distinguish between 1-byte and 2-byte NOPs
Mike Pavone <pavone@retrodev.com>
parents:
201
diff
changeset
|
366 NOP2, |
693ad04b965e
Distinguish between 1-byte and 2-byte NOPs
Mike Pavone <pavone@retrodev.com>
parents:
201
diff
changeset
|
367 NOP2, |
693ad04b965e
Distinguish between 1-byte and 2-byte NOPs
Mike Pavone <pavone@retrodev.com>
parents:
201
diff
changeset
|
368 NOP2, |
200
d3066ceb29d1
Add support for EXTD group 2-byte Z80 instructions in decoder
Mike Pavone <pavone@retrodev.com>
parents:
199
diff
changeset
|
369 //9 |
202
693ad04b965e
Distinguish between 1-byte and 2-byte NOPs
Mike Pavone <pavone@retrodev.com>
parents:
201
diff
changeset
|
370 NOP2, |
693ad04b965e
Distinguish between 1-byte and 2-byte NOPs
Mike Pavone <pavone@retrodev.com>
parents:
201
diff
changeset
|
371 NOP2, |
693ad04b965e
Distinguish between 1-byte and 2-byte NOPs
Mike Pavone <pavone@retrodev.com>
parents:
201
diff
changeset
|
372 NOP2, |
693ad04b965e
Distinguish between 1-byte and 2-byte NOPs
Mike Pavone <pavone@retrodev.com>
parents:
201
diff
changeset
|
373 NOP2, |
693ad04b965e
Distinguish between 1-byte and 2-byte NOPs
Mike Pavone <pavone@retrodev.com>
parents:
201
diff
changeset
|
374 NOP2, |
693ad04b965e
Distinguish between 1-byte and 2-byte NOPs
Mike Pavone <pavone@retrodev.com>
parents:
201
diff
changeset
|
375 NOP2, |
693ad04b965e
Distinguish between 1-byte and 2-byte NOPs
Mike Pavone <pavone@retrodev.com>
parents:
201
diff
changeset
|
376 NOP2, |
693ad04b965e
Distinguish between 1-byte and 2-byte NOPs
Mike Pavone <pavone@retrodev.com>
parents:
201
diff
changeset
|
377 NOP2, |
693ad04b965e
Distinguish between 1-byte and 2-byte NOPs
Mike Pavone <pavone@retrodev.com>
parents:
201
diff
changeset
|
378 NOP2, |
693ad04b965e
Distinguish between 1-byte and 2-byte NOPs
Mike Pavone <pavone@retrodev.com>
parents:
201
diff
changeset
|
379 NOP2, |
693ad04b965e
Distinguish between 1-byte and 2-byte NOPs
Mike Pavone <pavone@retrodev.com>
parents:
201
diff
changeset
|
380 NOP2, |
693ad04b965e
Distinguish between 1-byte and 2-byte NOPs
Mike Pavone <pavone@retrodev.com>
parents:
201
diff
changeset
|
381 NOP2, |
693ad04b965e
Distinguish between 1-byte and 2-byte NOPs
Mike Pavone <pavone@retrodev.com>
parents:
201
diff
changeset
|
382 NOP2, |
693ad04b965e
Distinguish between 1-byte and 2-byte NOPs
Mike Pavone <pavone@retrodev.com>
parents:
201
diff
changeset
|
383 NOP2, |
693ad04b965e
Distinguish between 1-byte and 2-byte NOPs
Mike Pavone <pavone@retrodev.com>
parents:
201
diff
changeset
|
384 NOP2, |
693ad04b965e
Distinguish between 1-byte and 2-byte NOPs
Mike Pavone <pavone@retrodev.com>
parents:
201
diff
changeset
|
385 NOP2, |
200
d3066ceb29d1
Add support for EXTD group 2-byte Z80 instructions in decoder
Mike Pavone <pavone@retrodev.com>
parents:
199
diff
changeset
|
386 //A |
d3066ceb29d1
Add support for EXTD group 2-byte Z80 instructions in decoder
Mike Pavone <pavone@retrodev.com>
parents:
199
diff
changeset
|
387 {Z80_LDI, Z80_UNUSED, Z80_UNUSED, Z80_UNUSED, 0}, |
d3066ceb29d1
Add support for EXTD group 2-byte Z80 instructions in decoder
Mike Pavone <pavone@retrodev.com>
parents:
199
diff
changeset
|
388 {Z80_CPI, Z80_UNUSED, Z80_UNUSED, Z80_UNUSED, 0}, |
d3066ceb29d1
Add support for EXTD group 2-byte Z80 instructions in decoder
Mike Pavone <pavone@retrodev.com>
parents:
199
diff
changeset
|
389 {Z80_INI, Z80_UNUSED, Z80_UNUSED, Z80_UNUSED, 0}, |
d3066ceb29d1
Add support for EXTD group 2-byte Z80 instructions in decoder
Mike Pavone <pavone@retrodev.com>
parents:
199
diff
changeset
|
390 {Z80_OUTI, Z80_UNUSED, Z80_UNUSED, Z80_UNUSED, 0}, |
202
693ad04b965e
Distinguish between 1-byte and 2-byte NOPs
Mike Pavone <pavone@retrodev.com>
parents:
201
diff
changeset
|
391 NOP2, |
693ad04b965e
Distinguish between 1-byte and 2-byte NOPs
Mike Pavone <pavone@retrodev.com>
parents:
201
diff
changeset
|
392 NOP2, |
693ad04b965e
Distinguish between 1-byte and 2-byte NOPs
Mike Pavone <pavone@retrodev.com>
parents:
201
diff
changeset
|
393 NOP2, |
693ad04b965e
Distinguish between 1-byte and 2-byte NOPs
Mike Pavone <pavone@retrodev.com>
parents:
201
diff
changeset
|
394 NOP2, |
200
d3066ceb29d1
Add support for EXTD group 2-byte Z80 instructions in decoder
Mike Pavone <pavone@retrodev.com>
parents:
199
diff
changeset
|
395 {Z80_LDD, Z80_UNUSED, Z80_UNUSED, Z80_UNUSED, 0}, |
d3066ceb29d1
Add support for EXTD group 2-byte Z80 instructions in decoder
Mike Pavone <pavone@retrodev.com>
parents:
199
diff
changeset
|
396 {Z80_CPD, Z80_UNUSED, Z80_UNUSED, Z80_UNUSED, 0}, |
d3066ceb29d1
Add support for EXTD group 2-byte Z80 instructions in decoder
Mike Pavone <pavone@retrodev.com>
parents:
199
diff
changeset
|
397 {Z80_IND, Z80_UNUSED, Z80_UNUSED, Z80_UNUSED, 0}, |
d3066ceb29d1
Add support for EXTD group 2-byte Z80 instructions in decoder
Mike Pavone <pavone@retrodev.com>
parents:
199
diff
changeset
|
398 {Z80_OUTD, Z80_UNUSED, Z80_UNUSED, Z80_UNUSED, 0}, |
202
693ad04b965e
Distinguish between 1-byte and 2-byte NOPs
Mike Pavone <pavone@retrodev.com>
parents:
201
diff
changeset
|
399 NOP2, |
693ad04b965e
Distinguish between 1-byte and 2-byte NOPs
Mike Pavone <pavone@retrodev.com>
parents:
201
diff
changeset
|
400 NOP2, |
693ad04b965e
Distinguish between 1-byte and 2-byte NOPs
Mike Pavone <pavone@retrodev.com>
parents:
201
diff
changeset
|
401 NOP2, |
693ad04b965e
Distinguish between 1-byte and 2-byte NOPs
Mike Pavone <pavone@retrodev.com>
parents:
201
diff
changeset
|
402 NOP2, |
200
d3066ceb29d1
Add support for EXTD group 2-byte Z80 instructions in decoder
Mike Pavone <pavone@retrodev.com>
parents:
199
diff
changeset
|
403 //B |
d3066ceb29d1
Add support for EXTD group 2-byte Z80 instructions in decoder
Mike Pavone <pavone@retrodev.com>
parents:
199
diff
changeset
|
404 {Z80_LDIR, Z80_UNUSED, Z80_UNUSED, Z80_UNUSED, 0}, |
d3066ceb29d1
Add support for EXTD group 2-byte Z80 instructions in decoder
Mike Pavone <pavone@retrodev.com>
parents:
199
diff
changeset
|
405 {Z80_CPIR, Z80_UNUSED, Z80_UNUSED, Z80_UNUSED, 0}, |
d3066ceb29d1
Add support for EXTD group 2-byte Z80 instructions in decoder
Mike Pavone <pavone@retrodev.com>
parents:
199
diff
changeset
|
406 {Z80_INIR, Z80_UNUSED, Z80_UNUSED, Z80_UNUSED, 0}, |
d3066ceb29d1
Add support for EXTD group 2-byte Z80 instructions in decoder
Mike Pavone <pavone@retrodev.com>
parents:
199
diff
changeset
|
407 {Z80_OTIR, Z80_UNUSED, Z80_UNUSED, Z80_UNUSED, 0}, |
202
693ad04b965e
Distinguish between 1-byte and 2-byte NOPs
Mike Pavone <pavone@retrodev.com>
parents:
201
diff
changeset
|
408 NOP2, |
693ad04b965e
Distinguish between 1-byte and 2-byte NOPs
Mike Pavone <pavone@retrodev.com>
parents:
201
diff
changeset
|
409 NOP2, |
693ad04b965e
Distinguish between 1-byte and 2-byte NOPs
Mike Pavone <pavone@retrodev.com>
parents:
201
diff
changeset
|
410 NOP2, |
693ad04b965e
Distinguish between 1-byte and 2-byte NOPs
Mike Pavone <pavone@retrodev.com>
parents:
201
diff
changeset
|
411 NOP2, |
200
d3066ceb29d1
Add support for EXTD group 2-byte Z80 instructions in decoder
Mike Pavone <pavone@retrodev.com>
parents:
199
diff
changeset
|
412 {Z80_LDDR, Z80_UNUSED, Z80_UNUSED, Z80_UNUSED, 0}, |
d3066ceb29d1
Add support for EXTD group 2-byte Z80 instructions in decoder
Mike Pavone <pavone@retrodev.com>
parents:
199
diff
changeset
|
413 {Z80_CPDR, Z80_UNUSED, Z80_UNUSED, Z80_UNUSED, 0}, |
d3066ceb29d1
Add support for EXTD group 2-byte Z80 instructions in decoder
Mike Pavone <pavone@retrodev.com>
parents:
199
diff
changeset
|
414 {Z80_INDR, Z80_UNUSED, Z80_UNUSED, Z80_UNUSED, 0}, |
d3066ceb29d1
Add support for EXTD group 2-byte Z80 instructions in decoder
Mike Pavone <pavone@retrodev.com>
parents:
199
diff
changeset
|
415 {Z80_OTDR, Z80_UNUSED, Z80_UNUSED, Z80_UNUSED, 0}, |
202
693ad04b965e
Distinguish between 1-byte and 2-byte NOPs
Mike Pavone <pavone@retrodev.com>
parents:
201
diff
changeset
|
416 NOP2, |
693ad04b965e
Distinguish between 1-byte and 2-byte NOPs
Mike Pavone <pavone@retrodev.com>
parents:
201
diff
changeset
|
417 NOP2, |
693ad04b965e
Distinguish between 1-byte and 2-byte NOPs
Mike Pavone <pavone@retrodev.com>
parents:
201
diff
changeset
|
418 NOP2, |
693ad04b965e
Distinguish between 1-byte and 2-byte NOPs
Mike Pavone <pavone@retrodev.com>
parents:
201
diff
changeset
|
419 NOP2 |
200
d3066ceb29d1
Add support for EXTD group 2-byte Z80 instructions in decoder
Mike Pavone <pavone@retrodev.com>
parents:
199
diff
changeset
|
420 }; |
d3066ceb29d1
Add support for EXTD group 2-byte Z80 instructions in decoder
Mike Pavone <pavone@retrodev.com>
parents:
199
diff
changeset
|
421 |
201
2d2fa345e1fc
Add support for bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
200
diff
changeset
|
422 #define SHIFT_BLOCK(op) \ |
247
682e505f5757
Implement rotation and bit set/reset instructions (untested).
Mike Pavone <pavone@retrodev.com>
parents:
235
diff
changeset
|
423 {op, Z80_B, Z80_UNUSED, Z80_UNUSED, 1},\ |
682e505f5757
Implement rotation and bit set/reset instructions (untested).
Mike Pavone <pavone@retrodev.com>
parents:
235
diff
changeset
|
424 {op, Z80_C, Z80_UNUSED, Z80_UNUSED, 1},\ |
682e505f5757
Implement rotation and bit set/reset instructions (untested).
Mike Pavone <pavone@retrodev.com>
parents:
235
diff
changeset
|
425 {op, Z80_D, Z80_UNUSED, Z80_UNUSED, 1},\ |
682e505f5757
Implement rotation and bit set/reset instructions (untested).
Mike Pavone <pavone@retrodev.com>
parents:
235
diff
changeset
|
426 {op, Z80_E, Z80_UNUSED, Z80_UNUSED, 1},\ |
682e505f5757
Implement rotation and bit set/reset instructions (untested).
Mike Pavone <pavone@retrodev.com>
parents:
235
diff
changeset
|
427 {op, Z80_H, Z80_UNUSED, Z80_UNUSED, 1},\ |
682e505f5757
Implement rotation and bit set/reset instructions (untested).
Mike Pavone <pavone@retrodev.com>
parents:
235
diff
changeset
|
428 {op, Z80_L, Z80_UNUSED, Z80_UNUSED, 1},\ |
682e505f5757
Implement rotation and bit set/reset instructions (untested).
Mike Pavone <pavone@retrodev.com>
parents:
235
diff
changeset
|
429 {op, Z80_UNUSED, Z80_REG_INDIRECT, Z80_HL, 1},\ |
682e505f5757
Implement rotation and bit set/reset instructions (untested).
Mike Pavone <pavone@retrodev.com>
parents:
235
diff
changeset
|
430 {op, Z80_A, Z80_UNUSED, Z80_UNUSED, 1} |
201
2d2fa345e1fc
Add support for bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
200
diff
changeset
|
431 |
2d2fa345e1fc
Add support for bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
200
diff
changeset
|
432 #define BIT_BLOCK(op, bit) \ |
2d2fa345e1fc
Add support for bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
200
diff
changeset
|
433 {op, Z80_USE_IMMED, Z80_REG, Z80_B, bit},\ |
2d2fa345e1fc
Add support for bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
200
diff
changeset
|
434 {op, Z80_USE_IMMED, Z80_REG, Z80_C, bit},\ |
2d2fa345e1fc
Add support for bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
200
diff
changeset
|
435 {op, Z80_USE_IMMED, Z80_REG, Z80_D, bit},\ |
2d2fa345e1fc
Add support for bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
200
diff
changeset
|
436 {op, Z80_USE_IMMED, Z80_REG, Z80_E, bit},\ |
2d2fa345e1fc
Add support for bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
200
diff
changeset
|
437 {op, Z80_USE_IMMED, Z80_REG, Z80_H, bit},\ |
2d2fa345e1fc
Add support for bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
200
diff
changeset
|
438 {op, Z80_USE_IMMED, Z80_REG, Z80_L, bit},\ |
2d2fa345e1fc
Add support for bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
200
diff
changeset
|
439 {op, Z80_USE_IMMED, Z80_REG_INDIRECT, Z80_HL, bit},\ |
2d2fa345e1fc
Add support for bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
200
diff
changeset
|
440 {op, Z80_USE_IMMED, Z80_REG, Z80_A, bit} |
2d2fa345e1fc
Add support for bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
200
diff
changeset
|
441 |
2d2fa345e1fc
Add support for bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
200
diff
changeset
|
442 z80inst z80_tbl_bit[256] = { |
2d2fa345e1fc
Add support for bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
200
diff
changeset
|
443 //0 |
2d2fa345e1fc
Add support for bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
200
diff
changeset
|
444 SHIFT_BLOCK(Z80_RLC), |
2d2fa345e1fc
Add support for bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
200
diff
changeset
|
445 SHIFT_BLOCK(Z80_RRC), |
2d2fa345e1fc
Add support for bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
200
diff
changeset
|
446 //1 |
2d2fa345e1fc
Add support for bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
200
diff
changeset
|
447 SHIFT_BLOCK(Z80_RL), |
2d2fa345e1fc
Add support for bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
200
diff
changeset
|
448 SHIFT_BLOCK(Z80_RR), |
2d2fa345e1fc
Add support for bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
200
diff
changeset
|
449 //2 |
2d2fa345e1fc
Add support for bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
200
diff
changeset
|
450 SHIFT_BLOCK(Z80_SLA), |
2d2fa345e1fc
Add support for bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
200
diff
changeset
|
451 SHIFT_BLOCK(Z80_SRA), |
2d2fa345e1fc
Add support for bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
200
diff
changeset
|
452 //3 |
2d2fa345e1fc
Add support for bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
200
diff
changeset
|
453 SHIFT_BLOCK(Z80_SLL), |
2d2fa345e1fc
Add support for bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
200
diff
changeset
|
454 SHIFT_BLOCK(Z80_SRL), |
2d2fa345e1fc
Add support for bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
200
diff
changeset
|
455 //4 |
2d2fa345e1fc
Add support for bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
200
diff
changeset
|
456 BIT_BLOCK(Z80_BIT, 0), |
2d2fa345e1fc
Add support for bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
200
diff
changeset
|
457 BIT_BLOCK(Z80_BIT, 1), |
2d2fa345e1fc
Add support for bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
200
diff
changeset
|
458 //5 |
2d2fa345e1fc
Add support for bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
200
diff
changeset
|
459 BIT_BLOCK(Z80_BIT, 2), |
2d2fa345e1fc
Add support for bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
200
diff
changeset
|
460 BIT_BLOCK(Z80_BIT, 3), |
2d2fa345e1fc
Add support for bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
200
diff
changeset
|
461 //6 |
2d2fa345e1fc
Add support for bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
200
diff
changeset
|
462 BIT_BLOCK(Z80_BIT, 4), |
2d2fa345e1fc
Add support for bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
200
diff
changeset
|
463 BIT_BLOCK(Z80_BIT, 5), |
2d2fa345e1fc
Add support for bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
200
diff
changeset
|
464 //7 |
2d2fa345e1fc
Add support for bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
200
diff
changeset
|
465 BIT_BLOCK(Z80_BIT, 6), |
2d2fa345e1fc
Add support for bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
200
diff
changeset
|
466 BIT_BLOCK(Z80_BIT, 7), |
2d2fa345e1fc
Add support for bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
200
diff
changeset
|
467 //8 |
2d2fa345e1fc
Add support for bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
200
diff
changeset
|
468 BIT_BLOCK(Z80_RES, 0), |
2d2fa345e1fc
Add support for bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
200
diff
changeset
|
469 BIT_BLOCK(Z80_RES, 1), |
2d2fa345e1fc
Add support for bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
200
diff
changeset
|
470 //9 |
2d2fa345e1fc
Add support for bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
200
diff
changeset
|
471 BIT_BLOCK(Z80_RES, 2), |
2d2fa345e1fc
Add support for bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
200
diff
changeset
|
472 BIT_BLOCK(Z80_RES, 3), |
2d2fa345e1fc
Add support for bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
200
diff
changeset
|
473 //A |
2d2fa345e1fc
Add support for bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
200
diff
changeset
|
474 BIT_BLOCK(Z80_RES, 4), |
2d2fa345e1fc
Add support for bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
200
diff
changeset
|
475 BIT_BLOCK(Z80_RES, 5), |
2d2fa345e1fc
Add support for bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
200
diff
changeset
|
476 //B |
2d2fa345e1fc
Add support for bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
200
diff
changeset
|
477 BIT_BLOCK(Z80_RES, 6), |
2d2fa345e1fc
Add support for bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
200
diff
changeset
|
478 BIT_BLOCK(Z80_RES, 7), |
2d2fa345e1fc
Add support for bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
200
diff
changeset
|
479 //C |
2d2fa345e1fc
Add support for bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
200
diff
changeset
|
480 BIT_BLOCK(Z80_SET, 0), |
2d2fa345e1fc
Add support for bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
200
diff
changeset
|
481 BIT_BLOCK(Z80_SET, 1), |
2d2fa345e1fc
Add support for bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
200
diff
changeset
|
482 //D |
2d2fa345e1fc
Add support for bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
200
diff
changeset
|
483 BIT_BLOCK(Z80_SET, 2), |
2d2fa345e1fc
Add support for bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
200
diff
changeset
|
484 BIT_BLOCK(Z80_SET, 3), |
2d2fa345e1fc
Add support for bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
200
diff
changeset
|
485 //E |
2d2fa345e1fc
Add support for bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
200
diff
changeset
|
486 BIT_BLOCK(Z80_SET, 4), |
2d2fa345e1fc
Add support for bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
200
diff
changeset
|
487 BIT_BLOCK(Z80_SET, 5), |
2d2fa345e1fc
Add support for bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
200
diff
changeset
|
488 //F |
2d2fa345e1fc
Add support for bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
200
diff
changeset
|
489 BIT_BLOCK(Z80_SET, 6), |
2d2fa345e1fc
Add support for bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
200
diff
changeset
|
490 BIT_BLOCK(Z80_SET, 7) |
2d2fa345e1fc
Add support for bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
200
diff
changeset
|
491 }; |
2d2fa345e1fc
Add support for bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
200
diff
changeset
|
492 |
203
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
493 z80inst z80_tbl_ix[256] = { |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
494 //0 |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
495 NOP2, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
496 NOP2, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
497 NOP2, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
498 NOP2, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
499 NOP2, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
500 NOP2, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
501 NOP2, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
502 NOP2, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
503 NOP2, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
504 {Z80_ADD, Z80_IX, Z80_REG, Z80_BC, 0}, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
505 NOP2, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
506 NOP2, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
507 NOP2, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
508 NOP2, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
509 NOP2, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
510 NOP2, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
511 //1 |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
512 NOP2, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
513 NOP2, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
514 NOP2, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
515 NOP2, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
516 NOP2, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
517 NOP2, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
518 NOP2, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
519 NOP2, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
520 NOP2, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
521 {Z80_ADD, Z80_IX, Z80_REG, Z80_DE, 0}, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
522 NOP2, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
523 NOP2, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
524 NOP2, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
525 NOP2, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
526 NOP2, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
527 NOP2, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
528 //2 |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
529 NOP2, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
530 {Z80_LD, Z80_IX, Z80_IMMED, Z80_UNUSED, 0}, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
531 {Z80_LD, Z80_IX, Z80_IMMED_INDIRECT | Z80_DIR, Z80_UNUSED, 0}, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
532 {Z80_INC, Z80_IX, Z80_UNUSED, Z80_UNUSED, 0}, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
533 {Z80_INC, Z80_IXH, Z80_UNUSED, Z80_UNUSED, 0}, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
534 {Z80_DEC, Z80_IXH, Z80_UNUSED, Z80_UNUSED, 0}, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
535 {Z80_LD, Z80_IXH, Z80_IMMED, Z80_UNUSED, 0}, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
536 NOP2, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
537 NOP2, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
538 {Z80_ADD, Z80_IX, Z80_REG, Z80_IX, 0}, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
539 {Z80_LD, Z80_IX, Z80_IMMED_INDIRECT, Z80_UNUSED, 0}, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
540 {Z80_DEC, Z80_IX, Z80_UNUSED, Z80_UNUSED, 0}, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
541 {Z80_INC, Z80_IXL, Z80_UNUSED, Z80_UNUSED, 0}, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
542 {Z80_DEC, Z80_IXL, Z80_UNUSED, Z80_UNUSED, 0}, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
543 {Z80_LD, Z80_IXL, Z80_IMMED, Z80_UNUSED, 0}, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
544 NOP2, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
545 //3 |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
546 NOP2, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
547 NOP2, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
548 NOP2, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
549 NOP2, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
550 {Z80_INC, Z80_UNUSED, Z80_IX_DISPLACE, 0, 0}, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
551 {Z80_DEC, Z80_UNUSED, Z80_IX_DISPLACE, 0, 0}, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
552 {Z80_LD, Z80_USE_IMMED, Z80_IX_DISPLACE | Z80_DIR, 0, 0}, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
553 NOP2, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
554 NOP2, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
555 {Z80_ADD, Z80_IX, Z80_REG, Z80_SP, 0}, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
556 NOP2, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
557 NOP2, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
558 NOP2, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
559 NOP2, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
560 NOP2, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
561 NOP2, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
562 //4 |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
563 NOP2, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
564 NOP2, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
565 NOP2, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
566 NOP2, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
567 {Z80_LD, Z80_B, Z80_REG, Z80_IXH, 0}, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
568 {Z80_LD, Z80_B, Z80_REG, Z80_IXL, 0}, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
569 {Z80_LD, Z80_B, Z80_IX_DISPLACE, 0, 0}, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
570 NOP2, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
571 NOP2, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
572 NOP2, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
573 NOP2, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
574 NOP2, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
575 {Z80_LD, Z80_C, Z80_REG, Z80_IXH, 0}, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
576 {Z80_LD, Z80_C, Z80_REG, Z80_IXL, 0}, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
577 {Z80_LD, Z80_C, Z80_IX_DISPLACE, 0, 0}, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
578 NOP2, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
579 //5 |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
580 NOP2, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
581 NOP2, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
582 NOP2, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
583 NOP2, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
584 {Z80_LD, Z80_D, Z80_REG, Z80_IXH, 0}, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
585 {Z80_LD, Z80_D, Z80_REG, Z80_IXL, 0}, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
586 {Z80_LD, Z80_D, Z80_IX_DISPLACE, 0, 0}, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
587 NOP2, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
588 NOP2, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
589 NOP2, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
590 NOP2, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
591 NOP2, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
592 {Z80_LD, Z80_E, Z80_REG, Z80_IXH, 0}, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
593 {Z80_LD, Z80_E, Z80_REG, Z80_IXL, 0}, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
594 {Z80_LD, Z80_E, Z80_IX_DISPLACE, 0, 0}, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
595 NOP2, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
596 //6 |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
597 {Z80_LD, Z80_IXH, Z80_REG, Z80_B, 0}, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
598 {Z80_LD, Z80_IXH, Z80_REG, Z80_C, 0}, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
599 {Z80_LD, Z80_IXH, Z80_REG, Z80_D, 0}, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
600 {Z80_LD, Z80_IXH, Z80_REG, Z80_E, 0}, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
601 {Z80_LD, Z80_IXH, Z80_REG, Z80_IXH, 0}, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
602 {Z80_LD, Z80_IXH, Z80_REG, Z80_IXL, 0}, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
603 {Z80_LD, Z80_H, Z80_IX_DISPLACE, 0, 0}, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
604 {Z80_LD, Z80_IXH, Z80_REG, Z80_A, 0}, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
605 {Z80_LD, Z80_IXL, Z80_REG, Z80_B, 0}, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
606 {Z80_LD, Z80_IXL, Z80_REG, Z80_C, 0}, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
607 {Z80_LD, Z80_IXL, Z80_REG, Z80_D, 0}, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
608 {Z80_LD, Z80_IXL, Z80_REG, Z80_E, 0}, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
609 {Z80_LD, Z80_IXL, Z80_REG, Z80_IXH, 0}, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
610 {Z80_LD, Z80_IXL, Z80_REG, Z80_IXL, 0}, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
611 {Z80_LD, Z80_L, Z80_IX_DISPLACE, 0, 0}, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
612 {Z80_LD, Z80_IXL, Z80_REG, Z80_A, 0}, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
613 //7 |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
614 {Z80_LD, Z80_B, Z80_IX_DISPLACE | Z80_DIR, 0, 0}, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
615 {Z80_LD, Z80_C, Z80_IX_DISPLACE | Z80_DIR, 0, 0}, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
616 {Z80_LD, Z80_D, Z80_IX_DISPLACE | Z80_DIR, 0, 0}, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
617 {Z80_LD, Z80_E, Z80_IX_DISPLACE | Z80_DIR, 0, 0}, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
618 {Z80_LD, Z80_H, Z80_IX_DISPLACE | Z80_DIR, 0, 0}, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
619 {Z80_LD, Z80_L, Z80_IX_DISPLACE | Z80_DIR, 0, 0}, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
620 NOP2, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
621 {Z80_LD, Z80_A, Z80_IX_DISPLACE | Z80_DIR, 0, 0}, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
622 NOP2, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
623 NOP2, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
624 NOP2, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
625 NOP2, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
626 {Z80_LD, Z80_A, Z80_REG, Z80_IXH, 0}, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
627 {Z80_LD, Z80_A, Z80_REG, Z80_IXL, 0}, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
628 {Z80_LD, Z80_A, Z80_IX_DISPLACE, 0, 0}, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
629 NOP2, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
630 //8 |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
631 NOP2, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
632 NOP2, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
633 NOP2, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
634 NOP2, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
635 {Z80_ADD, Z80_A, Z80_REG, Z80_IXH, 0}, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
636 {Z80_ADD, Z80_A, Z80_REG, Z80_IXL, 0}, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
637 {Z80_ADD, Z80_A, Z80_IX_DISPLACE, 0, 0}, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
638 NOP2, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
639 NOP2, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
640 NOP2, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
641 NOP2, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
642 NOP2, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
643 {Z80_ADC, Z80_A, Z80_REG, Z80_IXH, 0}, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
644 {Z80_ADC, Z80_A, Z80_REG, Z80_IXL, 0}, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
645 {Z80_ADC, Z80_A, Z80_IX_DISPLACE, 0, 0}, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
646 NOP2, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
647 //9 |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
648 NOP2, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
649 NOP2, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
650 NOP2, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
651 NOP2, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
652 {Z80_SUB, Z80_A, Z80_REG, Z80_IXH, 0}, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
653 {Z80_SUB, Z80_A, Z80_REG, Z80_IXL, 0}, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
654 {Z80_SUB, Z80_A, Z80_IX_DISPLACE, 0, 0}, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
655 NOP2, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
656 NOP2, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
657 NOP2, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
658 NOP2, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
659 NOP2, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
660 {Z80_SBC, Z80_A, Z80_REG, Z80_IXH, 0}, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
661 {Z80_SBC, Z80_A, Z80_REG, Z80_IXL, 0}, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
662 {Z80_SBC, Z80_A, Z80_IX_DISPLACE, 0, 0}, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
663 NOP2, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
664 //A |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
665 NOP2, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
666 NOP2, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
667 NOP2, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
668 NOP2, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
669 {Z80_AND, Z80_A, Z80_REG, Z80_IXH, 0}, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
670 {Z80_AND, Z80_A, Z80_REG, Z80_IXL, 0}, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
671 {Z80_AND, Z80_A, Z80_IX_DISPLACE, 0, 0}, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
672 NOP2, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
673 NOP2, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
674 NOP2, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
675 NOP2, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
676 NOP2, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
677 {Z80_XOR, Z80_A, Z80_REG, Z80_IXH, 0}, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
678 {Z80_XOR, Z80_A, Z80_REG, Z80_IXL, 0}, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
679 {Z80_XOR, Z80_A, Z80_IX_DISPLACE, 0, 0}, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
680 NOP2, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
681 //B |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
682 NOP2, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
683 NOP2, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
684 NOP2, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
685 NOP2, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
686 {Z80_OR, Z80_A, Z80_REG, Z80_IXH, 0}, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
687 {Z80_OR, Z80_A, Z80_REG, Z80_IXL, 0}, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
688 {Z80_OR, Z80_A, Z80_IX_DISPLACE, 0, 0}, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
689 NOP2, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
690 NOP2, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
691 NOP2, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
692 NOP2, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
693 NOP2, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
694 {Z80_CP, Z80_A, Z80_REG, Z80_IXH, 0}, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
695 {Z80_CP, Z80_A, Z80_REG, Z80_IXL, 0}, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
696 {Z80_CP, Z80_A, Z80_IX_DISPLACE, 0, 0}, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
697 NOP2, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
698 //C |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
699 NOP2, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
700 NOP2, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
701 NOP2, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
702 NOP2, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
703 NOP2, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
704 NOP2, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
705 NOP2, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
706 NOP2, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
707 NOP2, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
708 NOP2, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
709 NOP2, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
710 NOP2, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
711 NOP2, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
712 NOP2, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
713 NOP2, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
714 NOP2, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
715 //D |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
716 NOP2, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
717 NOP2, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
718 NOP2, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
719 NOP2, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
720 NOP2, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
721 NOP2, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
722 NOP2, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
723 NOP2, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
724 NOP2, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
725 NOP2, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
726 NOP2, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
727 NOP2, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
728 NOP2, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
729 NOP2, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
730 NOP2, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
731 NOP2, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
732 //E |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
733 NOP2, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
734 {Z80_POP, Z80_IX, Z80_UNUSED, Z80_UNUSED, 0}, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
735 NOP2, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
736 {Z80_EX, Z80_IX, Z80_REG_INDIRECT | Z80_DIR, Z80_SP, 0}, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
737 NOP2, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
738 {Z80_PUSH, Z80_IX, Z80_UNUSED, Z80_UNUSED, 0}, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
739 NOP2, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
740 NOP2, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
741 NOP2, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
742 {Z80_JP, Z80_UNUSED, Z80_REG_INDIRECT, Z80_IX, 0}, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
743 NOP2, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
744 NOP2, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
745 NOP2, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
746 NOP2, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
747 NOP2, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
748 NOP2, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
749 //F |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
750 NOP2, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
751 NOP2, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
752 NOP2, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
753 NOP2, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
754 NOP2, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
755 NOP2, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
756 NOP2, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
757 NOP2, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
758 NOP2, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
759 {Z80_LD, Z80_SP, Z80_REG, Z80_IX, 0}, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
760 NOP2, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
761 NOP2, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
762 NOP2, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
763 NOP2, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
764 NOP2, |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
765 NOP2 |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
766 }; |
202
693ad04b965e
Distinguish between 1-byte and 2-byte NOPs
Mike Pavone <pavone@retrodev.com>
parents:
201
diff
changeset
|
767 |
205
19b323614309
Add support for IX bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
204
diff
changeset
|
768 #define SHIFT_BLOCK_IX(op) \ |
19b323614309
Add support for IX bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
204
diff
changeset
|
769 {op, Z80_B, Z80_IX_DISPLACE | Z80_DIR, 0, 0},\ |
19b323614309
Add support for IX bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
204
diff
changeset
|
770 {op, Z80_C, Z80_IX_DISPLACE | Z80_DIR, 0, 0},\ |
19b323614309
Add support for IX bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
204
diff
changeset
|
771 {op, Z80_D, Z80_IX_DISPLACE | Z80_DIR, 0, 0},\ |
19b323614309
Add support for IX bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
204
diff
changeset
|
772 {op, Z80_E, Z80_IX_DISPLACE | Z80_DIR, 0, 0},\ |
19b323614309
Add support for IX bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
204
diff
changeset
|
773 {op, Z80_H, Z80_IX_DISPLACE | Z80_DIR, 0, 0},\ |
19b323614309
Add support for IX bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
204
diff
changeset
|
774 {op, Z80_L, Z80_IX_DISPLACE | Z80_DIR, 0, 0},\ |
19b323614309
Add support for IX bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
204
diff
changeset
|
775 {op, Z80_UNUSED, Z80_IX_DISPLACE | Z80_DIR, 0, 0},\ |
19b323614309
Add support for IX bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
204
diff
changeset
|
776 {op, Z80_A, Z80_IX_DISPLACE | Z80_DIR, 0, 0} |
19b323614309
Add support for IX bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
204
diff
changeset
|
777 |
19b323614309
Add support for IX bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
204
diff
changeset
|
778 #define BIT_BLOCK_IX(bit) \ |
19b323614309
Add support for IX bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
204
diff
changeset
|
779 {Z80_BIT, Z80_USE_IMMED, Z80_IX_DISPLACE, 0, bit},\ |
19b323614309
Add support for IX bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
204
diff
changeset
|
780 {Z80_BIT, Z80_USE_IMMED, Z80_IX_DISPLACE, 0, bit},\ |
19b323614309
Add support for IX bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
204
diff
changeset
|
781 {Z80_BIT, Z80_USE_IMMED, Z80_IX_DISPLACE, 0, bit},\ |
19b323614309
Add support for IX bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
204
diff
changeset
|
782 {Z80_BIT, Z80_USE_IMMED, Z80_IX_DISPLACE, 0, bit},\ |
19b323614309
Add support for IX bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
204
diff
changeset
|
783 {Z80_BIT, Z80_USE_IMMED, Z80_IX_DISPLACE, 0, bit},\ |
19b323614309
Add support for IX bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
204
diff
changeset
|
784 {Z80_BIT, Z80_USE_IMMED, Z80_IX_DISPLACE, 0, bit},\ |
19b323614309
Add support for IX bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
204
diff
changeset
|
785 {Z80_BIT, Z80_USE_IMMED, Z80_IX_DISPLACE, 0, bit},\ |
19b323614309
Add support for IX bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
204
diff
changeset
|
786 {Z80_BIT, Z80_USE_IMMED, Z80_IX_DISPLACE, 0, bit} |
19b323614309
Add support for IX bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
204
diff
changeset
|
787 |
19b323614309
Add support for IX bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
204
diff
changeset
|
788 #define BIT_BLOCK_IX_REG(op, bit) \ |
19b323614309
Add support for IX bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
204
diff
changeset
|
789 {op, Z80_B, Z80_IX_DISPLACE | Z80_DIR, 0, bit},\ |
19b323614309
Add support for IX bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
204
diff
changeset
|
790 {op, Z80_C, Z80_IX_DISPLACE | Z80_DIR, 0, bit},\ |
19b323614309
Add support for IX bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
204
diff
changeset
|
791 {op, Z80_D, Z80_IX_DISPLACE | Z80_DIR, 0, bit},\ |
19b323614309
Add support for IX bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
204
diff
changeset
|
792 {op, Z80_E, Z80_IX_DISPLACE | Z80_DIR, 0, bit},\ |
19b323614309
Add support for IX bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
204
diff
changeset
|
793 {op, Z80_H, Z80_IX_DISPLACE | Z80_DIR, 0, bit},\ |
19b323614309
Add support for IX bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
204
diff
changeset
|
794 {op, Z80_L, Z80_IX_DISPLACE | Z80_DIR, 0, bit},\ |
19b323614309
Add support for IX bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
204
diff
changeset
|
795 {op, Z80_USE_IMMED, Z80_IX_DISPLACE, 0, bit},\ |
19b323614309
Add support for IX bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
204
diff
changeset
|
796 {op, Z80_A, Z80_IX_DISPLACE | Z80_DIR, 0, bit} |
19b323614309
Add support for IX bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
204
diff
changeset
|
797 |
19b323614309
Add support for IX bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
204
diff
changeset
|
798 z80inst z80_tbl_ix_bit[256] = { |
19b323614309
Add support for IX bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
204
diff
changeset
|
799 //0 |
19b323614309
Add support for IX bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
204
diff
changeset
|
800 SHIFT_BLOCK_IX(Z80_RLC), |
19b323614309
Add support for IX bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
204
diff
changeset
|
801 SHIFT_BLOCK_IX(Z80_RRC), |
19b323614309
Add support for IX bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
204
diff
changeset
|
802 //1 |
19b323614309
Add support for IX bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
204
diff
changeset
|
803 SHIFT_BLOCK_IX(Z80_RL), |
19b323614309
Add support for IX bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
204
diff
changeset
|
804 SHIFT_BLOCK_IX(Z80_RR), |
19b323614309
Add support for IX bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
204
diff
changeset
|
805 //2 |
19b323614309
Add support for IX bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
204
diff
changeset
|
806 SHIFT_BLOCK_IX(Z80_SLA), |
19b323614309
Add support for IX bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
204
diff
changeset
|
807 SHIFT_BLOCK_IX(Z80_SRA), |
19b323614309
Add support for IX bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
204
diff
changeset
|
808 //3 |
19b323614309
Add support for IX bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
204
diff
changeset
|
809 SHIFT_BLOCK_IX(Z80_SLL), |
19b323614309
Add support for IX bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
204
diff
changeset
|
810 SHIFT_BLOCK_IX(Z80_SRL), |
19b323614309
Add support for IX bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
204
diff
changeset
|
811 //4 |
19b323614309
Add support for IX bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
204
diff
changeset
|
812 BIT_BLOCK_IX(0), |
19b323614309
Add support for IX bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
204
diff
changeset
|
813 BIT_BLOCK_IX(1), |
19b323614309
Add support for IX bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
204
diff
changeset
|
814 //5 |
19b323614309
Add support for IX bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
204
diff
changeset
|
815 BIT_BLOCK_IX(2), |
19b323614309
Add support for IX bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
204
diff
changeset
|
816 BIT_BLOCK_IX(3), |
19b323614309
Add support for IX bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
204
diff
changeset
|
817 //6 |
19b323614309
Add support for IX bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
204
diff
changeset
|
818 BIT_BLOCK_IX(4), |
19b323614309
Add support for IX bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
204
diff
changeset
|
819 BIT_BLOCK_IX(5), |
19b323614309
Add support for IX bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
204
diff
changeset
|
820 //7 |
19b323614309
Add support for IX bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
204
diff
changeset
|
821 BIT_BLOCK_IX(6), |
19b323614309
Add support for IX bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
204
diff
changeset
|
822 BIT_BLOCK_IX(7), |
19b323614309
Add support for IX bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
204
diff
changeset
|
823 //8 |
19b323614309
Add support for IX bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
204
diff
changeset
|
824 BIT_BLOCK_IX_REG(Z80_RES, 0), |
19b323614309
Add support for IX bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
204
diff
changeset
|
825 BIT_BLOCK_IX_REG(Z80_RES, 1), |
19b323614309
Add support for IX bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
204
diff
changeset
|
826 //9 |
19b323614309
Add support for IX bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
204
diff
changeset
|
827 BIT_BLOCK_IX_REG(Z80_RES, 2), |
19b323614309
Add support for IX bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
204
diff
changeset
|
828 BIT_BLOCK_IX_REG(Z80_RES, 3), |
19b323614309
Add support for IX bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
204
diff
changeset
|
829 //A |
19b323614309
Add support for IX bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
204
diff
changeset
|
830 BIT_BLOCK_IX_REG(Z80_RES, 4), |
19b323614309
Add support for IX bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
204
diff
changeset
|
831 BIT_BLOCK_IX_REG(Z80_RES, 5), |
19b323614309
Add support for IX bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
204
diff
changeset
|
832 //B |
19b323614309
Add support for IX bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
204
diff
changeset
|
833 BIT_BLOCK_IX_REG(Z80_RES, 6), |
19b323614309
Add support for IX bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
204
diff
changeset
|
834 BIT_BLOCK_IX_REG(Z80_RES, 7), |
19b323614309
Add support for IX bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
204
diff
changeset
|
835 //C |
19b323614309
Add support for IX bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
204
diff
changeset
|
836 BIT_BLOCK_IX_REG(Z80_SET, 0), |
19b323614309
Add support for IX bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
204
diff
changeset
|
837 BIT_BLOCK_IX_REG(Z80_SET, 1), |
19b323614309
Add support for IX bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
204
diff
changeset
|
838 //D |
19b323614309
Add support for IX bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
204
diff
changeset
|
839 BIT_BLOCK_IX_REG(Z80_SET, 2), |
19b323614309
Add support for IX bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
204
diff
changeset
|
840 BIT_BLOCK_IX_REG(Z80_SET, 3), |
19b323614309
Add support for IX bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
204
diff
changeset
|
841 //E |
19b323614309
Add support for IX bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
204
diff
changeset
|
842 BIT_BLOCK_IX_REG(Z80_SET, 4), |
19b323614309
Add support for IX bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
204
diff
changeset
|
843 BIT_BLOCK_IX_REG(Z80_SET, 5), |
19b323614309
Add support for IX bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
204
diff
changeset
|
844 //F |
19b323614309
Add support for IX bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
204
diff
changeset
|
845 BIT_BLOCK_IX_REG(Z80_SET, 6), |
19b323614309
Add support for IX bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
204
diff
changeset
|
846 BIT_BLOCK_IX_REG(Z80_SET, 7), |
19b323614309
Add support for IX bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
204
diff
changeset
|
847 }; |
204
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
848 |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
849 z80inst z80_tbl_iy[256] = { |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
850 //0 |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
851 NOP2, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
852 NOP2, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
853 NOP2, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
854 NOP2, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
855 NOP2, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
856 NOP2, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
857 NOP2, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
858 NOP2, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
859 NOP2, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
860 {Z80_ADD, Z80_IY, Z80_REG, Z80_BC, 0}, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
861 NOP2, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
862 NOP2, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
863 NOP2, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
864 NOP2, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
865 NOP2, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
866 NOP2, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
867 //1 |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
868 NOP2, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
869 NOP2, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
870 NOP2, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
871 NOP2, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
872 NOP2, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
873 NOP2, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
874 NOP2, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
875 NOP2, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
876 NOP2, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
877 {Z80_ADD, Z80_IY, Z80_REG, Z80_DE, 0}, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
878 NOP2, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
879 NOP2, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
880 NOP2, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
881 NOP2, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
882 NOP2, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
883 NOP2, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
884 //2 |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
885 NOP2, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
886 {Z80_LD, Z80_IY, Z80_IMMED, Z80_UNUSED, 0}, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
887 {Z80_LD, Z80_IY, Z80_IMMED_INDIRECT | Z80_DIR, Z80_UNUSED, 0}, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
888 {Z80_INC, Z80_IY, Z80_UNUSED, Z80_UNUSED, 0}, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
889 {Z80_INC, Z80_IYH, Z80_UNUSED, Z80_UNUSED, 0}, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
890 {Z80_DEC, Z80_IYH, Z80_UNUSED, Z80_UNUSED, 0}, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
891 {Z80_LD, Z80_IYH, Z80_IMMED, Z80_UNUSED, 0}, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
892 NOP2, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
893 NOP2, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
894 {Z80_ADD, Z80_IY, Z80_REG, Z80_IY, 0}, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
895 {Z80_LD, Z80_IY, Z80_IMMED_INDIRECT, Z80_UNUSED, 0}, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
896 {Z80_DEC, Z80_IY, Z80_UNUSED, Z80_UNUSED, 0}, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
897 {Z80_INC, Z80_IYL, Z80_UNUSED, Z80_UNUSED, 0}, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
898 {Z80_DEC, Z80_IYL, Z80_UNUSED, Z80_UNUSED, 0}, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
899 {Z80_LD, Z80_IYL, Z80_IMMED, Z80_UNUSED, 0}, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
900 NOP2, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
901 //3 |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
902 NOP2, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
903 NOP2, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
904 NOP2, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
905 NOP2, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
906 {Z80_INC, Z80_UNUSED, Z80_IY_DISPLACE, 0, 0}, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
907 {Z80_DEC, Z80_UNUSED, Z80_IY_DISPLACE, 0, 0}, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
908 {Z80_LD, Z80_USE_IMMED, Z80_IY_DISPLACE | Z80_DIR, 0, 0}, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
909 NOP2, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
910 NOP2, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
911 {Z80_ADD, Z80_IY, Z80_REG, Z80_SP, 0}, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
912 NOP2, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
913 NOP2, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
914 NOP2, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
915 NOP2, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
916 NOP2, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
917 NOP2, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
918 //4 |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
919 NOP2, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
920 NOP2, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
921 NOP2, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
922 NOP2, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
923 {Z80_LD, Z80_B, Z80_REG, Z80_IYH, 0}, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
924 {Z80_LD, Z80_B, Z80_REG, Z80_IYL, 0}, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
925 {Z80_LD, Z80_B, Z80_IY_DISPLACE, 0, 0}, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
926 NOP2, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
927 NOP2, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
928 NOP2, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
929 NOP2, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
930 NOP2, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
931 {Z80_LD, Z80_C, Z80_REG, Z80_IYH, 0}, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
932 {Z80_LD, Z80_C, Z80_REG, Z80_IYL, 0}, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
933 {Z80_LD, Z80_C, Z80_IY_DISPLACE, 0, 0}, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
934 NOP2, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
935 //5 |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
936 NOP2, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
937 NOP2, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
938 NOP2, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
939 NOP2, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
940 {Z80_LD, Z80_D, Z80_REG, Z80_IYH, 0}, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
941 {Z80_LD, Z80_D, Z80_REG, Z80_IYL, 0}, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
942 {Z80_LD, Z80_D, Z80_IY_DISPLACE, 0, 0}, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
943 NOP2, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
944 NOP2, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
945 NOP2, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
946 NOP2, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
947 NOP2, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
948 {Z80_LD, Z80_E, Z80_REG, Z80_IYH, 0}, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
949 {Z80_LD, Z80_E, Z80_REG, Z80_IYL, 0}, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
950 {Z80_LD, Z80_E, Z80_IY_DISPLACE, 0, 0}, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
951 NOP2, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
952 //6 |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
953 {Z80_LD, Z80_IYH, Z80_REG, Z80_B, 0}, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
954 {Z80_LD, Z80_IYH, Z80_REG, Z80_C, 0}, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
955 {Z80_LD, Z80_IYH, Z80_REG, Z80_D, 0}, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
956 {Z80_LD, Z80_IYH, Z80_REG, Z80_E, 0}, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
957 {Z80_LD, Z80_IYH, Z80_REG, Z80_IYH, 0}, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
958 {Z80_LD, Z80_IYH, Z80_REG, Z80_IYL, 0}, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
959 {Z80_LD, Z80_H, Z80_IY_DISPLACE, 0, 0}, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
960 {Z80_LD, Z80_IYH, Z80_REG, Z80_A, 0}, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
961 {Z80_LD, Z80_IYL, Z80_REG, Z80_B, 0}, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
962 {Z80_LD, Z80_IYL, Z80_REG, Z80_C, 0}, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
963 {Z80_LD, Z80_IYL, Z80_REG, Z80_D, 0}, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
964 {Z80_LD, Z80_IYL, Z80_REG, Z80_E, 0}, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
965 {Z80_LD, Z80_IYL, Z80_REG, Z80_IYH, 0}, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
966 {Z80_LD, Z80_IYL, Z80_REG, Z80_IYL, 0}, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
967 {Z80_LD, Z80_L, Z80_IY_DISPLACE, 0, 0}, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
968 {Z80_LD, Z80_IYL, Z80_REG, Z80_A, 0}, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
969 //7 |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
970 {Z80_LD, Z80_B, Z80_IY_DISPLACE | Z80_DIR, 0, 0}, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
971 {Z80_LD, Z80_C, Z80_IY_DISPLACE | Z80_DIR, 0, 0}, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
972 {Z80_LD, Z80_D, Z80_IY_DISPLACE | Z80_DIR, 0, 0}, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
973 {Z80_LD, Z80_E, Z80_IY_DISPLACE | Z80_DIR, 0, 0}, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
974 {Z80_LD, Z80_H, Z80_IY_DISPLACE | Z80_DIR, 0, 0}, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
975 {Z80_LD, Z80_L, Z80_IY_DISPLACE | Z80_DIR, 0, 0}, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
976 NOP2, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
977 {Z80_LD, Z80_A, Z80_IY_DISPLACE | Z80_DIR, 0, 0}, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
978 NOP2, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
979 NOP2, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
980 NOP2, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
981 NOP2, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
982 {Z80_LD, Z80_A, Z80_REG, Z80_IYH, 0}, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
983 {Z80_LD, Z80_A, Z80_REG, Z80_IYL, 0}, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
984 {Z80_LD, Z80_A, Z80_IY_DISPLACE, 0, 0}, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
985 NOP2, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
986 //8 |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
987 NOP2, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
988 NOP2, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
989 NOP2, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
990 NOP2, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
991 {Z80_ADD, Z80_A, Z80_REG, Z80_IYH, 0}, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
992 {Z80_ADD, Z80_A, Z80_REG, Z80_IYL, 0}, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
993 {Z80_ADD, Z80_A, Z80_IY_DISPLACE, 0, 0}, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
994 NOP2, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
995 NOP2, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
996 NOP2, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
997 NOP2, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
998 NOP2, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
999 {Z80_ADC, Z80_A, Z80_REG, Z80_IYH, 0}, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
1000 {Z80_ADC, Z80_A, Z80_REG, Z80_IYL, 0}, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
1001 {Z80_ADC, Z80_A, Z80_IY_DISPLACE, 0, 0}, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
1002 NOP2, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
1003 //9 |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
1004 NOP2, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
1005 NOP2, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
1006 NOP2, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
1007 NOP2, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
1008 {Z80_SUB, Z80_A, Z80_REG, Z80_IYH, 0}, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
1009 {Z80_SUB, Z80_A, Z80_REG, Z80_IYL, 0}, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
1010 {Z80_SUB, Z80_A, Z80_IY_DISPLACE, 0, 0}, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
1011 NOP2, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
1012 NOP2, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
1013 NOP2, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
1014 NOP2, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
1015 NOP2, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
1016 {Z80_SBC, Z80_A, Z80_REG, Z80_IYH, 0}, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
1017 {Z80_SBC, Z80_A, Z80_REG, Z80_IYL, 0}, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
1018 {Z80_SBC, Z80_A, Z80_IY_DISPLACE, 0, 0}, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
1019 NOP2, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
1020 //A |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
1021 NOP2, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
1022 NOP2, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
1023 NOP2, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
1024 NOP2, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
1025 {Z80_AND, Z80_A, Z80_REG, Z80_IYH, 0}, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
1026 {Z80_AND, Z80_A, Z80_REG, Z80_IYL, 0}, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
1027 {Z80_AND, Z80_A, Z80_IY_DISPLACE, 0, 0}, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
1028 NOP2, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
1029 NOP2, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
1030 NOP2, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
1031 NOP2, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
1032 NOP2, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
1033 {Z80_XOR, Z80_A, Z80_REG, Z80_IYH, 0}, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
1034 {Z80_XOR, Z80_A, Z80_REG, Z80_IYL, 0}, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
1035 {Z80_XOR, Z80_A, Z80_IY_DISPLACE, 0, 0}, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
1036 NOP2, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
1037 //B |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
1038 NOP2, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
1039 NOP2, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
1040 NOP2, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
1041 NOP2, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
1042 {Z80_OR, Z80_A, Z80_REG, Z80_IYH, 0}, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
1043 {Z80_OR, Z80_A, Z80_REG, Z80_IYL, 0}, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
1044 {Z80_OR, Z80_A, Z80_IY_DISPLACE, 0, 0}, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
1045 NOP2, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
1046 NOP2, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
1047 NOP2, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
1048 NOP2, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
1049 NOP2, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
1050 {Z80_CP, Z80_A, Z80_REG, Z80_IYH, 0}, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
1051 {Z80_CP, Z80_A, Z80_REG, Z80_IYL, 0}, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
1052 {Z80_CP, Z80_A, Z80_IY_DISPLACE, 0, 0}, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
1053 NOP2, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
1054 //C |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
1055 NOP2, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
1056 NOP2, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
1057 NOP2, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
1058 NOP2, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
1059 NOP2, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
1060 NOP2, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
1061 NOP2, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
1062 NOP2, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
1063 NOP2, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
1064 NOP2, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
1065 NOP2, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
1066 NOP2, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
1067 NOP2, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
1068 NOP2, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
1069 NOP2, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
1070 NOP2, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
1071 //D |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
1072 NOP2, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
1073 NOP2, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
1074 NOP2, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
1075 NOP2, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
1076 NOP2, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
1077 NOP2, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
1078 NOP2, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
1079 NOP2, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
1080 NOP2, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
1081 NOP2, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
1082 NOP2, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
1083 NOP2, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
1084 NOP2, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
1085 NOP2, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
1086 NOP2, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
1087 NOP2, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
1088 //E |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
1089 NOP2, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
1090 {Z80_POP, Z80_IY, Z80_UNUSED, Z80_UNUSED, 0}, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
1091 NOP2, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
1092 {Z80_EX, Z80_IY, Z80_REG_INDIRECT | Z80_DIR, Z80_SP, 0}, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
1093 NOP2, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
1094 {Z80_PUSH, Z80_IY, Z80_UNUSED, Z80_UNUSED, 0}, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
1095 NOP2, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
1096 NOP2, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
1097 NOP2, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
1098 {Z80_JP, Z80_UNUSED, Z80_REG_INDIRECT, Z80_IY, 0}, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
1099 NOP2, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
1100 NOP2, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
1101 NOP2, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
1102 NOP2, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
1103 NOP2, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
1104 NOP2, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
1105 //F |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
1106 NOP2, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
1107 NOP2, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
1108 NOP2, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
1109 NOP2, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
1110 NOP2, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
1111 NOP2, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
1112 NOP2, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
1113 NOP2, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
1114 NOP2, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
1115 {Z80_LD, Z80_SP, Z80_REG, Z80_IY, 0}, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
1116 NOP2, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
1117 NOP2, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
1118 NOP2, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
1119 NOP2, |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
1120 NOP2, |
213
4d4559b04c59
Make reset trigger debug exit to make it easier to test the same cases in blastem and musashi. Fix asl #1 overflow flag.
Mike Pavone <pavone@retrodev.com>
parents:
206
diff
changeset
|
1121 //TODO: Enable this based on a define |
4d4559b04c59
Make reset trigger debug exit to make it easier to test the same cases in blastem and musashi. Fix asl #1 overflow flag.
Mike Pavone <pavone@retrodev.com>
parents:
206
diff
changeset
|
1122 {Z80_NOP, Z80_UNUSED, Z80_UNUSED, Z80_UNUSED, 42} |
4d4559b04c59
Make reset trigger debug exit to make it easier to test the same cases in blastem and musashi. Fix asl #1 overflow flag.
Mike Pavone <pavone@retrodev.com>
parents:
206
diff
changeset
|
1123 //NOP2 |
204
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
1124 }; |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
1125 |
206
807ca611b561
Add support for IY bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
205
diff
changeset
|
1126 #define SHIFT_BLOCK_IY(op) \ |
807ca611b561
Add support for IY bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
205
diff
changeset
|
1127 {op, Z80_B, Z80_IY_DISPLACE | Z80_DIR, 0, 0},\ |
807ca611b561
Add support for IY bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
205
diff
changeset
|
1128 {op, Z80_C, Z80_IY_DISPLACE | Z80_DIR, 0, 0},\ |
807ca611b561
Add support for IY bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
205
diff
changeset
|
1129 {op, Z80_D, Z80_IY_DISPLACE | Z80_DIR, 0, 0},\ |
807ca611b561
Add support for IY bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
205
diff
changeset
|
1130 {op, Z80_E, Z80_IY_DISPLACE | Z80_DIR, 0, 0},\ |
807ca611b561
Add support for IY bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
205
diff
changeset
|
1131 {op, Z80_H, Z80_IY_DISPLACE | Z80_DIR, 0, 0},\ |
807ca611b561
Add support for IY bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
205
diff
changeset
|
1132 {op, Z80_L, Z80_IY_DISPLACE | Z80_DIR, 0, 0},\ |
807ca611b561
Add support for IY bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
205
diff
changeset
|
1133 {op, Z80_UNUSED, Z80_IY_DISPLACE | Z80_DIR, 0, 0},\ |
807ca611b561
Add support for IY bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
205
diff
changeset
|
1134 {op, Z80_A, Z80_IY_DISPLACE | Z80_DIR, 0, 0} |
807ca611b561
Add support for IY bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
205
diff
changeset
|
1135 |
807ca611b561
Add support for IY bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
205
diff
changeset
|
1136 #define BIT_BLOCK_IY(bit) \ |
807ca611b561
Add support for IY bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
205
diff
changeset
|
1137 {Z80_BIT, Z80_USE_IMMED, Z80_IY_DISPLACE, 0, bit},\ |
807ca611b561
Add support for IY bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
205
diff
changeset
|
1138 {Z80_BIT, Z80_USE_IMMED, Z80_IY_DISPLACE, 0, bit},\ |
807ca611b561
Add support for IY bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
205
diff
changeset
|
1139 {Z80_BIT, Z80_USE_IMMED, Z80_IY_DISPLACE, 0, bit},\ |
807ca611b561
Add support for IY bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
205
diff
changeset
|
1140 {Z80_BIT, Z80_USE_IMMED, Z80_IY_DISPLACE, 0, bit},\ |
807ca611b561
Add support for IY bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
205
diff
changeset
|
1141 {Z80_BIT, Z80_USE_IMMED, Z80_IY_DISPLACE, 0, bit},\ |
807ca611b561
Add support for IY bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
205
diff
changeset
|
1142 {Z80_BIT, Z80_USE_IMMED, Z80_IY_DISPLACE, 0, bit},\ |
807ca611b561
Add support for IY bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
205
diff
changeset
|
1143 {Z80_BIT, Z80_USE_IMMED, Z80_IY_DISPLACE, 0, bit},\ |
807ca611b561
Add support for IY bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
205
diff
changeset
|
1144 {Z80_BIT, Z80_USE_IMMED, Z80_IY_DISPLACE, 0, bit} |
807ca611b561
Add support for IY bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
205
diff
changeset
|
1145 |
807ca611b561
Add support for IY bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
205
diff
changeset
|
1146 #define BIT_BLOCK_IY_REG(op, bit) \ |
807ca611b561
Add support for IY bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
205
diff
changeset
|
1147 {op, Z80_B, Z80_IY_DISPLACE | Z80_DIR, 0, bit},\ |
807ca611b561
Add support for IY bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
205
diff
changeset
|
1148 {op, Z80_C, Z80_IY_DISPLACE | Z80_DIR, 0, bit},\ |
807ca611b561
Add support for IY bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
205
diff
changeset
|
1149 {op, Z80_D, Z80_IY_DISPLACE | Z80_DIR, 0, bit},\ |
807ca611b561
Add support for IY bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
205
diff
changeset
|
1150 {op, Z80_E, Z80_IY_DISPLACE | Z80_DIR, 0, bit},\ |
807ca611b561
Add support for IY bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
205
diff
changeset
|
1151 {op, Z80_H, Z80_IY_DISPLACE | Z80_DIR, 0, bit},\ |
807ca611b561
Add support for IY bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
205
diff
changeset
|
1152 {op, Z80_L, Z80_IY_DISPLACE | Z80_DIR, 0, bit},\ |
807ca611b561
Add support for IY bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
205
diff
changeset
|
1153 {op, Z80_USE_IMMED, Z80_IY_DISPLACE, 0, bit},\ |
807ca611b561
Add support for IY bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
205
diff
changeset
|
1154 {op, Z80_A, Z80_IY_DISPLACE | Z80_DIR, 0, bit} |
807ca611b561
Add support for IY bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
205
diff
changeset
|
1155 |
807ca611b561
Add support for IY bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
205
diff
changeset
|
1156 z80inst z80_tbl_iy_bit[256] = { |
807ca611b561
Add support for IY bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
205
diff
changeset
|
1157 //0 |
807ca611b561
Add support for IY bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
205
diff
changeset
|
1158 SHIFT_BLOCK_IY(Z80_RLC), |
807ca611b561
Add support for IY bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
205
diff
changeset
|
1159 SHIFT_BLOCK_IY(Z80_RRC), |
807ca611b561
Add support for IY bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
205
diff
changeset
|
1160 //1 |
807ca611b561
Add support for IY bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
205
diff
changeset
|
1161 SHIFT_BLOCK_IY(Z80_RL), |
807ca611b561
Add support for IY bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
205
diff
changeset
|
1162 SHIFT_BLOCK_IY(Z80_RR), |
807ca611b561
Add support for IY bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
205
diff
changeset
|
1163 //2 |
807ca611b561
Add support for IY bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
205
diff
changeset
|
1164 SHIFT_BLOCK_IY(Z80_SLA), |
807ca611b561
Add support for IY bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
205
diff
changeset
|
1165 SHIFT_BLOCK_IY(Z80_SRA), |
807ca611b561
Add support for IY bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
205
diff
changeset
|
1166 //3 |
807ca611b561
Add support for IY bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
205
diff
changeset
|
1167 SHIFT_BLOCK_IY(Z80_SLL), |
807ca611b561
Add support for IY bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
205
diff
changeset
|
1168 SHIFT_BLOCK_IY(Z80_SRL), |
807ca611b561
Add support for IY bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
205
diff
changeset
|
1169 //4 |
807ca611b561
Add support for IY bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
205
diff
changeset
|
1170 BIT_BLOCK_IY(0), |
807ca611b561
Add support for IY bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
205
diff
changeset
|
1171 BIT_BLOCK_IY(1), |
807ca611b561
Add support for IY bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
205
diff
changeset
|
1172 //5 |
807ca611b561
Add support for IY bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
205
diff
changeset
|
1173 BIT_BLOCK_IY(2), |
807ca611b561
Add support for IY bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
205
diff
changeset
|
1174 BIT_BLOCK_IY(3), |
807ca611b561
Add support for IY bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
205
diff
changeset
|
1175 //6 |
807ca611b561
Add support for IY bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
205
diff
changeset
|
1176 BIT_BLOCK_IY(4), |
807ca611b561
Add support for IY bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
205
diff
changeset
|
1177 BIT_BLOCK_IY(5), |
807ca611b561
Add support for IY bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
205
diff
changeset
|
1178 //7 |
807ca611b561
Add support for IY bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
205
diff
changeset
|
1179 BIT_BLOCK_IY(6), |
807ca611b561
Add support for IY bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
205
diff
changeset
|
1180 BIT_BLOCK_IY(7), |
807ca611b561
Add support for IY bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
205
diff
changeset
|
1181 //8 |
807ca611b561
Add support for IY bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
205
diff
changeset
|
1182 BIT_BLOCK_IY_REG(Z80_RES, 0), |
807ca611b561
Add support for IY bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
205
diff
changeset
|
1183 BIT_BLOCK_IY_REG(Z80_RES, 1), |
807ca611b561
Add support for IY bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
205
diff
changeset
|
1184 //9 |
807ca611b561
Add support for IY bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
205
diff
changeset
|
1185 BIT_BLOCK_IY_REG(Z80_RES, 2), |
807ca611b561
Add support for IY bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
205
diff
changeset
|
1186 BIT_BLOCK_IY_REG(Z80_RES, 3), |
807ca611b561
Add support for IY bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
205
diff
changeset
|
1187 //A |
807ca611b561
Add support for IY bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
205
diff
changeset
|
1188 BIT_BLOCK_IY_REG(Z80_RES, 4), |
807ca611b561
Add support for IY bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
205
diff
changeset
|
1189 BIT_BLOCK_IY_REG(Z80_RES, 5), |
807ca611b561
Add support for IY bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
205
diff
changeset
|
1190 //B |
807ca611b561
Add support for IY bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
205
diff
changeset
|
1191 BIT_BLOCK_IY_REG(Z80_RES, 6), |
807ca611b561
Add support for IY bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
205
diff
changeset
|
1192 BIT_BLOCK_IY_REG(Z80_RES, 7), |
807ca611b561
Add support for IY bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
205
diff
changeset
|
1193 //C |
807ca611b561
Add support for IY bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
205
diff
changeset
|
1194 BIT_BLOCK_IY_REG(Z80_SET, 0), |
807ca611b561
Add support for IY bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
205
diff
changeset
|
1195 BIT_BLOCK_IY_REG(Z80_SET, 1), |
807ca611b561
Add support for IY bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
205
diff
changeset
|
1196 //D |
807ca611b561
Add support for IY bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
205
diff
changeset
|
1197 BIT_BLOCK_IY_REG(Z80_SET, 2), |
807ca611b561
Add support for IY bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
205
diff
changeset
|
1198 BIT_BLOCK_IY_REG(Z80_SET, 3), |
807ca611b561
Add support for IY bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
205
diff
changeset
|
1199 //E |
807ca611b561
Add support for IY bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
205
diff
changeset
|
1200 BIT_BLOCK_IY_REG(Z80_SET, 4), |
807ca611b561
Add support for IY bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
205
diff
changeset
|
1201 BIT_BLOCK_IY_REG(Z80_SET, 5), |
807ca611b561
Add support for IY bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
205
diff
changeset
|
1202 //F |
807ca611b561
Add support for IY bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
205
diff
changeset
|
1203 BIT_BLOCK_IY_REG(Z80_SET, 6), |
807ca611b561
Add support for IY bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
205
diff
changeset
|
1204 BIT_BLOCK_IY_REG(Z80_SET, 7), |
807ca611b561
Add support for IY bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
205
diff
changeset
|
1205 }; |
807ca611b561
Add support for IY bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
205
diff
changeset
|
1206 |
199
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1207 uint8_t * z80_decode(uint8_t * istream, z80inst * decoded) |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1208 { |
205
19b323614309
Add support for IX bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
204
diff
changeset
|
1209 uint8_t tmp; |
199
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1210 if (*istream == 0xCB) { |
201
2d2fa345e1fc
Add support for bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
200
diff
changeset
|
1211 istream++; |
2d2fa345e1fc
Add support for bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
200
diff
changeset
|
1212 memcpy(decoded, z80_tbl_bit + *istream, sizeof(z80inst)); |
199
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1213 } else if (*istream == 0xDD) { |
203
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
1214 istream++; |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
1215 if (*istream == 0xCB) { |
205
19b323614309
Add support for IX bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
204
diff
changeset
|
1216 tmp = *(++istream); |
19b323614309
Add support for IX bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
204
diff
changeset
|
1217 istream++; |
19b323614309
Add support for IX bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
204
diff
changeset
|
1218 memcpy(decoded, z80_tbl_ix_bit + *istream, sizeof(z80inst)); |
19b323614309
Add support for IX bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
204
diff
changeset
|
1219 decoded->ea_reg = tmp; |
203
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
1220 } else { |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
1221 memcpy(decoded, z80_tbl_ix + *istream, sizeof(z80inst)); |
205
19b323614309
Add support for IX bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
204
diff
changeset
|
1222 if ((decoded->addr_mode & 0x1F) == Z80_IX_DISPLACE) { |
19b323614309
Add support for IX bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
204
diff
changeset
|
1223 decoded->ea_reg = *(++istream); |
19b323614309
Add support for IX bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
204
diff
changeset
|
1224 } |
203
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
1225 } |
199
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1226 } else if (*istream == 0xED) { |
200
d3066ceb29d1
Add support for EXTD group 2-byte Z80 instructions in decoder
Mike Pavone <pavone@retrodev.com>
parents:
199
diff
changeset
|
1227 istream++; |
d3066ceb29d1
Add support for EXTD group 2-byte Z80 instructions in decoder
Mike Pavone <pavone@retrodev.com>
parents:
199
diff
changeset
|
1228 if (*istream < 0x40 || *istream >= 0xC0) { |
d3066ceb29d1
Add support for EXTD group 2-byte Z80 instructions in decoder
Mike Pavone <pavone@retrodev.com>
parents:
199
diff
changeset
|
1229 memcpy(decoded, z80_tbl_extd + 0xBF, sizeof(z80inst)); |
d3066ceb29d1
Add support for EXTD group 2-byte Z80 instructions in decoder
Mike Pavone <pavone@retrodev.com>
parents:
199
diff
changeset
|
1230 } else { |
d3066ceb29d1
Add support for EXTD group 2-byte Z80 instructions in decoder
Mike Pavone <pavone@retrodev.com>
parents:
199
diff
changeset
|
1231 memcpy(decoded, z80_tbl_extd + *istream-0x40, sizeof(z80inst)); |
d3066ceb29d1
Add support for EXTD group 2-byte Z80 instructions in decoder
Mike Pavone <pavone@retrodev.com>
parents:
199
diff
changeset
|
1232 } |
199
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1233 } else if (*istream == 0xFD) { |
204
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
1234 istream++; |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
1235 if (*istream == 0xCB) { |
206
807ca611b561
Add support for IY bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
205
diff
changeset
|
1236 tmp = *(++istream); |
807ca611b561
Add support for IY bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
205
diff
changeset
|
1237 istream++; |
807ca611b561
Add support for IY bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
205
diff
changeset
|
1238 memcpy(decoded, z80_tbl_iy_bit + *istream, sizeof(z80inst)); |
807ca611b561
Add support for IY bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
205
diff
changeset
|
1239 decoded->ea_reg = tmp; |
204
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
1240 } else { |
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
1241 memcpy(decoded, z80_tbl_iy + *istream, sizeof(z80inst)); |
205
19b323614309
Add support for IX bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
204
diff
changeset
|
1242 if ((decoded->addr_mode & 0x1F) == Z80_IY_DISPLACE) { |
19b323614309
Add support for IX bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
204
diff
changeset
|
1243 decoded->ea_reg = *(++istream); |
19b323614309
Add support for IX bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
204
diff
changeset
|
1244 } |
204
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
1245 } |
199
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1246 } else { |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1247 memcpy(decoded, z80_tbl_a + *istream, sizeof(z80inst)); |
200
d3066ceb29d1
Add support for EXTD group 2-byte Z80 instructions in decoder
Mike Pavone <pavone@retrodev.com>
parents:
199
diff
changeset
|
1248 |
d3066ceb29d1
Add support for EXTD group 2-byte Z80 instructions in decoder
Mike Pavone <pavone@retrodev.com>
parents:
199
diff
changeset
|
1249 } |
205
19b323614309
Add support for IX bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
204
diff
changeset
|
1250 if ((decoded->addr_mode & 0x1F) == Z80_IMMED && decoded->op != Z80_RST && decoded->op != Z80_IM) { |
200
d3066ceb29d1
Add support for EXTD group 2-byte Z80 instructions in decoder
Mike Pavone <pavone@retrodev.com>
parents:
199
diff
changeset
|
1251 decoded->immed = *(++istream); |
256
ce7ce2b9c2df
Fix decoding of address in JP and JPCC instructions in the Z80 core
Mike Pavone <pavone@retrodev.com>
parents:
247
diff
changeset
|
1252 if ((decoded->reg >= Z80_BC && decoded->reg < Z80_UNUSED) || decoded->op == Z80_CALL || decoded->op == Z80_CALLCC || decoded->op == Z80_JP || decoded->op == Z80_JPCC) { |
200
d3066ceb29d1
Add support for EXTD group 2-byte Z80 instructions in decoder
Mike Pavone <pavone@retrodev.com>
parents:
199
diff
changeset
|
1253 decoded->immed |= *(++istream) << 8; |
d3066ceb29d1
Add support for EXTD group 2-byte Z80 instructions in decoder
Mike Pavone <pavone@retrodev.com>
parents:
199
diff
changeset
|
1254 } else if (decoded->immed & 0x80) { |
d3066ceb29d1
Add support for EXTD group 2-byte Z80 instructions in decoder
Mike Pavone <pavone@retrodev.com>
parents:
199
diff
changeset
|
1255 decoded->immed |= 0xFF00; |
199
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1256 } |
203
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
1257 } else if ((decoded->addr_mode & 0x1F) == Z80_IMMED_INDIRECT) { |
200
d3066ceb29d1
Add support for EXTD group 2-byte Z80 instructions in decoder
Mike Pavone <pavone@retrodev.com>
parents:
199
diff
changeset
|
1258 decoded->immed = *(++istream); |
d3066ceb29d1
Add support for EXTD group 2-byte Z80 instructions in decoder
Mike Pavone <pavone@retrodev.com>
parents:
199
diff
changeset
|
1259 if (decoded->op != Z80_OUT && decoded->op != Z80_IN) { |
d3066ceb29d1
Add support for EXTD group 2-byte Z80 instructions in decoder
Mike Pavone <pavone@retrodev.com>
parents:
199
diff
changeset
|
1260 decoded->immed |= *(++istream) << 8; |
d3066ceb29d1
Add support for EXTD group 2-byte Z80 instructions in decoder
Mike Pavone <pavone@retrodev.com>
parents:
199
diff
changeset
|
1261 } |
203
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
1262 } |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
1263 if (decoded->reg == Z80_USE_IMMED && decoded->op != Z80_BIT && decoded->op != Z80_RES && decoded->op != Z80_SET) { |
200
d3066ceb29d1
Add support for EXTD group 2-byte Z80 instructions in decoder
Mike Pavone <pavone@retrodev.com>
parents:
199
diff
changeset
|
1264 decoded->immed = *(++istream); |
199
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1265 } |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1266 return istream+1; |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1267 } |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1268 |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1269 char *z80_mnemonics[Z80_OTDR+1] = { |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1270 "ld", |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1271 "push", |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1272 "pop", |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1273 "ex", |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1274 "exx", |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1275 "ldi", |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1276 "ldir", |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1277 "ldd", |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1278 "lddr", |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1279 "cpi", |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1280 "cpir", |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1281 "cpd", |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1282 "cpdr", |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1283 "add", |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1284 "adc", |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1285 "sub", |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1286 "sbc", |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1287 "and", |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1288 "or", |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1289 "xor", |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1290 "cp", |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1291 "inc", |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1292 "dec", |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1293 "daa", |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1294 "cpl", |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1295 "neg", |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1296 "ccf", |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1297 "scf", |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1298 "nop", |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1299 "halt", |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1300 "di", |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1301 "ei", |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1302 "im", |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1303 "rlc", |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1304 "rl", |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1305 "rrc", |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1306 "rr", |
201
2d2fa345e1fc
Add support for bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
200
diff
changeset
|
1307 "sla", |
2d2fa345e1fc
Add support for bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
200
diff
changeset
|
1308 "sra", |
2d2fa345e1fc
Add support for bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
200
diff
changeset
|
1309 "sll", |
2d2fa345e1fc
Add support for bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
200
diff
changeset
|
1310 "srl", |
199
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1311 "rld", |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1312 "rrd", |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1313 "bit", |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1314 "set", |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1315 "res", |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1316 "jp", |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1317 "jp", |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1318 "jr", |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1319 "jr", |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1320 "djnz", |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1321 "call", |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1322 "call", |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1323 "ret", |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1324 "ret", |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1325 "reti", |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1326 "retn", |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1327 "rst", |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1328 "in", |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1329 "ini", |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1330 "inir", |
200
d3066ceb29d1
Add support for EXTD group 2-byte Z80 instructions in decoder
Mike Pavone <pavone@retrodev.com>
parents:
199
diff
changeset
|
1331 "ind", |
199
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1332 "indr", |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1333 "out", |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1334 "outi", |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1335 "otir", |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1336 "outd", |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1337 "otdr" |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1338 }; |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1339 |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1340 char * z80_regs[Z80_USE_IMMED] = { |
235
d9bf8e61c33c
Get Z80 core working for simple programs
Mike Pavone <pavone@retrodev.com>
parents:
213
diff
changeset
|
1341 "c", |
199
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1342 "b", |
235
d9bf8e61c33c
Get Z80 core working for simple programs
Mike Pavone <pavone@retrodev.com>
parents:
213
diff
changeset
|
1343 "e", |
199
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1344 "d", |
235
d9bf8e61c33c
Get Z80 core working for simple programs
Mike Pavone <pavone@retrodev.com>
parents:
213
diff
changeset
|
1345 "l", |
199
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1346 "h", |
235
d9bf8e61c33c
Get Z80 core working for simple programs
Mike Pavone <pavone@retrodev.com>
parents:
213
diff
changeset
|
1347 "ixl", |
203
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
1348 "ixh", |
235
d9bf8e61c33c
Get Z80 core working for simple programs
Mike Pavone <pavone@retrodev.com>
parents:
213
diff
changeset
|
1349 "iyl", |
204
02dfa5962522
Add support for 2-byte IY instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
203
diff
changeset
|
1350 "iyh", |
200
d3066ceb29d1
Add support for EXTD group 2-byte Z80 instructions in decoder
Mike Pavone <pavone@retrodev.com>
parents:
199
diff
changeset
|
1351 "i", |
d3066ceb29d1
Add support for EXTD group 2-byte Z80 instructions in decoder
Mike Pavone <pavone@retrodev.com>
parents:
199
diff
changeset
|
1352 "r", |
213
4d4559b04c59
Make reset trigger debug exit to make it easier to test the same cases in blastem and musashi. Fix asl #1 overflow flag.
Mike Pavone <pavone@retrodev.com>
parents:
206
diff
changeset
|
1353 "a", |
199
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1354 "bc", |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1355 "de", |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1356 "hl", |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1357 "sp", |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1358 "af", |
203
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
1359 "ix", |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
1360 "iy", |
199
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1361 }; |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1362 |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1363 char * z80_conditions[Z80_CC_M+1] = { |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1364 "nz", |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1365 "z", |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1366 "nc", |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1367 "c", |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1368 "po", |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1369 "pe", |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1370 "p", |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1371 "m" |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1372 }; |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1373 |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1374 int z80_disasm(z80inst * decoded, char * dst) |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1375 { |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1376 int len = sprintf(dst, "%s", z80_mnemonics[decoded->op]); |
205
19b323614309
Add support for IX bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
204
diff
changeset
|
1377 uint8_t needcomma; |
199
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1378 if (decoded->addr_mode & Z80_DIR) { |
205
19b323614309
Add support for IX bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
204
diff
changeset
|
1379 needcomma = 1; |
203
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
1380 switch (decoded->addr_mode & 0x1F) |
199
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1381 { |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1382 case Z80_REG: |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1383 len += sprintf(dst+len, " %s", z80_regs[decoded->ea_reg]); |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1384 break; |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1385 case Z80_REG_INDIRECT: |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1386 len += sprintf(dst+len, " (%s)", z80_regs[decoded->ea_reg]); |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1387 break; |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1388 case Z80_IMMED: |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1389 len += sprintf(dst+len, " %d", decoded->immed); |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1390 break; |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1391 case Z80_IMMED_INDIRECT: |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1392 len += sprintf(dst+len, " (%d)", decoded->immed); |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1393 break; |
203
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
1394 case Z80_IX_DISPLACE: |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
1395 len += sprintf(dst+len, " (ix+%d)", decoded->ea_reg); |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
1396 break; |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
1397 case Z80_IY_DISPLACE: |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
1398 len += sprintf(dst+len, " (iy+%d)", decoded->ea_reg); |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
1399 break; |
205
19b323614309
Add support for IX bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
204
diff
changeset
|
1400 default: |
19b323614309
Add support for IX bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
204
diff
changeset
|
1401 needcomma = 0; |
199
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1402 } |
205
19b323614309
Add support for IX bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
204
diff
changeset
|
1403 if (decoded->reg & Z80_IMMED_FLAG) { |
19b323614309
Add support for IX bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
204
diff
changeset
|
1404 len += sprintf(dst+len, "%s %d", needcomma ? "," : "", decoded->immed); |
19b323614309
Add support for IX bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
204
diff
changeset
|
1405 } |
19b323614309
Add support for IX bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
204
diff
changeset
|
1406 if ((decoded->reg & 0x1F) != Z80_UNUSED) { |
199
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1407 if (decoded->op == Z80_JRCC || decoded->op == Z80_JPCC || decoded->op == Z80_CALLCC || decoded->op == Z80_RETCC) { |
205
19b323614309
Add support for IX bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
204
diff
changeset
|
1408 len += sprintf(dst+len, "%s %s", needcomma ? "," : "", z80_conditions[decoded->reg & 0x1F]); |
199
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1409 } else { |
205
19b323614309
Add support for IX bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
204
diff
changeset
|
1410 len += sprintf(dst+len, "%s %s", needcomma ? "," : "", z80_regs[decoded->reg & 0x1F]); |
199
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1411 } |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1412 } |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1413 } else { |
205
19b323614309
Add support for IX bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
204
diff
changeset
|
1414 needcomma = 0; |
19b323614309
Add support for IX bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
204
diff
changeset
|
1415 if (decoded->reg & Z80_IMMED_FLAG) { |
201
2d2fa345e1fc
Add support for bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
200
diff
changeset
|
1416 len += sprintf(dst+len, " %d", decoded->immed); |
205
19b323614309
Add support for IX bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
204
diff
changeset
|
1417 needcomma = 1; |
19b323614309
Add support for IX bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
204
diff
changeset
|
1418 } |
19b323614309
Add support for IX bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
204
diff
changeset
|
1419 if ((decoded->reg & 0x1F) != Z80_UNUSED) { |
199
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1420 if (decoded->op == Z80_JRCC || decoded->op == Z80_JPCC || decoded->op == Z80_CALLCC || decoded->op == Z80_RETCC) { |
205
19b323614309
Add support for IX bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
204
diff
changeset
|
1421 len += sprintf(dst+len, " %s", z80_conditions[decoded->reg & 0x1F]); |
199
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1422 } else { |
205
19b323614309
Add support for IX bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
204
diff
changeset
|
1423 len += sprintf(dst+len, " %s", z80_regs[decoded->reg & 0x1F]); |
199
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1424 } |
205
19b323614309
Add support for IX bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
204
diff
changeset
|
1425 needcomma = 1; |
199
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1426 } |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1427 switch (decoded->addr_mode) |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1428 { |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1429 case Z80_REG: |
205
19b323614309
Add support for IX bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
204
diff
changeset
|
1430 len += sprintf(dst+len, "%s %s", needcomma ? "," : "" , z80_regs[decoded->ea_reg]); |
199
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1431 break; |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1432 case Z80_REG_INDIRECT: |
205
19b323614309
Add support for IX bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
204
diff
changeset
|
1433 len += sprintf(dst+len, "%s (%s)", needcomma ? "," : "" , z80_regs[decoded->ea_reg]); |
199
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1434 break; |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1435 case Z80_IMMED: |
205
19b323614309
Add support for IX bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
204
diff
changeset
|
1436 len += sprintf(dst+len, "%s %d", needcomma ? "," : "" , decoded->immed); |
199
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1437 break; |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1438 case Z80_IMMED_INDIRECT: |
205
19b323614309
Add support for IX bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
204
diff
changeset
|
1439 len += sprintf(dst+len, "%s (%d)", needcomma ? "," : "" , decoded->immed); |
199
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1440 break; |
203
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
1441 case Z80_IX_DISPLACE: |
205
19b323614309
Add support for IX bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
204
diff
changeset
|
1442 len += sprintf(dst+len, "%s (ix+%d)", needcomma ? "," : "" , decoded->ea_reg); |
203
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
1443 break; |
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
1444 case Z80_IY_DISPLACE: |
205
19b323614309
Add support for IX bit instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
204
diff
changeset
|
1445 len += sprintf(dst+len, "%s (iy+%d)", needcomma ? "," : "" , decoded->ea_reg); |
203
0ae589d4c3f9
Add support for 2-byte IX instructions to decoder
Mike Pavone <pavone@retrodev.com>
parents:
202
diff
changeset
|
1446 break; |
199
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1447 } |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1448 } |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1449 return len; |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1450 } |
69585e7d474f
Add initial stab at Z80 decoder and disassembler
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1451 |