Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
alexbevi
GitHub Repository: alexbevi/BizHawk
Path: blob/master/libsnes/bsnes/gameboy/cpu/core/table.cpp
2 views
1
#ifdef CPU_CPP
2
3
void CPU::initialize_opcode_table() {
4
opcode_table[0x00] = &CPU::op_nop;
5
opcode_table[0x01] = &CPU::op_ld_rr_nn<BC>;
6
opcode_table[0x02] = &CPU::op_ld_rr_a<BC>;
7
opcode_table[0x03] = &CPU::op_inc_rr<BC>;
8
opcode_table[0x04] = &CPU::op_inc_r<B>;
9
opcode_table[0x05] = &CPU::op_dec_r<B>;
10
opcode_table[0x06] = &CPU::op_ld_r_n<B>;
11
opcode_table[0x07] = &CPU::op_rlca;
12
opcode_table[0x08] = &CPU::op_ld_nn_sp;
13
opcode_table[0x09] = &CPU::op_add_hl_rr<BC>;
14
opcode_table[0x0a] = &CPU::op_ld_a_rr<BC>;
15
opcode_table[0x0b] = &CPU::op_dec_rr<BC>;
16
opcode_table[0x0c] = &CPU::op_inc_r<C>;
17
opcode_table[0x0d] = &CPU::op_dec_r<C>;
18
opcode_table[0x0e] = &CPU::op_ld_r_n<C>;
19
opcode_table[0x0f] = &CPU::op_rrca;
20
opcode_table[0x10] = &CPU::op_stop;
21
opcode_table[0x11] = &CPU::op_ld_rr_nn<DE>;
22
opcode_table[0x12] = &CPU::op_ld_rr_a<DE>;
23
opcode_table[0x13] = &CPU::op_inc_rr<DE>;
24
opcode_table[0x14] = &CPU::op_inc_r<D>;
25
opcode_table[0x15] = &CPU::op_dec_r<D>;
26
opcode_table[0x16] = &CPU::op_ld_r_n<D>;
27
opcode_table[0x17] = &CPU::op_rla;
28
opcode_table[0x18] = &CPU::op_jr_n;
29
opcode_table[0x19] = &CPU::op_add_hl_rr<DE>;
30
opcode_table[0x1a] = &CPU::op_ld_a_rr<DE>;
31
opcode_table[0x1b] = &CPU::op_dec_rr<DE>;
32
opcode_table[0x1c] = &CPU::op_inc_r<E>;
33
opcode_table[0x1d] = &CPU::op_dec_r<E>;
34
opcode_table[0x1e] = &CPU::op_ld_r_n<E>;
35
opcode_table[0x1f] = &CPU::op_rra;
36
opcode_table[0x20] = &CPU::op_jr_f_n<ZF, 0>;
37
opcode_table[0x21] = &CPU::op_ld_rr_nn<HL>;
38
opcode_table[0x22] = &CPU::op_ldi_hl_a;
39
opcode_table[0x23] = &CPU::op_inc_rr<HL>;
40
opcode_table[0x24] = &CPU::op_inc_r<H>;
41
opcode_table[0x25] = &CPU::op_dec_r<H>;
42
opcode_table[0x26] = &CPU::op_ld_r_n<H>;
43
opcode_table[0x27] = &CPU::op_daa;
44
opcode_table[0x28] = &CPU::op_jr_f_n<ZF, 1>;
45
opcode_table[0x29] = &CPU::op_add_hl_rr<HL>;
46
opcode_table[0x2a] = &CPU::op_ldi_a_hl;
47
opcode_table[0x2b] = &CPU::op_dec_rr<HL>;
48
opcode_table[0x2c] = &CPU::op_inc_r<L>;
49
opcode_table[0x2d] = &CPU::op_dec_r<L>;
50
opcode_table[0x2e] = &CPU::op_ld_r_n<L>;
51
opcode_table[0x2f] = &CPU::op_cpl;
52
opcode_table[0x30] = &CPU::op_jr_f_n<CF, 0>;
53
opcode_table[0x31] = &CPU::op_ld_rr_nn<SP>;
54
opcode_table[0x32] = &CPU::op_ldd_hl_a;
55
opcode_table[0x33] = &CPU::op_inc_rr<SP>;
56
opcode_table[0x34] = &CPU::op_inc_hl;
57
opcode_table[0x35] = &CPU::op_dec_hl;
58
opcode_table[0x36] = &CPU::op_ld_hl_n;
59
opcode_table[0x37] = &CPU::op_scf;
60
opcode_table[0x38] = &CPU::op_jr_f_n<CF, 1>;
61
opcode_table[0x39] = &CPU::op_add_hl_rr<SP>;
62
opcode_table[0x3a] = &CPU::op_ldd_a_hl;
63
opcode_table[0x3b] = &CPU::op_dec_rr<SP>;
64
opcode_table[0x3c] = &CPU::op_inc_r<A>;
65
opcode_table[0x3d] = &CPU::op_dec_r<A>;
66
opcode_table[0x3e] = &CPU::op_ld_r_n<A>;
67
opcode_table[0x3f] = &CPU::op_ccf;
68
opcode_table[0x40] = &CPU::op_ld_r_r<B, B>;
69
opcode_table[0x41] = &CPU::op_ld_r_r<B, C>;
70
opcode_table[0x42] = &CPU::op_ld_r_r<B, D>;
71
opcode_table[0x43] = &CPU::op_ld_r_r<B, E>;
72
opcode_table[0x44] = &CPU::op_ld_r_r<B, H>;
73
opcode_table[0x45] = &CPU::op_ld_r_r<B, L>;
74
opcode_table[0x46] = &CPU::op_ld_r_hl<B>;
75
opcode_table[0x47] = &CPU::op_ld_r_r<B, A>;
76
opcode_table[0x48] = &CPU::op_ld_r_r<C, B>;
77
opcode_table[0x49] = &CPU::op_ld_r_r<C, C>;
78
opcode_table[0x4a] = &CPU::op_ld_r_r<C, D>;
79
opcode_table[0x4b] = &CPU::op_ld_r_r<C, E>;
80
opcode_table[0x4c] = &CPU::op_ld_r_r<C, H>;
81
opcode_table[0x4d] = &CPU::op_ld_r_r<C, L>;
82
opcode_table[0x4e] = &CPU::op_ld_r_hl<C>;
83
opcode_table[0x4f] = &CPU::op_ld_r_r<C, A>;
84
opcode_table[0x50] = &CPU::op_ld_r_r<D, B>;
85
opcode_table[0x51] = &CPU::op_ld_r_r<D, C>;
86
opcode_table[0x52] = &CPU::op_ld_r_r<D, D>;
87
opcode_table[0x53] = &CPU::op_ld_r_r<D, E>;
88
opcode_table[0x54] = &CPU::op_ld_r_r<D, H>;
89
opcode_table[0x55] = &CPU::op_ld_r_r<D, L>;
90
opcode_table[0x56] = &CPU::op_ld_r_hl<D>;
91
opcode_table[0x57] = &CPU::op_ld_r_r<D, A>;
92
opcode_table[0x58] = &CPU::op_ld_r_r<E, B>;
93
opcode_table[0x59] = &CPU::op_ld_r_r<E, C>;
94
opcode_table[0x5a] = &CPU::op_ld_r_r<E, D>;
95
opcode_table[0x5b] = &CPU::op_ld_r_r<E, E>;
96
opcode_table[0x5c] = &CPU::op_ld_r_r<E, H>;
97
opcode_table[0x5d] = &CPU::op_ld_r_r<E, L>;
98
opcode_table[0x5e] = &CPU::op_ld_r_hl<E>;
99
opcode_table[0x5f] = &CPU::op_ld_r_r<E, A>;
100
opcode_table[0x60] = &CPU::op_ld_r_r<H, B>;
101
opcode_table[0x61] = &CPU::op_ld_r_r<H, C>;
102
opcode_table[0x62] = &CPU::op_ld_r_r<H, D>;
103
opcode_table[0x63] = &CPU::op_ld_r_r<H, E>;
104
opcode_table[0x64] = &CPU::op_ld_r_r<H, H>;
105
opcode_table[0x65] = &CPU::op_ld_r_r<H, L>;
106
opcode_table[0x66] = &CPU::op_ld_r_hl<H>;
107
opcode_table[0x67] = &CPU::op_ld_r_r<H, A>;
108
opcode_table[0x68] = &CPU::op_ld_r_r<L, B>;
109
opcode_table[0x69] = &CPU::op_ld_r_r<L, C>;
110
opcode_table[0x6a] = &CPU::op_ld_r_r<L, D>;
111
opcode_table[0x6b] = &CPU::op_ld_r_r<L, E>;
112
opcode_table[0x6c] = &CPU::op_ld_r_r<L, H>;
113
opcode_table[0x6d] = &CPU::op_ld_r_r<L, L>;
114
opcode_table[0x6e] = &CPU::op_ld_r_hl<L>;
115
opcode_table[0x6f] = &CPU::op_ld_r_r<L, A>;
116
opcode_table[0x70] = &CPU::op_ld_hl_r<B>;
117
opcode_table[0x71] = &CPU::op_ld_hl_r<C>;
118
opcode_table[0x72] = &CPU::op_ld_hl_r<D>;
119
opcode_table[0x73] = &CPU::op_ld_hl_r<E>;
120
opcode_table[0x74] = &CPU::op_ld_hl_r<H>;
121
opcode_table[0x75] = &CPU::op_ld_hl_r<L>;
122
opcode_table[0x76] = &CPU::op_halt;
123
opcode_table[0x77] = &CPU::op_ld_hl_r<A>;
124
opcode_table[0x78] = &CPU::op_ld_r_r<A, B>;
125
opcode_table[0x79] = &CPU::op_ld_r_r<A, C>;
126
opcode_table[0x7a] = &CPU::op_ld_r_r<A, D>;
127
opcode_table[0x7b] = &CPU::op_ld_r_r<A, E>;
128
opcode_table[0x7c] = &CPU::op_ld_r_r<A, H>;
129
opcode_table[0x7d] = &CPU::op_ld_r_r<A, L>;
130
opcode_table[0x7e] = &CPU::op_ld_r_hl<A>;
131
opcode_table[0x7f] = &CPU::op_ld_r_r<A, A>;
132
opcode_table[0x80] = &CPU::op_add_a_r<B>;
133
opcode_table[0x81] = &CPU::op_add_a_r<C>;
134
opcode_table[0x82] = &CPU::op_add_a_r<D>;
135
opcode_table[0x83] = &CPU::op_add_a_r<E>;
136
opcode_table[0x84] = &CPU::op_add_a_r<H>;
137
opcode_table[0x85] = &CPU::op_add_a_r<L>;
138
opcode_table[0x86] = &CPU::op_add_a_hl;
139
opcode_table[0x87] = &CPU::op_add_a_r<A>;
140
opcode_table[0x88] = &CPU::op_adc_a_r<B>;
141
opcode_table[0x89] = &CPU::op_adc_a_r<C>;
142
opcode_table[0x8a] = &CPU::op_adc_a_r<D>;
143
opcode_table[0x8b] = &CPU::op_adc_a_r<E>;
144
opcode_table[0x8c] = &CPU::op_adc_a_r<H>;
145
opcode_table[0x8d] = &CPU::op_adc_a_r<L>;
146
opcode_table[0x8e] = &CPU::op_adc_a_hl;
147
opcode_table[0x8f] = &CPU::op_adc_a_r<A>;
148
opcode_table[0x90] = &CPU::op_sub_a_r<B>;
149
opcode_table[0x91] = &CPU::op_sub_a_r<C>;
150
opcode_table[0x92] = &CPU::op_sub_a_r<D>;
151
opcode_table[0x93] = &CPU::op_sub_a_r<E>;
152
opcode_table[0x94] = &CPU::op_sub_a_r<H>;
153
opcode_table[0x95] = &CPU::op_sub_a_r<L>;
154
opcode_table[0x96] = &CPU::op_sub_a_hl;
155
opcode_table[0x97] = &CPU::op_sub_a_r<A>;
156
opcode_table[0x98] = &CPU::op_sbc_a_r<B>;
157
opcode_table[0x99] = &CPU::op_sbc_a_r<C>;
158
opcode_table[0x9a] = &CPU::op_sbc_a_r<D>;
159
opcode_table[0x9b] = &CPU::op_sbc_a_r<E>;
160
opcode_table[0x9c] = &CPU::op_sbc_a_r<H>;
161
opcode_table[0x9d] = &CPU::op_sbc_a_r<L>;
162
opcode_table[0x9e] = &CPU::op_sbc_a_hl;
163
opcode_table[0x9f] = &CPU::op_sbc_a_r<A>;
164
opcode_table[0xa0] = &CPU::op_and_a_r<B>;
165
opcode_table[0xa1] = &CPU::op_and_a_r<C>;
166
opcode_table[0xa2] = &CPU::op_and_a_r<D>;
167
opcode_table[0xa3] = &CPU::op_and_a_r<E>;
168
opcode_table[0xa4] = &CPU::op_and_a_r<H>;
169
opcode_table[0xa5] = &CPU::op_and_a_r<L>;
170
opcode_table[0xa6] = &CPU::op_and_a_hl;
171
opcode_table[0xa7] = &CPU::op_and_a_r<A>;
172
opcode_table[0xa8] = &CPU::op_xor_a_r<B>;
173
opcode_table[0xa9] = &CPU::op_xor_a_r<C>;
174
opcode_table[0xaa] = &CPU::op_xor_a_r<D>;
175
opcode_table[0xab] = &CPU::op_xor_a_r<E>;
176
opcode_table[0xac] = &CPU::op_xor_a_r<H>;
177
opcode_table[0xad] = &CPU::op_xor_a_r<L>;
178
opcode_table[0xae] = &CPU::op_xor_a_hl;
179
opcode_table[0xaf] = &CPU::op_xor_a_r<A>;
180
opcode_table[0xb0] = &CPU::op_or_a_r<B>;
181
opcode_table[0xb1] = &CPU::op_or_a_r<C>;
182
opcode_table[0xb2] = &CPU::op_or_a_r<D>;
183
opcode_table[0xb3] = &CPU::op_or_a_r<E>;
184
opcode_table[0xb4] = &CPU::op_or_a_r<H>;
185
opcode_table[0xb5] = &CPU::op_or_a_r<L>;
186
opcode_table[0xb6] = &CPU::op_or_a_hl;
187
opcode_table[0xb7] = &CPU::op_or_a_r<A>;
188
opcode_table[0xb8] = &CPU::op_cp_a_r<B>;
189
opcode_table[0xb9] = &CPU::op_cp_a_r<C>;
190
opcode_table[0xba] = &CPU::op_cp_a_r<D>;
191
opcode_table[0xbb] = &CPU::op_cp_a_r<E>;
192
opcode_table[0xbc] = &CPU::op_cp_a_r<H>;
193
opcode_table[0xbd] = &CPU::op_cp_a_r<L>;
194
opcode_table[0xbe] = &CPU::op_cp_a_hl;
195
opcode_table[0xbf] = &CPU::op_cp_a_r<A>;
196
opcode_table[0xc0] = &CPU::op_ret_f<ZF, 0>;
197
opcode_table[0xc1] = &CPU::op_pop_rr<BC>;
198
opcode_table[0xc2] = &CPU::op_jp_f_nn<ZF, 0>;
199
opcode_table[0xc3] = &CPU::op_jp_nn;
200
opcode_table[0xc4] = &CPU::op_call_f_nn<ZF, 0>;
201
opcode_table[0xc5] = &CPU::op_push_rr<BC>;
202
opcode_table[0xc6] = &CPU::op_add_a_n;
203
opcode_table[0xc7] = &CPU::op_rst_n<0x00>;
204
opcode_table[0xc8] = &CPU::op_ret_f<ZF, 1>;
205
opcode_table[0xc9] = &CPU::op_ret;
206
opcode_table[0xca] = &CPU::op_jp_f_nn<ZF, 1>;
207
opcode_table[0xcb] = &CPU::op_cb;
208
opcode_table[0xcc] = &CPU::op_call_f_nn<ZF, 1>;
209
opcode_table[0xcd] = &CPU::op_call_nn;
210
opcode_table[0xce] = &CPU::op_adc_a_n;
211
opcode_table[0xcf] = &CPU::op_rst_n<0x08>;
212
opcode_table[0xd0] = &CPU::op_ret_f<CF, 0>;
213
opcode_table[0xd1] = &CPU::op_pop_rr<DE>;
214
opcode_table[0xd2] = &CPU::op_jp_f_nn<CF, 0>;
215
opcode_table[0xd3] = &CPU::op_xx;
216
opcode_table[0xd4] = &CPU::op_call_f_nn<CF, 0>;
217
opcode_table[0xd5] = &CPU::op_push_rr<DE>;
218
opcode_table[0xd6] = &CPU::op_sub_a_n;
219
opcode_table[0xd7] = &CPU::op_rst_n<0x10>;
220
opcode_table[0xd8] = &CPU::op_ret_f<CF, 1>;
221
opcode_table[0xd9] = &CPU::op_reti;
222
opcode_table[0xda] = &CPU::op_jp_f_nn<CF, 1>;
223
opcode_table[0xdb] = &CPU::op_xx;
224
opcode_table[0xdc] = &CPU::op_call_f_nn<CF, 1>;
225
opcode_table[0xdd] = &CPU::op_xx;
226
opcode_table[0xde] = &CPU::op_sbc_a_n;
227
opcode_table[0xdf] = &CPU::op_rst_n<0x18>;
228
opcode_table[0xe0] = &CPU::op_ld_ffn_a;
229
opcode_table[0xe1] = &CPU::op_pop_rr<HL>;
230
opcode_table[0xe2] = &CPU::op_ld_ffc_a;
231
opcode_table[0xe3] = &CPU::op_xx;
232
opcode_table[0xe4] = &CPU::op_xx;
233
opcode_table[0xe5] = &CPU::op_push_rr<HL>;
234
opcode_table[0xe6] = &CPU::op_and_a_n;
235
opcode_table[0xe7] = &CPU::op_rst_n<0x20>;
236
opcode_table[0xe8] = &CPU::op_add_sp_n;
237
opcode_table[0xe9] = &CPU::op_jp_hl;
238
opcode_table[0xea] = &CPU::op_ld_nn_a;
239
opcode_table[0xeb] = &CPU::op_xx;
240
opcode_table[0xec] = &CPU::op_xx;
241
opcode_table[0xed] = &CPU::op_xx;
242
opcode_table[0xee] = &CPU::op_xor_a_n;
243
opcode_table[0xef] = &CPU::op_rst_n<0x28>;
244
opcode_table[0xf0] = &CPU::op_ld_a_ffn;
245
opcode_table[0xf1] = &CPU::op_pop_rr<AF>;
246
opcode_table[0xf2] = &CPU::op_ld_a_ffc;
247
opcode_table[0xf3] = &CPU::op_di;
248
opcode_table[0xf4] = &CPU::op_xx;
249
opcode_table[0xf5] = &CPU::op_push_rr<AF>;
250
opcode_table[0xf6] = &CPU::op_or_a_n;
251
opcode_table[0xf7] = &CPU::op_rst_n<0x30>;
252
opcode_table[0xf8] = &CPU::op_ld_hl_sp_n;
253
opcode_table[0xf9] = &CPU::op_ld_sp_hl;
254
opcode_table[0xfa] = &CPU::op_ld_a_nn;
255
opcode_table[0xfb] = &CPU::op_ei;
256
opcode_table[0xfc] = &CPU::op_xx;
257
opcode_table[0xfd] = &CPU::op_xx;
258
opcode_table[0xfe] = &CPU::op_cp_a_n;
259
opcode_table[0xff] = &CPU::op_rst_n<0x38>;
260
261
opcode_table_cb[0x00] = &CPU::op_rlc_r<B>;
262
opcode_table_cb[0x01] = &CPU::op_rlc_r<C>;
263
opcode_table_cb[0x02] = &CPU::op_rlc_r<D>;
264
opcode_table_cb[0x03] = &CPU::op_rlc_r<E>;
265
opcode_table_cb[0x04] = &CPU::op_rlc_r<H>;
266
opcode_table_cb[0x05] = &CPU::op_rlc_r<L>;
267
opcode_table_cb[0x06] = &CPU::op_rlc_hl;
268
opcode_table_cb[0x07] = &CPU::op_rlc_r<A>;
269
opcode_table_cb[0x08] = &CPU::op_rrc_r<B>;
270
opcode_table_cb[0x09] = &CPU::op_rrc_r<C>;
271
opcode_table_cb[0x0a] = &CPU::op_rrc_r<D>;
272
opcode_table_cb[0x0b] = &CPU::op_rrc_r<E>;
273
opcode_table_cb[0x0c] = &CPU::op_rrc_r<H>;
274
opcode_table_cb[0x0d] = &CPU::op_rrc_r<L>;
275
opcode_table_cb[0x0e] = &CPU::op_rrc_hl;
276
opcode_table_cb[0x0f] = &CPU::op_rrc_r<A>;
277
opcode_table_cb[0x10] = &CPU::op_rl_r<B>;
278
opcode_table_cb[0x11] = &CPU::op_rl_r<C>;
279
opcode_table_cb[0x12] = &CPU::op_rl_r<D>;
280
opcode_table_cb[0x13] = &CPU::op_rl_r<E>;
281
opcode_table_cb[0x14] = &CPU::op_rl_r<H>;
282
opcode_table_cb[0x15] = &CPU::op_rl_r<L>;
283
opcode_table_cb[0x16] = &CPU::op_rl_hl;
284
opcode_table_cb[0x17] = &CPU::op_rl_r<A>;
285
opcode_table_cb[0x18] = &CPU::op_rr_r<B>;
286
opcode_table_cb[0x19] = &CPU::op_rr_r<C>;
287
opcode_table_cb[0x1a] = &CPU::op_rr_r<D>;
288
opcode_table_cb[0x1b] = &CPU::op_rr_r<E>;
289
opcode_table_cb[0x1c] = &CPU::op_rr_r<H>;
290
opcode_table_cb[0x1d] = &CPU::op_rr_r<L>;
291
opcode_table_cb[0x1e] = &CPU::op_rr_hl;
292
opcode_table_cb[0x1f] = &CPU::op_rr_r<A>;
293
opcode_table_cb[0x20] = &CPU::op_sla_r<B>;
294
opcode_table_cb[0x21] = &CPU::op_sla_r<C>;
295
opcode_table_cb[0x22] = &CPU::op_sla_r<D>;
296
opcode_table_cb[0x23] = &CPU::op_sla_r<E>;
297
opcode_table_cb[0x24] = &CPU::op_sla_r<H>;
298
opcode_table_cb[0x25] = &CPU::op_sla_r<L>;
299
opcode_table_cb[0x26] = &CPU::op_sla_hl;
300
opcode_table_cb[0x27] = &CPU::op_sla_r<A>;
301
opcode_table_cb[0x28] = &CPU::op_sra_r<B>;
302
opcode_table_cb[0x29] = &CPU::op_sra_r<C>;
303
opcode_table_cb[0x2a] = &CPU::op_sra_r<D>;
304
opcode_table_cb[0x2b] = &CPU::op_sra_r<E>;
305
opcode_table_cb[0x2c] = &CPU::op_sra_r<H>;
306
opcode_table_cb[0x2d] = &CPU::op_sra_r<L>;
307
opcode_table_cb[0x2e] = &CPU::op_sra_hl;
308
opcode_table_cb[0x2f] = &CPU::op_sra_r<A>;
309
opcode_table_cb[0x30] = &CPU::op_swap_r<B>;
310
opcode_table_cb[0x31] = &CPU::op_swap_r<C>;
311
opcode_table_cb[0x32] = &CPU::op_swap_r<D>;
312
opcode_table_cb[0x33] = &CPU::op_swap_r<E>;
313
opcode_table_cb[0x34] = &CPU::op_swap_r<H>;
314
opcode_table_cb[0x35] = &CPU::op_swap_r<L>;
315
opcode_table_cb[0x36] = &CPU::op_swap_hl;
316
opcode_table_cb[0x37] = &CPU::op_swap_r<A>;
317
opcode_table_cb[0x38] = &CPU::op_srl_r<B>;
318
opcode_table_cb[0x39] = &CPU::op_srl_r<C>;
319
opcode_table_cb[0x3a] = &CPU::op_srl_r<D>;
320
opcode_table_cb[0x3b] = &CPU::op_srl_r<E>;
321
opcode_table_cb[0x3c] = &CPU::op_srl_r<H>;
322
opcode_table_cb[0x3d] = &CPU::op_srl_r<L>;
323
opcode_table_cb[0x3e] = &CPU::op_srl_hl;
324
opcode_table_cb[0x3f] = &CPU::op_srl_r<A>;
325
opcode_table_cb[0x40] = &CPU::op_bit_n_r<0, B>;
326
opcode_table_cb[0x41] = &CPU::op_bit_n_r<0, C>;
327
opcode_table_cb[0x42] = &CPU::op_bit_n_r<0, D>;
328
opcode_table_cb[0x43] = &CPU::op_bit_n_r<0, E>;
329
opcode_table_cb[0x44] = &CPU::op_bit_n_r<0, H>;
330
opcode_table_cb[0x45] = &CPU::op_bit_n_r<0, L>;
331
opcode_table_cb[0x46] = &CPU::op_bit_n_hl<0>;
332
opcode_table_cb[0x47] = &CPU::op_bit_n_r<0, A>;
333
opcode_table_cb[0x48] = &CPU::op_bit_n_r<1, B>;
334
opcode_table_cb[0x49] = &CPU::op_bit_n_r<1, C>;
335
opcode_table_cb[0x4a] = &CPU::op_bit_n_r<1, D>;
336
opcode_table_cb[0x4b] = &CPU::op_bit_n_r<1, E>;
337
opcode_table_cb[0x4c] = &CPU::op_bit_n_r<1, H>;
338
opcode_table_cb[0x4d] = &CPU::op_bit_n_r<1, L>;
339
opcode_table_cb[0x4e] = &CPU::op_bit_n_hl<1>;
340
opcode_table_cb[0x4f] = &CPU::op_bit_n_r<1, A>;
341
opcode_table_cb[0x50] = &CPU::op_bit_n_r<2, B>;
342
opcode_table_cb[0x51] = &CPU::op_bit_n_r<2, C>;
343
opcode_table_cb[0x52] = &CPU::op_bit_n_r<2, D>;
344
opcode_table_cb[0x53] = &CPU::op_bit_n_r<2, E>;
345
opcode_table_cb[0x54] = &CPU::op_bit_n_r<2, H>;
346
opcode_table_cb[0x55] = &CPU::op_bit_n_r<2, L>;
347
opcode_table_cb[0x56] = &CPU::op_bit_n_hl<2>;
348
opcode_table_cb[0x57] = &CPU::op_bit_n_r<2, A>;
349
opcode_table_cb[0x58] = &CPU::op_bit_n_r<3, B>;
350
opcode_table_cb[0x59] = &CPU::op_bit_n_r<3, C>;
351
opcode_table_cb[0x5a] = &CPU::op_bit_n_r<3, D>;
352
opcode_table_cb[0x5b] = &CPU::op_bit_n_r<3, E>;
353
opcode_table_cb[0x5c] = &CPU::op_bit_n_r<3, H>;
354
opcode_table_cb[0x5d] = &CPU::op_bit_n_r<3, L>;
355
opcode_table_cb[0x5e] = &CPU::op_bit_n_hl<3>;
356
opcode_table_cb[0x5f] = &CPU::op_bit_n_r<3, A>;
357
opcode_table_cb[0x60] = &CPU::op_bit_n_r<4, B>;
358
opcode_table_cb[0x61] = &CPU::op_bit_n_r<4, C>;
359
opcode_table_cb[0x62] = &CPU::op_bit_n_r<4, D>;
360
opcode_table_cb[0x63] = &CPU::op_bit_n_r<4, E>;
361
opcode_table_cb[0x64] = &CPU::op_bit_n_r<4, H>;
362
opcode_table_cb[0x65] = &CPU::op_bit_n_r<4, L>;
363
opcode_table_cb[0x66] = &CPU::op_bit_n_hl<4>;
364
opcode_table_cb[0x67] = &CPU::op_bit_n_r<4, A>;
365
opcode_table_cb[0x68] = &CPU::op_bit_n_r<5, B>;
366
opcode_table_cb[0x69] = &CPU::op_bit_n_r<5, C>;
367
opcode_table_cb[0x6a] = &CPU::op_bit_n_r<5, D>;
368
opcode_table_cb[0x6b] = &CPU::op_bit_n_r<5, E>;
369
opcode_table_cb[0x6c] = &CPU::op_bit_n_r<5, H>;
370
opcode_table_cb[0x6d] = &CPU::op_bit_n_r<5, L>;
371
opcode_table_cb[0x6e] = &CPU::op_bit_n_hl<5>;
372
opcode_table_cb[0x6f] = &CPU::op_bit_n_r<5, A>;
373
opcode_table_cb[0x70] = &CPU::op_bit_n_r<6, B>;
374
opcode_table_cb[0x71] = &CPU::op_bit_n_r<6, C>;
375
opcode_table_cb[0x72] = &CPU::op_bit_n_r<6, D>;
376
opcode_table_cb[0x73] = &CPU::op_bit_n_r<6, E>;
377
opcode_table_cb[0x74] = &CPU::op_bit_n_r<6, H>;
378
opcode_table_cb[0x75] = &CPU::op_bit_n_r<6, L>;
379
opcode_table_cb[0x76] = &CPU::op_bit_n_hl<6>;
380
opcode_table_cb[0x77] = &CPU::op_bit_n_r<6, A>;
381
opcode_table_cb[0x78] = &CPU::op_bit_n_r<7, B>;
382
opcode_table_cb[0x79] = &CPU::op_bit_n_r<7, C>;
383
opcode_table_cb[0x7a] = &CPU::op_bit_n_r<7, D>;
384
opcode_table_cb[0x7b] = &CPU::op_bit_n_r<7, E>;
385
opcode_table_cb[0x7c] = &CPU::op_bit_n_r<7, H>;
386
opcode_table_cb[0x7d] = &CPU::op_bit_n_r<7, L>;
387
opcode_table_cb[0x7e] = &CPU::op_bit_n_hl<7>;
388
opcode_table_cb[0x7f] = &CPU::op_bit_n_r<7, A>;
389
opcode_table_cb[0x80] = &CPU::op_res_n_r<0, B>;
390
opcode_table_cb[0x81] = &CPU::op_res_n_r<0, C>;
391
opcode_table_cb[0x82] = &CPU::op_res_n_r<0, D>;
392
opcode_table_cb[0x83] = &CPU::op_res_n_r<0, E>;
393
opcode_table_cb[0x84] = &CPU::op_res_n_r<0, H>;
394
opcode_table_cb[0x85] = &CPU::op_res_n_r<0, L>;
395
opcode_table_cb[0x86] = &CPU::op_res_n_hl<0>;
396
opcode_table_cb[0x87] = &CPU::op_res_n_r<0, A>;
397
opcode_table_cb[0x88] = &CPU::op_res_n_r<1, B>;
398
opcode_table_cb[0x89] = &CPU::op_res_n_r<1, C>;
399
opcode_table_cb[0x8a] = &CPU::op_res_n_r<1, D>;
400
opcode_table_cb[0x8b] = &CPU::op_res_n_r<1, E>;
401
opcode_table_cb[0x8c] = &CPU::op_res_n_r<1, H>;
402
opcode_table_cb[0x8d] = &CPU::op_res_n_r<1, L>;
403
opcode_table_cb[0x8e] = &CPU::op_res_n_hl<1>;
404
opcode_table_cb[0x8f] = &CPU::op_res_n_r<1, A>;
405
opcode_table_cb[0x90] = &CPU::op_res_n_r<2, B>;
406
opcode_table_cb[0x91] = &CPU::op_res_n_r<2, C>;
407
opcode_table_cb[0x92] = &CPU::op_res_n_r<2, D>;
408
opcode_table_cb[0x93] = &CPU::op_res_n_r<2, E>;
409
opcode_table_cb[0x94] = &CPU::op_res_n_r<2, H>;
410
opcode_table_cb[0x95] = &CPU::op_res_n_r<2, L>;
411
opcode_table_cb[0x96] = &CPU::op_res_n_hl<2>;
412
opcode_table_cb[0x97] = &CPU::op_res_n_r<2, A>;
413
opcode_table_cb[0x98] = &CPU::op_res_n_r<3, B>;
414
opcode_table_cb[0x99] = &CPU::op_res_n_r<3, C>;
415
opcode_table_cb[0x9a] = &CPU::op_res_n_r<3, D>;
416
opcode_table_cb[0x9b] = &CPU::op_res_n_r<3, E>;
417
opcode_table_cb[0x9c] = &CPU::op_res_n_r<3, H>;
418
opcode_table_cb[0x9d] = &CPU::op_res_n_r<3, L>;
419
opcode_table_cb[0x9e] = &CPU::op_res_n_hl<3>;
420
opcode_table_cb[0x9f] = &CPU::op_res_n_r<3, A>;
421
opcode_table_cb[0xa0] = &CPU::op_res_n_r<4, B>;
422
opcode_table_cb[0xa1] = &CPU::op_res_n_r<4, C>;
423
opcode_table_cb[0xa2] = &CPU::op_res_n_r<4, D>;
424
opcode_table_cb[0xa3] = &CPU::op_res_n_r<4, E>;
425
opcode_table_cb[0xa4] = &CPU::op_res_n_r<4, H>;
426
opcode_table_cb[0xa5] = &CPU::op_res_n_r<4, L>;
427
opcode_table_cb[0xa6] = &CPU::op_res_n_hl<4>;
428
opcode_table_cb[0xa7] = &CPU::op_res_n_r<4, A>;
429
opcode_table_cb[0xa8] = &CPU::op_res_n_r<5, B>;
430
opcode_table_cb[0xa9] = &CPU::op_res_n_r<5, C>;
431
opcode_table_cb[0xaa] = &CPU::op_res_n_r<5, D>;
432
opcode_table_cb[0xab] = &CPU::op_res_n_r<5, E>;
433
opcode_table_cb[0xac] = &CPU::op_res_n_r<5, H>;
434
opcode_table_cb[0xad] = &CPU::op_res_n_r<5, L>;
435
opcode_table_cb[0xae] = &CPU::op_res_n_hl<5>;
436
opcode_table_cb[0xaf] = &CPU::op_res_n_r<5, A>;
437
opcode_table_cb[0xb0] = &CPU::op_res_n_r<6, B>;
438
opcode_table_cb[0xb1] = &CPU::op_res_n_r<6, C>;
439
opcode_table_cb[0xb2] = &CPU::op_res_n_r<6, D>;
440
opcode_table_cb[0xb3] = &CPU::op_res_n_r<6, E>;
441
opcode_table_cb[0xb4] = &CPU::op_res_n_r<6, H>;
442
opcode_table_cb[0xb5] = &CPU::op_res_n_r<6, L>;
443
opcode_table_cb[0xb6] = &CPU::op_res_n_hl<6>;
444
opcode_table_cb[0xb7] = &CPU::op_res_n_r<6, A>;
445
opcode_table_cb[0xb8] = &CPU::op_res_n_r<7, B>;
446
opcode_table_cb[0xb9] = &CPU::op_res_n_r<7, C>;
447
opcode_table_cb[0xba] = &CPU::op_res_n_r<7, D>;
448
opcode_table_cb[0xbb] = &CPU::op_res_n_r<7, E>;
449
opcode_table_cb[0xbc] = &CPU::op_res_n_r<7, H>;
450
opcode_table_cb[0xbd] = &CPU::op_res_n_r<7, L>;
451
opcode_table_cb[0xbe] = &CPU::op_res_n_hl<7>;
452
opcode_table_cb[0xbf] = &CPU::op_res_n_r<7, A>;
453
opcode_table_cb[0xc0] = &CPU::op_set_n_r<0, B>;
454
opcode_table_cb[0xc1] = &CPU::op_set_n_r<0, C>;
455
opcode_table_cb[0xc2] = &CPU::op_set_n_r<0, D>;
456
opcode_table_cb[0xc3] = &CPU::op_set_n_r<0, E>;
457
opcode_table_cb[0xc4] = &CPU::op_set_n_r<0, H>;
458
opcode_table_cb[0xc5] = &CPU::op_set_n_r<0, L>;
459
opcode_table_cb[0xc6] = &CPU::op_set_n_hl<0>;
460
opcode_table_cb[0xc7] = &CPU::op_set_n_r<0, A>;
461
opcode_table_cb[0xc8] = &CPU::op_set_n_r<1, B>;
462
opcode_table_cb[0xc9] = &CPU::op_set_n_r<1, C>;
463
opcode_table_cb[0xca] = &CPU::op_set_n_r<1, D>;
464
opcode_table_cb[0xcb] = &CPU::op_set_n_r<1, E>;
465
opcode_table_cb[0xcc] = &CPU::op_set_n_r<1, H>;
466
opcode_table_cb[0xcd] = &CPU::op_set_n_r<1, L>;
467
opcode_table_cb[0xce] = &CPU::op_set_n_hl<1>;
468
opcode_table_cb[0xcf] = &CPU::op_set_n_r<1, A>;
469
opcode_table_cb[0xd0] = &CPU::op_set_n_r<2, B>;
470
opcode_table_cb[0xd1] = &CPU::op_set_n_r<2, C>;
471
opcode_table_cb[0xd2] = &CPU::op_set_n_r<2, D>;
472
opcode_table_cb[0xd3] = &CPU::op_set_n_r<2, E>;
473
opcode_table_cb[0xd4] = &CPU::op_set_n_r<2, H>;
474
opcode_table_cb[0xd5] = &CPU::op_set_n_r<2, L>;
475
opcode_table_cb[0xd6] = &CPU::op_set_n_hl<2>;
476
opcode_table_cb[0xd7] = &CPU::op_set_n_r<2, A>;
477
opcode_table_cb[0xd8] = &CPU::op_set_n_r<3, B>;
478
opcode_table_cb[0xd9] = &CPU::op_set_n_r<3, C>;
479
opcode_table_cb[0xda] = &CPU::op_set_n_r<3, D>;
480
opcode_table_cb[0xdb] = &CPU::op_set_n_r<3, E>;
481
opcode_table_cb[0xdc] = &CPU::op_set_n_r<3, H>;
482
opcode_table_cb[0xdd] = &CPU::op_set_n_r<3, L>;
483
opcode_table_cb[0xde] = &CPU::op_set_n_hl<3>;
484
opcode_table_cb[0xdf] = &CPU::op_set_n_r<3, A>;
485
opcode_table_cb[0xe0] = &CPU::op_set_n_r<4, B>;
486
opcode_table_cb[0xe1] = &CPU::op_set_n_r<4, C>;
487
opcode_table_cb[0xe2] = &CPU::op_set_n_r<4, D>;
488
opcode_table_cb[0xe3] = &CPU::op_set_n_r<4, E>;
489
opcode_table_cb[0xe4] = &CPU::op_set_n_r<4, H>;
490
opcode_table_cb[0xe5] = &CPU::op_set_n_r<4, L>;
491
opcode_table_cb[0xe6] = &CPU::op_set_n_hl<4>;
492
opcode_table_cb[0xe7] = &CPU::op_set_n_r<4, A>;
493
opcode_table_cb[0xe8] = &CPU::op_set_n_r<5, B>;
494
opcode_table_cb[0xe9] = &CPU::op_set_n_r<5, C>;
495
opcode_table_cb[0xea] = &CPU::op_set_n_r<5, D>;
496
opcode_table_cb[0xeb] = &CPU::op_set_n_r<5, E>;
497
opcode_table_cb[0xec] = &CPU::op_set_n_r<5, H>;
498
opcode_table_cb[0xed] = &CPU::op_set_n_r<5, L>;
499
opcode_table_cb[0xee] = &CPU::op_set_n_hl<5>;
500
opcode_table_cb[0xef] = &CPU::op_set_n_r<5, A>;
501
opcode_table_cb[0xf0] = &CPU::op_set_n_r<6, B>;
502
opcode_table_cb[0xf1] = &CPU::op_set_n_r<6, C>;
503
opcode_table_cb[0xf2] = &CPU::op_set_n_r<6, D>;
504
opcode_table_cb[0xf3] = &CPU::op_set_n_r<6, E>;
505
opcode_table_cb[0xf4] = &CPU::op_set_n_r<6, H>;
506
opcode_table_cb[0xf5] = &CPU::op_set_n_r<6, L>;
507
opcode_table_cb[0xf6] = &CPU::op_set_n_hl<6>;
508
opcode_table_cb[0xf7] = &CPU::op_set_n_r<6, A>;
509
opcode_table_cb[0xf8] = &CPU::op_set_n_r<7, B>;
510
opcode_table_cb[0xf9] = &CPU::op_set_n_r<7, C>;
511
opcode_table_cb[0xfa] = &CPU::op_set_n_r<7, D>;
512
opcode_table_cb[0xfb] = &CPU::op_set_n_r<7, E>;
513
opcode_table_cb[0xfc] = &CPU::op_set_n_r<7, H>;
514
opcode_table_cb[0xfd] = &CPU::op_set_n_r<7, L>;
515
opcode_table_cb[0xfe] = &CPU::op_set_n_hl<7>;
516
opcode_table_cb[0xff] = &CPU::op_set_n_r<7, A>;
517
}
518
519
#endif
520
521