Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
folium-app
GitHub Repository: folium-app/Folium
Path: blob/a-new-beginning/Cherry/Core/Processor.cpp
2 views
1
/*
2
* Gearcoleco - ColecoVision Emulator
3
* Copyright (C) 2021 Ignacio Sanchez
4
5
* This program is free software: you can redistribute it and/or modify
6
* it under the terms of the GNU General Public License as published by
7
* the Free Software Foundation, either version 3 of the License, or
8
* any later version.
9
10
* This program is distributed in the hope that it will be useful,
11
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
* GNU General Public License for more details.
14
15
* You should have received a copy of the GNU General Public License
16
* along with this program. If not, see http://www.gnu.org/licenses/
17
*
18
*/
19
20
#include <algorithm>
21
#include <ctype.h>
22
#include "Processor.h"
23
#include "opcode_timing.h"
24
#include "opcode_names.h"
25
#include "IOPorts.h"
26
27
Processor::Processor(CVMemory* pMemory)
28
{
29
m_pMemory = pMemory;
30
m_pMemory->SetProcessor(this);
31
InitPointer(m_pIOPorts);
32
InitOPCodeFunctors();
33
m_bIFF1 = false;
34
m_bIFF2 = false;
35
m_bHalt = false;
36
m_bBranchTaken = false;
37
m_iTStates = 0;
38
m_iInjectedTStates = 0;
39
m_bAfterEI = false;
40
m_iInterruptMode = 0;
41
m_bINTRequested = false;
42
m_bNMIRequested = false;
43
m_bPrefixedCBOpcode = false;
44
m_PrefixedCBValue = 0;
45
m_bInputLastCycle = false;
46
m_bBreakpointHit = false;
47
m_bRequestMemBreakpoint = false;
48
49
m_ProcessorState.AF = &AF;
50
m_ProcessorState.BC = &BC;
51
m_ProcessorState.DE = &DE;
52
m_ProcessorState.HL = &HL;
53
m_ProcessorState.AF2 = &AF2;
54
m_ProcessorState.BC2 = &BC2;
55
m_ProcessorState.DE2 = &DE2;
56
m_ProcessorState.HL2 = &HL2;
57
m_ProcessorState.IX = &IX;
58
m_ProcessorState.IY = &IY;
59
m_ProcessorState.SP = &SP;
60
m_ProcessorState.PC = &PC;
61
m_ProcessorState.WZ = &WZ;
62
m_ProcessorState.I = &I;
63
m_ProcessorState.R = &R;
64
m_ProcessorState.IFF1 = &m_bIFF1;
65
m_ProcessorState.IFF2 = &m_bIFF2;
66
m_ProcessorState.Halt = &m_bHalt;
67
m_ProcessorState.NMI = &m_bNMIRequested;
68
m_ProcessorState.INT = &m_bINTRequested;
69
}
70
71
Processor::~Processor()
72
{
73
}
74
75
void Processor::Init()
76
{
77
Reset();
78
}
79
80
void Processor::Reset()
81
{
82
m_bIFF1 = false;
83
m_bIFF2 = false;
84
m_bHalt = false;
85
m_bBranchTaken = false;
86
m_iTStates = 0;
87
m_iInjectedTStates = 0;
88
m_bAfterEI = false;
89
m_iInterruptMode = 1;
90
PC.SetValue(0x0000);
91
SP.SetValue(0xDFF0);
92
IX.SetValue(0xFFFF);
93
IY.SetValue(0xFFFF);
94
AF.SetValue(0x0040); // Zero flag set
95
BC.SetValue(0x0000);
96
DE.SetValue(0x0000);
97
HL.SetValue(0x0000);
98
AF2.SetValue(0x0000);
99
BC2.SetValue(0x0000);
100
DE2.SetValue(0x0000);
101
HL2.SetValue(0x0000);
102
WZ.SetValue(0x0000);
103
I = 0x00;
104
R = 0x00;
105
m_bINTRequested = false;
106
m_bNMIRequested = false;
107
m_bPrefixedCBOpcode = false;
108
m_PrefixedCBValue = 0;
109
m_bInputLastCycle = false;
110
m_bBreakpointHit = false;
111
m_bRequestMemBreakpoint = false;
112
}
113
114
void Processor::SetIOPOrts(IOPorts* pIOPorts)
115
{
116
m_pIOPorts = pIOPorts;
117
}
118
119
IOPorts* Processor::GetIOPOrts()
120
{
121
return m_pIOPorts;
122
}
123
124
unsigned int Processor::RunFor(unsigned int tstates)
125
{
126
unsigned int executed = 0;
127
128
while (executed < tstates)
129
{
130
m_iTStates = 0;
131
m_bBreakpointHit = false;
132
m_bRequestMemBreakpoint = false;
133
134
if (!m_bInputLastCycle)
135
{
136
if (m_bNMIRequested)
137
{
138
LeaveHalt();
139
m_bNMIRequested = false;
140
m_bIFF1 = false;
141
StackPush(&PC);
142
PC.SetValue(0x0066);
143
m_iTStates += 11;
144
IncreaseR();
145
WZ.SetValue(PC.GetValue());
146
DisassembleNextOpcode();
147
return m_iTStates;
148
}
149
else if (m_bIFF1 && m_bINTRequested && !m_bAfterEI)
150
{
151
LeaveHalt();
152
m_bINTRequested = false;
153
m_bIFF1 = false;
154
m_bIFF2 = false;
155
StackPush(&PC);
156
PC.SetValue(0x0038);
157
m_iTStates += 13;
158
IncreaseR();
159
WZ.SetValue(PC.GetValue());
160
DisassembleNextOpcode();
161
return m_iTStates;
162
}
163
164
m_bAfterEI = false;
165
}
166
167
ExecuteOPCode();
168
DisassembleNextOpcode();
169
170
executed += m_iTStates;
171
172
if (m_iInjectedTStates > 0)
173
{
174
executed += m_iInjectedTStates;
175
m_iInjectedTStates = 0;
176
}
177
}
178
179
return executed;
180
}
181
182
void Processor::InjectTStates(unsigned int tstates)
183
{
184
m_iInjectedTStates += tstates;
185
}
186
187
void Processor::RequestINT(bool assert)
188
{
189
m_bINTRequested = assert;
190
}
191
192
void Processor::RequestNMI()
193
{
194
m_bNMIRequested = true;
195
}
196
197
void Processor::ExecuteOPCode()
198
{
199
u8 opcode = FetchOPCode();
200
201
switch (opcode)
202
{
203
case 0xDD:
204
case 0xFD:
205
{
206
int more_prefixes = false;
207
while ((opcode == 0xDD) || (opcode == 0xFD))
208
{
209
m_CurrentPrefix = opcode;
210
opcode = FetchOPCode();
211
if (more_prefixes)
212
m_iTStates += 4;
213
more_prefixes = true;
214
IncreaseR();
215
}
216
break;
217
}
218
default:
219
{
220
m_CurrentPrefix = 0x00;
221
break;
222
}
223
}
224
225
switch (opcode)
226
{
227
case 0xCB:
228
{
229
IncreaseR();
230
231
if (IsPrefixedInstruction())
232
{
233
m_bPrefixedCBOpcode = true;
234
m_PrefixedCBValue = m_pMemory->Read(PC.GetValue());
235
PC.Increment();
236
}
237
else
238
IncreaseR();
239
240
opcode = FetchOPCode();
241
242
(this->*m_OPCodesCB[opcode])();
243
244
if (IsPrefixedInstruction())
245
{
246
m_iTStates += kOPCodeXYCBTStates[opcode];
247
m_bPrefixedCBOpcode = false;
248
}
249
else
250
m_iTStates += kOPCodeCBTStates[opcode];
251
252
break;
253
}
254
case 0xED:
255
{
256
IncreaseR();
257
IncreaseR();
258
259
m_CurrentPrefix = 0x00;
260
opcode = FetchOPCode();
261
262
(this->*m_OPCodesED[opcode])();
263
264
m_iTStates += kOPCodeEDTStates[opcode];
265
break;
266
}
267
default:
268
{
269
if (!m_bInputLastCycle)
270
IncreaseR();
271
272
(this->*m_OPCodes[opcode])();
273
274
if (IsPrefixedInstruction())
275
m_iTStates += kOPCodeXYTStates[opcode];
276
else
277
m_iTStates += kOPCodeTStates[opcode];
278
279
if (m_bBranchTaken)
280
{
281
m_bBranchTaken = false;
282
m_iTStates += kOPCodeTStatesBranched[opcode];
283
}
284
break;
285
}
286
}
287
}
288
289
void Processor::InvalidOPCode()
290
{
291
#ifdef DEBUG_GEARCOLECO
292
u16 opcode_address = PC.GetValue() - 1;
293
u16 prefix_address = PC.GetValue() - 2;
294
u8 opcode = m_pMemory->Read(opcode_address);
295
u8 prefix = m_pMemory->Read(prefix_address);
296
297
switch (prefix)
298
{
299
case 0xCB:
300
{
301
Debug("--> ** INVALID CB OP Code (%X) at $%.4X -- %s", opcode, opcode_address, kOPCodeCBNames[opcode]);
302
break;
303
}
304
case 0xED:
305
{
306
Debug("--> ** INVALID ED OP Code (%X) at $%.4X -- %s", opcode, opcode_address, kOPCodeEDNames[opcode]);
307
break;
308
}
309
default:
310
{
311
Debug("--> ** INVALID OP Code (%X) at $%.4X -- %s", opcode, opcode_address, kOPCodeNames[opcode]);
312
}
313
}
314
#endif
315
}
316
317
void Processor::UndocumentedOPCode()
318
{
319
#ifdef DEBUG_GEARCOLECO
320
u16 opcode_address = PC.GetValue() - 1;
321
u8 opcode = m_pMemory->Read(opcode_address);
322
323
Debug("--> ** UNDOCUMENTED OP Code (%X) at $%.4X -- %s", opcode, opcode_address, kOPCodeNames[opcode]);
324
#endif
325
}
326
327
void Processor::DisassembleNextOpcode()
328
{
329
#ifndef GEARCOLECO_DISABLE_DISASSEMBLER
330
if (Disassemble(PC.GetValue()) || m_bRequestMemBreakpoint)
331
m_bBreakpointHit = true;
332
#endif
333
}
334
335
bool Processor::Disassemble(u16 address)
336
{
337
CVMemory::stDisassembleRecord* record = m_pMemory->GetDisassembleRecord(address, true);
338
339
if (!IsValidPointer(record))
340
{
341
return false;
342
}
343
344
u8 opcodes[6];
345
bool changed = false;
346
int maxSize = std::min(record->size, 4);
347
348
for (int i = 0; i < maxSize; i++)
349
{
350
opcodes[i] = m_pMemory->Read(address + i);
351
352
if (opcodes[i] != record->opcodes[i])
353
changed = true;
354
}
355
356
if ((record->size == 0) || changed)
357
{
358
record->address = address;
359
360
std::vector<u8> bytes;
361
u16 opcode_temp_addr = address;
362
u8 opcode_temp = m_pMemory->Read(opcode_temp_addr);
363
u8 ddfd_mod = 0;
364
int first = 0;
365
366
while ((opcode_temp == 0xDD) || (opcode_temp == 0xFD))
367
{
368
ddfd_mod = opcode_temp;
369
bytes.push_back(opcode_temp);
370
opcode_temp_addr++;
371
first++;
372
opcode_temp = m_pMemory->Read(opcode_temp_addr);
373
}
374
375
for (int i = 0; i < 5; i++)
376
bytes.push_back(m_pMemory->Read(opcode_temp_addr + i));
377
378
u8 opcode = bytes[first];
379
stOPCodeInfo info;
380
381
bool prefixed = false;
382
383
if (opcode == 0xCB)
384
{
385
prefixed = true;
386
if (ddfd_mod == 0xDD)
387
{
388
opcode = bytes[first + 2];
389
info = kOPCodeDDCBNames[opcode];
390
}
391
else if (ddfd_mod == 0xFD)
392
{
393
opcode = bytes[first + 2];
394
info = kOPCodeFDCBNames[opcode];
395
}
396
else
397
{
398
opcode = bytes[first + 1];
399
info = kOPCodeCBNames[opcode];
400
}
401
}
402
else if (opcode == 0xED)
403
{
404
prefixed = true;
405
opcode = bytes[first + 1];
406
info = kOPCodeEDNames[opcode];
407
}
408
else
409
{
410
if (ddfd_mod == 0xDD)
411
info = kOPCodeDDNames[opcode];
412
else if (ddfd_mod == 0xFD)
413
info = kOPCodeFDNames[opcode];
414
else
415
info = kOPCodeNames[opcode];
416
}
417
418
record->size = info.size + (first > 1 ? (first - 1) : 0);
419
record->bytes[0] = 0;
420
421
for (int i = 0; i < (int)bytes.size(); i++)
422
{
423
if (i < record->size)
424
{
425
char value[8];
426
snprintf(value, sizeof(value), "%02X", bytes[i]);
427
strcat(record->bytes, value);
428
strcat(record->bytes, " ");
429
}
430
else if (i < 4)
431
{
432
strcat(record->bytes, " ");
433
}
434
435
if (i < 4)
436
record->opcodes[i] = bytes[i];
437
}
438
439
first += prefixed ? 1 : 0;
440
441
switch (info.type)
442
{
443
case 0:
444
strcpy(record->name, info.name);
445
break;
446
case 1:
447
snprintf(record->name, sizeof(record->name), info.name, bytes[first]);
448
break;
449
case 2:
450
snprintf(record->name, sizeof(record->name), info.name, bytes[first + 1]);
451
break;
452
case 3:
453
record->jump = true;
454
record->jump_address = (bytes[first + 2] << 8) | bytes[first + 1];
455
snprintf(record->name, sizeof(record->name), info.name, record->jump_address);
456
break;
457
case 4:
458
snprintf(record->name, sizeof(record->name), info.name, (s8)bytes[first + 1]);
459
break;
460
case 5:
461
record->jump = true;
462
record->jump_address = address + info.size + (s8)bytes[first + 1];
463
snprintf(record->name, sizeof(record->name), info.name, record->jump_address, (s8)bytes[first + 1]);
464
break;
465
case 6:
466
snprintf(record->name, sizeof(record->name), info.name, (s8)bytes[first + 1], bytes[first + 2]);
467
break;
468
default:
469
strcpy(record->name, "PARSE ERROR");
470
}
471
}
472
473
CVMemory::stDisassembleRecord* runtobreakpoint = m_pMemory->GetRunToBreakpoint();
474
std::vector<CVMemory::stDisassembleRecord*>* breakpoints = m_pMemory->GetBreakpointsCPU();
475
476
if (IsValidPointer(runtobreakpoint))
477
{
478
if (runtobreakpoint == record)
479
{
480
m_pMemory->SetRunToBreakpoint(NULL);
481
return true;
482
}
483
else
484
return false;
485
}
486
else
487
{
488
size_t size = breakpoints->size();
489
490
for (size_t b = 0; b < size; b++)
491
{
492
if ((*breakpoints)[b] == record)
493
{
494
return true;
495
}
496
}
497
}
498
499
return false;
500
}
501
502
bool Processor::BreakpointHit()
503
{
504
return m_bBreakpointHit;
505
}
506
507
bool Processor::Halted()
508
{
509
return m_bHalt;
510
}
511
512
bool Processor::DuringInputOpcode()
513
{
514
return m_bInputLastCycle;
515
}
516
517
void Processor::RequestMemoryBreakpoint()
518
{
519
m_bRequestMemBreakpoint = true;
520
}
521
522
void Processor::SaveState(std::ostream& stream)
523
{
524
using namespace std;
525
526
u16 af = AF.GetValue();
527
u16 bc = BC.GetValue();
528
u16 de = DE.GetValue();
529
u16 hl = HL.GetValue();
530
u16 af2 = AF2.GetValue();
531
u16 bc2 = BC2.GetValue();
532
u16 de2 = DE2.GetValue();
533
u16 hl2 = HL2.GetValue();
534
u16 sp = SP.GetValue();
535
u16 pc = PC.GetValue();
536
u16 ix = IX.GetValue();
537
u16 iy = IY.GetValue();
538
u16 wz = WZ.GetValue();
539
u8 i = I;
540
u8 r = R;
541
542
stream.write(reinterpret_cast<const char*> (&af), sizeof(af));
543
stream.write(reinterpret_cast<const char*> (&bc), sizeof(bc));
544
stream.write(reinterpret_cast<const char*> (&de), sizeof(de));
545
stream.write(reinterpret_cast<const char*> (&hl), sizeof(hl));
546
stream.write(reinterpret_cast<const char*> (&af2), sizeof(af2));
547
stream.write(reinterpret_cast<const char*> (&bc2), sizeof(bc2));
548
stream.write(reinterpret_cast<const char*> (&de2), sizeof(de2));
549
stream.write(reinterpret_cast<const char*> (&hl2), sizeof(hl2));
550
stream.write(reinterpret_cast<const char*> (&sp), sizeof(sp));
551
stream.write(reinterpret_cast<const char*> (&pc), sizeof(pc));
552
stream.write(reinterpret_cast<const char*> (&ix), sizeof(ix));
553
stream.write(reinterpret_cast<const char*> (&iy), sizeof(iy));
554
stream.write(reinterpret_cast<const char*> (&wz), sizeof(wz));
555
stream.write(reinterpret_cast<const char*> (&i), sizeof(i));
556
stream.write(reinterpret_cast<const char*> (&r), sizeof(r));
557
558
stream.write(reinterpret_cast<const char*> (&m_bIFF1), sizeof(m_bIFF1));
559
stream.write(reinterpret_cast<const char*> (&m_bIFF2), sizeof(m_bIFF2));
560
stream.write(reinterpret_cast<const char*> (&m_bHalt), sizeof(m_bHalt));
561
stream.write(reinterpret_cast<const char*> (&m_bBranchTaken), sizeof(m_bBranchTaken));
562
stream.write(reinterpret_cast<const char*> (&m_iTStates), sizeof(m_iTStates));
563
stream.write(reinterpret_cast<const char*> (&m_iInjectedTStates), sizeof(m_iInjectedTStates));
564
stream.write(reinterpret_cast<const char*> (&m_bAfterEI), sizeof(m_bAfterEI));
565
stream.write(reinterpret_cast<const char*> (&m_iInterruptMode), sizeof(m_iInterruptMode));
566
stream.write(reinterpret_cast<const char*> (&m_CurrentPrefix), sizeof(m_CurrentPrefix));
567
stream.write(reinterpret_cast<const char*> (&m_bINTRequested), sizeof(m_bINTRequested));
568
stream.write(reinterpret_cast<const char*> (&m_bNMIRequested), sizeof(m_bNMIRequested));
569
stream.write(reinterpret_cast<const char*> (&m_bPrefixedCBOpcode), sizeof(m_bPrefixedCBOpcode));
570
stream.write(reinterpret_cast<const char*> (&m_PrefixedCBValue), sizeof(m_PrefixedCBValue));
571
stream.write(reinterpret_cast<const char*> (&m_bInputLastCycle), sizeof(m_bInputLastCycle));
572
}
573
574
void Processor::LoadState(std::istream& stream)
575
{
576
using namespace std;
577
578
u16 af, bc, de, hl, af2, bc2, de2, hl2, sp, pc, ix, iy, wz;
579
u8 i, r;
580
581
stream.read(reinterpret_cast<char*> (&af), sizeof(af));
582
stream.read(reinterpret_cast<char*> (&bc), sizeof(bc));
583
stream.read(reinterpret_cast<char*> (&de), sizeof(de));
584
stream.read(reinterpret_cast<char*> (&hl), sizeof(hl));
585
stream.read(reinterpret_cast<char*> (&af2), sizeof(af2));
586
stream.read(reinterpret_cast<char*> (&bc2), sizeof(bc2));
587
stream.read(reinterpret_cast<char*> (&de2), sizeof(de2));
588
stream.read(reinterpret_cast<char*> (&hl2), sizeof(hl2));
589
stream.read(reinterpret_cast<char*> (&sp), sizeof(sp));
590
stream.read(reinterpret_cast<char*> (&pc), sizeof(pc));
591
stream.read(reinterpret_cast<char*> (&ix), sizeof(ix));
592
stream.read(reinterpret_cast<char*> (&iy), sizeof(iy));
593
stream.read(reinterpret_cast<char*> (&wz), sizeof(wz));
594
stream.read(reinterpret_cast<char*> (&i), sizeof(i));
595
stream.read(reinterpret_cast<char*> (&r), sizeof(r));
596
597
AF.SetValue(af);
598
BC.SetValue(bc);
599
DE.SetValue(de);
600
HL.SetValue(hl);
601
AF2.SetValue(af2);
602
BC2.SetValue(bc2);
603
DE2.SetValue(de2);
604
HL2.SetValue(hl2);
605
SP.SetValue(sp);
606
PC.SetValue(pc);
607
IX.SetValue(ix);
608
IY.SetValue(iy);
609
WZ.SetValue(wz);
610
I = i;
611
R = r;
612
613
stream.read(reinterpret_cast<char*> (&m_bIFF1), sizeof(m_bIFF1));
614
stream.read(reinterpret_cast<char*> (&m_bIFF2), sizeof(m_bIFF2));
615
stream.read(reinterpret_cast<char*> (&m_bHalt), sizeof(m_bHalt));
616
stream.read(reinterpret_cast<char*> (&m_bBranchTaken), sizeof(m_bBranchTaken));
617
stream.read(reinterpret_cast<char*> (&m_iTStates), sizeof(m_iTStates));
618
stream.read(reinterpret_cast<char*> (&m_iInjectedTStates), sizeof(m_iInjectedTStates));
619
stream.read(reinterpret_cast<char*> (&m_bAfterEI), sizeof(m_bAfterEI));
620
stream.read(reinterpret_cast<char*> (&m_iInterruptMode), sizeof(m_iInterruptMode));
621
stream.read(reinterpret_cast<char*> (&m_CurrentPrefix), sizeof(m_CurrentPrefix));
622
stream.read(reinterpret_cast<char*> (&m_bINTRequested), sizeof(m_bINTRequested));
623
stream.read(reinterpret_cast<char*> (&m_bNMIRequested), sizeof(m_bNMIRequested));
624
stream.read(reinterpret_cast<char*> (&m_bPrefixedCBOpcode), sizeof(m_bPrefixedCBOpcode));
625
stream.read(reinterpret_cast<char*> (&m_PrefixedCBValue), sizeof(m_PrefixedCBValue));
626
stream.read(reinterpret_cast<char*> (&m_bInputLastCycle), sizeof(m_bInputLastCycle));
627
}
628
629
Processor::ProcessorState* Processor::GetState()
630
{
631
return &m_ProcessorState;
632
}
633
634
void Processor::InitOPCodeFunctors()
635
{
636
m_OPCodes[0x00] = &Processor::OPCode0x00;
637
m_OPCodes[0x01] = &Processor::OPCode0x01;
638
m_OPCodes[0x02] = &Processor::OPCode0x02;
639
m_OPCodes[0x03] = &Processor::OPCode0x03;
640
m_OPCodes[0x04] = &Processor::OPCode0x04;
641
m_OPCodes[0x05] = &Processor::OPCode0x05;
642
m_OPCodes[0x06] = &Processor::OPCode0x06;
643
m_OPCodes[0x07] = &Processor::OPCode0x07;
644
m_OPCodes[0x08] = &Processor::OPCode0x08;
645
m_OPCodes[0x09] = &Processor::OPCode0x09;
646
m_OPCodes[0x0A] = &Processor::OPCode0x0A;
647
m_OPCodes[0x0B] = &Processor::OPCode0x0B;
648
m_OPCodes[0x0C] = &Processor::OPCode0x0C;
649
m_OPCodes[0x0D] = &Processor::OPCode0x0D;
650
m_OPCodes[0x0E] = &Processor::OPCode0x0E;
651
m_OPCodes[0x0F] = &Processor::OPCode0x0F;
652
653
m_OPCodes[0x10] = &Processor::OPCode0x10;
654
m_OPCodes[0x11] = &Processor::OPCode0x11;
655
m_OPCodes[0x12] = &Processor::OPCode0x12;
656
m_OPCodes[0x13] = &Processor::OPCode0x13;
657
m_OPCodes[0x14] = &Processor::OPCode0x14;
658
m_OPCodes[0x15] = &Processor::OPCode0x15;
659
m_OPCodes[0x16] = &Processor::OPCode0x16;
660
m_OPCodes[0x17] = &Processor::OPCode0x17;
661
m_OPCodes[0x18] = &Processor::OPCode0x18;
662
m_OPCodes[0x19] = &Processor::OPCode0x19;
663
m_OPCodes[0x1A] = &Processor::OPCode0x1A;
664
m_OPCodes[0x1B] = &Processor::OPCode0x1B;
665
m_OPCodes[0x1C] = &Processor::OPCode0x1C;
666
m_OPCodes[0x1D] = &Processor::OPCode0x1D;
667
m_OPCodes[0x1E] = &Processor::OPCode0x1E;
668
m_OPCodes[0x1F] = &Processor::OPCode0x1F;
669
670
m_OPCodes[0x20] = &Processor::OPCode0x20;
671
m_OPCodes[0x21] = &Processor::OPCode0x21;
672
m_OPCodes[0x22] = &Processor::OPCode0x22;
673
m_OPCodes[0x23] = &Processor::OPCode0x23;
674
m_OPCodes[0x24] = &Processor::OPCode0x24;
675
m_OPCodes[0x25] = &Processor::OPCode0x25;
676
m_OPCodes[0x26] = &Processor::OPCode0x26;
677
m_OPCodes[0x27] = &Processor::OPCode0x27;
678
m_OPCodes[0x28] = &Processor::OPCode0x28;
679
m_OPCodes[0x29] = &Processor::OPCode0x29;
680
m_OPCodes[0x2A] = &Processor::OPCode0x2A;
681
m_OPCodes[0x2B] = &Processor::OPCode0x2B;
682
m_OPCodes[0x2C] = &Processor::OPCode0x2C;
683
m_OPCodes[0x2D] = &Processor::OPCode0x2D;
684
m_OPCodes[0x2E] = &Processor::OPCode0x2E;
685
m_OPCodes[0x2F] = &Processor::OPCode0x2F;
686
687
m_OPCodes[0x30] = &Processor::OPCode0x30;
688
m_OPCodes[0x31] = &Processor::OPCode0x31;
689
m_OPCodes[0x32] = &Processor::OPCode0x32;
690
m_OPCodes[0x33] = &Processor::OPCode0x33;
691
m_OPCodes[0x34] = &Processor::OPCode0x34;
692
m_OPCodes[0x35] = &Processor::OPCode0x35;
693
m_OPCodes[0x36] = &Processor::OPCode0x36;
694
m_OPCodes[0x37] = &Processor::OPCode0x37;
695
m_OPCodes[0x38] = &Processor::OPCode0x38;
696
m_OPCodes[0x39] = &Processor::OPCode0x39;
697
m_OPCodes[0x3A] = &Processor::OPCode0x3A;
698
m_OPCodes[0x3B] = &Processor::OPCode0x3B;
699
m_OPCodes[0x3C] = &Processor::OPCode0x3C;
700
m_OPCodes[0x3D] = &Processor::OPCode0x3D;
701
m_OPCodes[0x3E] = &Processor::OPCode0x3E;
702
m_OPCodes[0x3F] = &Processor::OPCode0x3F;
703
704
m_OPCodes[0x40] = &Processor::OPCode0x40;
705
m_OPCodes[0x41] = &Processor::OPCode0x41;
706
m_OPCodes[0x42] = &Processor::OPCode0x42;
707
m_OPCodes[0x43] = &Processor::OPCode0x43;
708
m_OPCodes[0x44] = &Processor::OPCode0x44;
709
m_OPCodes[0x45] = &Processor::OPCode0x45;
710
m_OPCodes[0x46] = &Processor::OPCode0x46;
711
m_OPCodes[0x47] = &Processor::OPCode0x47;
712
m_OPCodes[0x48] = &Processor::OPCode0x48;
713
m_OPCodes[0x49] = &Processor::OPCode0x49;
714
m_OPCodes[0x4A] = &Processor::OPCode0x4A;
715
m_OPCodes[0x4B] = &Processor::OPCode0x4B;
716
m_OPCodes[0x4C] = &Processor::OPCode0x4C;
717
m_OPCodes[0x4D] = &Processor::OPCode0x4D;
718
m_OPCodes[0x4E] = &Processor::OPCode0x4E;
719
m_OPCodes[0x4F] = &Processor::OPCode0x4F;
720
721
m_OPCodes[0x50] = &Processor::OPCode0x50;
722
m_OPCodes[0x51] = &Processor::OPCode0x51;
723
m_OPCodes[0x52] = &Processor::OPCode0x52;
724
m_OPCodes[0x53] = &Processor::OPCode0x53;
725
m_OPCodes[0x54] = &Processor::OPCode0x54;
726
m_OPCodes[0x55] = &Processor::OPCode0x55;
727
m_OPCodes[0x56] = &Processor::OPCode0x56;
728
m_OPCodes[0x57] = &Processor::OPCode0x57;
729
m_OPCodes[0x58] = &Processor::OPCode0x58;
730
m_OPCodes[0x59] = &Processor::OPCode0x59;
731
m_OPCodes[0x5A] = &Processor::OPCode0x5A;
732
m_OPCodes[0x5B] = &Processor::OPCode0x5B;
733
m_OPCodes[0x5C] = &Processor::OPCode0x5C;
734
m_OPCodes[0x5D] = &Processor::OPCode0x5D;
735
m_OPCodes[0x5E] = &Processor::OPCode0x5E;
736
m_OPCodes[0x5F] = &Processor::OPCode0x5F;
737
738
m_OPCodes[0x60] = &Processor::OPCode0x60;
739
m_OPCodes[0x61] = &Processor::OPCode0x61;
740
m_OPCodes[0x62] = &Processor::OPCode0x62;
741
m_OPCodes[0x63] = &Processor::OPCode0x63;
742
m_OPCodes[0x64] = &Processor::OPCode0x64;
743
m_OPCodes[0x65] = &Processor::OPCode0x65;
744
m_OPCodes[0x66] = &Processor::OPCode0x66;
745
m_OPCodes[0x67] = &Processor::OPCode0x67;
746
m_OPCodes[0x68] = &Processor::OPCode0x68;
747
m_OPCodes[0x69] = &Processor::OPCode0x69;
748
m_OPCodes[0x6A] = &Processor::OPCode0x6A;
749
m_OPCodes[0x6B] = &Processor::OPCode0x6B;
750
m_OPCodes[0x6C] = &Processor::OPCode0x6C;
751
m_OPCodes[0x6D] = &Processor::OPCode0x6D;
752
m_OPCodes[0x6E] = &Processor::OPCode0x6E;
753
m_OPCodes[0x6F] = &Processor::OPCode0x6F;
754
755
m_OPCodes[0x70] = &Processor::OPCode0x70;
756
m_OPCodes[0x71] = &Processor::OPCode0x71;
757
m_OPCodes[0x72] = &Processor::OPCode0x72;
758
m_OPCodes[0x73] = &Processor::OPCode0x73;
759
m_OPCodes[0x74] = &Processor::OPCode0x74;
760
m_OPCodes[0x75] = &Processor::OPCode0x75;
761
m_OPCodes[0x76] = &Processor::OPCode0x76;
762
m_OPCodes[0x77] = &Processor::OPCode0x77;
763
m_OPCodes[0x78] = &Processor::OPCode0x78;
764
m_OPCodes[0x79] = &Processor::OPCode0x79;
765
m_OPCodes[0x7A] = &Processor::OPCode0x7A;
766
m_OPCodes[0x7B] = &Processor::OPCode0x7B;
767
m_OPCodes[0x7C] = &Processor::OPCode0x7C;
768
m_OPCodes[0x7D] = &Processor::OPCode0x7D;
769
m_OPCodes[0x7E] = &Processor::OPCode0x7E;
770
m_OPCodes[0x7F] = &Processor::OPCode0x7F;
771
772
m_OPCodes[0x80] = &Processor::OPCode0x80;
773
m_OPCodes[0x81] = &Processor::OPCode0x81;
774
m_OPCodes[0x82] = &Processor::OPCode0x82;
775
m_OPCodes[0x83] = &Processor::OPCode0x83;
776
m_OPCodes[0x84] = &Processor::OPCode0x84;
777
m_OPCodes[0x85] = &Processor::OPCode0x85;
778
m_OPCodes[0x86] = &Processor::OPCode0x86;
779
m_OPCodes[0x87] = &Processor::OPCode0x87;
780
m_OPCodes[0x88] = &Processor::OPCode0x88;
781
m_OPCodes[0x89] = &Processor::OPCode0x89;
782
m_OPCodes[0x8A] = &Processor::OPCode0x8A;
783
m_OPCodes[0x8B] = &Processor::OPCode0x8B;
784
m_OPCodes[0x8C] = &Processor::OPCode0x8C;
785
m_OPCodes[0x8D] = &Processor::OPCode0x8D;
786
m_OPCodes[0x8E] = &Processor::OPCode0x8E;
787
m_OPCodes[0x8F] = &Processor::OPCode0x8F;
788
789
m_OPCodes[0x90] = &Processor::OPCode0x90;
790
m_OPCodes[0x91] = &Processor::OPCode0x91;
791
m_OPCodes[0x92] = &Processor::OPCode0x92;
792
m_OPCodes[0x93] = &Processor::OPCode0x93;
793
m_OPCodes[0x94] = &Processor::OPCode0x94;
794
m_OPCodes[0x95] = &Processor::OPCode0x95;
795
m_OPCodes[0x96] = &Processor::OPCode0x96;
796
m_OPCodes[0x97] = &Processor::OPCode0x97;
797
m_OPCodes[0x98] = &Processor::OPCode0x98;
798
m_OPCodes[0x99] = &Processor::OPCode0x99;
799
m_OPCodes[0x9A] = &Processor::OPCode0x9A;
800
m_OPCodes[0x9B] = &Processor::OPCode0x9B;
801
m_OPCodes[0x9C] = &Processor::OPCode0x9C;
802
m_OPCodes[0x9D] = &Processor::OPCode0x9D;
803
m_OPCodes[0x9E] = &Processor::OPCode0x9E;
804
m_OPCodes[0x9F] = &Processor::OPCode0x9F;
805
806
m_OPCodes[0xA0] = &Processor::OPCode0xA0;
807
m_OPCodes[0xA1] = &Processor::OPCode0xA1;
808
m_OPCodes[0xA2] = &Processor::OPCode0xA2;
809
m_OPCodes[0xA3] = &Processor::OPCode0xA3;
810
m_OPCodes[0xA4] = &Processor::OPCode0xA4;
811
m_OPCodes[0xA5] = &Processor::OPCode0xA5;
812
m_OPCodes[0xA6] = &Processor::OPCode0xA6;
813
m_OPCodes[0xA7] = &Processor::OPCode0xA7;
814
m_OPCodes[0xA8] = &Processor::OPCode0xA8;
815
m_OPCodes[0xA9] = &Processor::OPCode0xA9;
816
m_OPCodes[0xAA] = &Processor::OPCode0xAA;
817
m_OPCodes[0xAB] = &Processor::OPCode0xAB;
818
m_OPCodes[0xAC] = &Processor::OPCode0xAC;
819
m_OPCodes[0xAD] = &Processor::OPCode0xAD;
820
m_OPCodes[0xAE] = &Processor::OPCode0xAE;
821
m_OPCodes[0xAF] = &Processor::OPCode0xAF;
822
823
m_OPCodes[0xB0] = &Processor::OPCode0xB0;
824
m_OPCodes[0xB1] = &Processor::OPCode0xB1;
825
m_OPCodes[0xB2] = &Processor::OPCode0xB2;
826
m_OPCodes[0xB3] = &Processor::OPCode0xB3;
827
m_OPCodes[0xB4] = &Processor::OPCode0xB4;
828
m_OPCodes[0xB5] = &Processor::OPCode0xB5;
829
m_OPCodes[0xB6] = &Processor::OPCode0xB6;
830
m_OPCodes[0xB7] = &Processor::OPCode0xB7;
831
m_OPCodes[0xB8] = &Processor::OPCode0xB8;
832
m_OPCodes[0xB9] = &Processor::OPCode0xB9;
833
m_OPCodes[0xBA] = &Processor::OPCode0xBA;
834
m_OPCodes[0xBB] = &Processor::OPCode0xBB;
835
m_OPCodes[0xBC] = &Processor::OPCode0xBC;
836
m_OPCodes[0xBD] = &Processor::OPCode0xBD;
837
m_OPCodes[0xBE] = &Processor::OPCode0xBE;
838
m_OPCodes[0xBF] = &Processor::OPCode0xBF;
839
840
m_OPCodes[0xC0] = &Processor::OPCode0xC0;
841
m_OPCodes[0xC1] = &Processor::OPCode0xC1;
842
m_OPCodes[0xC2] = &Processor::OPCode0xC2;
843
m_OPCodes[0xC3] = &Processor::OPCode0xC3;
844
m_OPCodes[0xC4] = &Processor::OPCode0xC4;
845
m_OPCodes[0xC5] = &Processor::OPCode0xC5;
846
m_OPCodes[0xC6] = &Processor::OPCode0xC6;
847
m_OPCodes[0xC7] = &Processor::OPCode0xC7;
848
m_OPCodes[0xC8] = &Processor::OPCode0xC8;
849
m_OPCodes[0xC9] = &Processor::OPCode0xC9;
850
m_OPCodes[0xCA] = &Processor::OPCode0xCA;
851
m_OPCodes[0xCB] = &Processor::OPCode0xCB;
852
m_OPCodes[0xCC] = &Processor::OPCode0xCC;
853
m_OPCodes[0xCD] = &Processor::OPCode0xCD;
854
m_OPCodes[0xCE] = &Processor::OPCode0xCE;
855
m_OPCodes[0xCF] = &Processor::OPCode0xCF;
856
857
m_OPCodes[0xD0] = &Processor::OPCode0xD0;
858
m_OPCodes[0xD1] = &Processor::OPCode0xD1;
859
m_OPCodes[0xD2] = &Processor::OPCode0xD2;
860
m_OPCodes[0xD3] = &Processor::OPCode0xD3;
861
m_OPCodes[0xD4] = &Processor::OPCode0xD4;
862
m_OPCodes[0xD5] = &Processor::OPCode0xD5;
863
m_OPCodes[0xD6] = &Processor::OPCode0xD6;
864
m_OPCodes[0xD7] = &Processor::OPCode0xD7;
865
m_OPCodes[0xD8] = &Processor::OPCode0xD8;
866
m_OPCodes[0xD9] = &Processor::OPCode0xD9;
867
m_OPCodes[0xDA] = &Processor::OPCode0xDA;
868
m_OPCodes[0xDB] = &Processor::OPCode0xDB;
869
m_OPCodes[0xDC] = &Processor::OPCode0xDC;
870
m_OPCodes[0xDD] = &Processor::OPCode0xDD;
871
m_OPCodes[0xDE] = &Processor::OPCode0xDE;
872
m_OPCodes[0xDF] = &Processor::OPCode0xDF;
873
874
m_OPCodes[0xE0] = &Processor::OPCode0xE0;
875
m_OPCodes[0xE1] = &Processor::OPCode0xE1;
876
m_OPCodes[0xE2] = &Processor::OPCode0xE2;
877
m_OPCodes[0xE3] = &Processor::OPCode0xE3;
878
m_OPCodes[0xE4] = &Processor::OPCode0xE4;
879
m_OPCodes[0xE5] = &Processor::OPCode0xE5;
880
m_OPCodes[0xE6] = &Processor::OPCode0xE6;
881
m_OPCodes[0xE7] = &Processor::OPCode0xE7;
882
m_OPCodes[0xE8] = &Processor::OPCode0xE8;
883
m_OPCodes[0xE9] = &Processor::OPCode0xE9;
884
m_OPCodes[0xEA] = &Processor::OPCode0xEA;
885
m_OPCodes[0xEB] = &Processor::OPCode0xEB;
886
m_OPCodes[0xEC] = &Processor::OPCode0xEC;
887
m_OPCodes[0xED] = &Processor::OPCode0xED;
888
m_OPCodes[0xEE] = &Processor::OPCode0xEE;
889
m_OPCodes[0xEF] = &Processor::OPCode0xEF;
890
891
m_OPCodes[0xF0] = &Processor::OPCode0xF0;
892
m_OPCodes[0xF1] = &Processor::OPCode0xF1;
893
m_OPCodes[0xF2] = &Processor::OPCode0xF2;
894
m_OPCodes[0xF3] = &Processor::OPCode0xF3;
895
m_OPCodes[0xF4] = &Processor::OPCode0xF4;
896
m_OPCodes[0xF5] = &Processor::OPCode0xF5;
897
m_OPCodes[0xF6] = &Processor::OPCode0xF6;
898
m_OPCodes[0xF7] = &Processor::OPCode0xF7;
899
m_OPCodes[0xF8] = &Processor::OPCode0xF8;
900
m_OPCodes[0xF9] = &Processor::OPCode0xF9;
901
m_OPCodes[0xFA] = &Processor::OPCode0xFA;
902
m_OPCodes[0xFB] = &Processor::OPCode0xFB;
903
m_OPCodes[0xFC] = &Processor::OPCode0xFC;
904
m_OPCodes[0xFD] = &Processor::OPCode0xFD;
905
m_OPCodes[0xFE] = &Processor::OPCode0xFE;
906
m_OPCodes[0xFF] = &Processor::OPCode0xFF;
907
908
909
m_OPCodesCB[0x00] = &Processor::OPCodeCB0x00;
910
m_OPCodesCB[0x01] = &Processor::OPCodeCB0x01;
911
m_OPCodesCB[0x02] = &Processor::OPCodeCB0x02;
912
m_OPCodesCB[0x03] = &Processor::OPCodeCB0x03;
913
m_OPCodesCB[0x04] = &Processor::OPCodeCB0x04;
914
m_OPCodesCB[0x05] = &Processor::OPCodeCB0x05;
915
m_OPCodesCB[0x06] = &Processor::OPCodeCB0x06;
916
m_OPCodesCB[0x07] = &Processor::OPCodeCB0x07;
917
m_OPCodesCB[0x08] = &Processor::OPCodeCB0x08;
918
m_OPCodesCB[0x09] = &Processor::OPCodeCB0x09;
919
m_OPCodesCB[0x0A] = &Processor::OPCodeCB0x0A;
920
m_OPCodesCB[0x0B] = &Processor::OPCodeCB0x0B;
921
m_OPCodesCB[0x0C] = &Processor::OPCodeCB0x0C;
922
m_OPCodesCB[0x0D] = &Processor::OPCodeCB0x0D;
923
m_OPCodesCB[0x0E] = &Processor::OPCodeCB0x0E;
924
m_OPCodesCB[0x0F] = &Processor::OPCodeCB0x0F;
925
926
m_OPCodesCB[0x10] = &Processor::OPCodeCB0x10;
927
m_OPCodesCB[0x11] = &Processor::OPCodeCB0x11;
928
m_OPCodesCB[0x12] = &Processor::OPCodeCB0x12;
929
m_OPCodesCB[0x13] = &Processor::OPCodeCB0x13;
930
m_OPCodesCB[0x14] = &Processor::OPCodeCB0x14;
931
m_OPCodesCB[0x15] = &Processor::OPCodeCB0x15;
932
m_OPCodesCB[0x16] = &Processor::OPCodeCB0x16;
933
m_OPCodesCB[0x17] = &Processor::OPCodeCB0x17;
934
m_OPCodesCB[0x18] = &Processor::OPCodeCB0x18;
935
m_OPCodesCB[0x19] = &Processor::OPCodeCB0x19;
936
m_OPCodesCB[0x1A] = &Processor::OPCodeCB0x1A;
937
m_OPCodesCB[0x1B] = &Processor::OPCodeCB0x1B;
938
m_OPCodesCB[0x1C] = &Processor::OPCodeCB0x1C;
939
m_OPCodesCB[0x1D] = &Processor::OPCodeCB0x1D;
940
m_OPCodesCB[0x1E] = &Processor::OPCodeCB0x1E;
941
m_OPCodesCB[0x1F] = &Processor::OPCodeCB0x1F;
942
943
m_OPCodesCB[0x20] = &Processor::OPCodeCB0x20;
944
m_OPCodesCB[0x21] = &Processor::OPCodeCB0x21;
945
m_OPCodesCB[0x22] = &Processor::OPCodeCB0x22;
946
m_OPCodesCB[0x23] = &Processor::OPCodeCB0x23;
947
m_OPCodesCB[0x24] = &Processor::OPCodeCB0x24;
948
m_OPCodesCB[0x25] = &Processor::OPCodeCB0x25;
949
m_OPCodesCB[0x26] = &Processor::OPCodeCB0x26;
950
m_OPCodesCB[0x27] = &Processor::OPCodeCB0x27;
951
m_OPCodesCB[0x28] = &Processor::OPCodeCB0x28;
952
m_OPCodesCB[0x29] = &Processor::OPCodeCB0x29;
953
m_OPCodesCB[0x2A] = &Processor::OPCodeCB0x2A;
954
m_OPCodesCB[0x2B] = &Processor::OPCodeCB0x2B;
955
m_OPCodesCB[0x2C] = &Processor::OPCodeCB0x2C;
956
m_OPCodesCB[0x2D] = &Processor::OPCodeCB0x2D;
957
m_OPCodesCB[0x2E] = &Processor::OPCodeCB0x2E;
958
m_OPCodesCB[0x2F] = &Processor::OPCodeCB0x2F;
959
960
m_OPCodesCB[0x30] = &Processor::OPCodeCB0x30;
961
m_OPCodesCB[0x31] = &Processor::OPCodeCB0x31;
962
m_OPCodesCB[0x32] = &Processor::OPCodeCB0x32;
963
m_OPCodesCB[0x33] = &Processor::OPCodeCB0x33;
964
m_OPCodesCB[0x34] = &Processor::OPCodeCB0x34;
965
m_OPCodesCB[0x35] = &Processor::OPCodeCB0x35;
966
m_OPCodesCB[0x36] = &Processor::OPCodeCB0x36;
967
m_OPCodesCB[0x37] = &Processor::OPCodeCB0x37;
968
m_OPCodesCB[0x38] = &Processor::OPCodeCB0x38;
969
m_OPCodesCB[0x39] = &Processor::OPCodeCB0x39;
970
m_OPCodesCB[0x3A] = &Processor::OPCodeCB0x3A;
971
m_OPCodesCB[0x3B] = &Processor::OPCodeCB0x3B;
972
m_OPCodesCB[0x3C] = &Processor::OPCodeCB0x3C;
973
m_OPCodesCB[0x3D] = &Processor::OPCodeCB0x3D;
974
m_OPCodesCB[0x3E] = &Processor::OPCodeCB0x3E;
975
m_OPCodesCB[0x3F] = &Processor::OPCodeCB0x3F;
976
977
m_OPCodesCB[0x40] = &Processor::OPCodeCB0x40;
978
m_OPCodesCB[0x41] = &Processor::OPCodeCB0x41;
979
m_OPCodesCB[0x42] = &Processor::OPCodeCB0x42;
980
m_OPCodesCB[0x43] = &Processor::OPCodeCB0x43;
981
m_OPCodesCB[0x44] = &Processor::OPCodeCB0x44;
982
m_OPCodesCB[0x45] = &Processor::OPCodeCB0x45;
983
m_OPCodesCB[0x46] = &Processor::OPCodeCB0x46;
984
m_OPCodesCB[0x47] = &Processor::OPCodeCB0x47;
985
m_OPCodesCB[0x48] = &Processor::OPCodeCB0x48;
986
m_OPCodesCB[0x49] = &Processor::OPCodeCB0x49;
987
m_OPCodesCB[0x4A] = &Processor::OPCodeCB0x4A;
988
m_OPCodesCB[0x4B] = &Processor::OPCodeCB0x4B;
989
m_OPCodesCB[0x4C] = &Processor::OPCodeCB0x4C;
990
m_OPCodesCB[0x4D] = &Processor::OPCodeCB0x4D;
991
m_OPCodesCB[0x4E] = &Processor::OPCodeCB0x4E;
992
m_OPCodesCB[0x4F] = &Processor::OPCodeCB0x4F;
993
994
m_OPCodesCB[0x50] = &Processor::OPCodeCB0x50;
995
m_OPCodesCB[0x51] = &Processor::OPCodeCB0x51;
996
m_OPCodesCB[0x52] = &Processor::OPCodeCB0x52;
997
m_OPCodesCB[0x53] = &Processor::OPCodeCB0x53;
998
m_OPCodesCB[0x54] = &Processor::OPCodeCB0x54;
999
m_OPCodesCB[0x55] = &Processor::OPCodeCB0x55;
1000
m_OPCodesCB[0x56] = &Processor::OPCodeCB0x56;
1001
m_OPCodesCB[0x57] = &Processor::OPCodeCB0x57;
1002
m_OPCodesCB[0x58] = &Processor::OPCodeCB0x58;
1003
m_OPCodesCB[0x59] = &Processor::OPCodeCB0x59;
1004
m_OPCodesCB[0x5A] = &Processor::OPCodeCB0x5A;
1005
m_OPCodesCB[0x5B] = &Processor::OPCodeCB0x5B;
1006
m_OPCodesCB[0x5C] = &Processor::OPCodeCB0x5C;
1007
m_OPCodesCB[0x5D] = &Processor::OPCodeCB0x5D;
1008
m_OPCodesCB[0x5E] = &Processor::OPCodeCB0x5E;
1009
m_OPCodesCB[0x5F] = &Processor::OPCodeCB0x5F;
1010
1011
m_OPCodesCB[0x60] = &Processor::OPCodeCB0x60;
1012
m_OPCodesCB[0x61] = &Processor::OPCodeCB0x61;
1013
m_OPCodesCB[0x62] = &Processor::OPCodeCB0x62;
1014
m_OPCodesCB[0x63] = &Processor::OPCodeCB0x63;
1015
m_OPCodesCB[0x64] = &Processor::OPCodeCB0x64;
1016
m_OPCodesCB[0x65] = &Processor::OPCodeCB0x65;
1017
m_OPCodesCB[0x66] = &Processor::OPCodeCB0x66;
1018
m_OPCodesCB[0x67] = &Processor::OPCodeCB0x67;
1019
m_OPCodesCB[0x68] = &Processor::OPCodeCB0x68;
1020
m_OPCodesCB[0x69] = &Processor::OPCodeCB0x69;
1021
m_OPCodesCB[0x6A] = &Processor::OPCodeCB0x6A;
1022
m_OPCodesCB[0x6B] = &Processor::OPCodeCB0x6B;
1023
m_OPCodesCB[0x6C] = &Processor::OPCodeCB0x6C;
1024
m_OPCodesCB[0x6D] = &Processor::OPCodeCB0x6D;
1025
m_OPCodesCB[0x6E] = &Processor::OPCodeCB0x6E;
1026
m_OPCodesCB[0x6F] = &Processor::OPCodeCB0x6F;
1027
1028
m_OPCodesCB[0x70] = &Processor::OPCodeCB0x70;
1029
m_OPCodesCB[0x71] = &Processor::OPCodeCB0x71;
1030
m_OPCodesCB[0x72] = &Processor::OPCodeCB0x72;
1031
m_OPCodesCB[0x73] = &Processor::OPCodeCB0x73;
1032
m_OPCodesCB[0x74] = &Processor::OPCodeCB0x74;
1033
m_OPCodesCB[0x75] = &Processor::OPCodeCB0x75;
1034
m_OPCodesCB[0x76] = &Processor::OPCodeCB0x76;
1035
m_OPCodesCB[0x77] = &Processor::OPCodeCB0x77;
1036
m_OPCodesCB[0x78] = &Processor::OPCodeCB0x78;
1037
m_OPCodesCB[0x79] = &Processor::OPCodeCB0x79;
1038
m_OPCodesCB[0x7A] = &Processor::OPCodeCB0x7A;
1039
m_OPCodesCB[0x7B] = &Processor::OPCodeCB0x7B;
1040
m_OPCodesCB[0x7C] = &Processor::OPCodeCB0x7C;
1041
m_OPCodesCB[0x7D] = &Processor::OPCodeCB0x7D;
1042
m_OPCodesCB[0x7E] = &Processor::OPCodeCB0x7E;
1043
m_OPCodesCB[0x7F] = &Processor::OPCodeCB0x7F;
1044
1045
m_OPCodesCB[0x80] = &Processor::OPCodeCB0x80;
1046
m_OPCodesCB[0x81] = &Processor::OPCodeCB0x81;
1047
m_OPCodesCB[0x82] = &Processor::OPCodeCB0x82;
1048
m_OPCodesCB[0x83] = &Processor::OPCodeCB0x83;
1049
m_OPCodesCB[0x84] = &Processor::OPCodeCB0x84;
1050
m_OPCodesCB[0x85] = &Processor::OPCodeCB0x85;
1051
m_OPCodesCB[0x86] = &Processor::OPCodeCB0x86;
1052
m_OPCodesCB[0x87] = &Processor::OPCodeCB0x87;
1053
m_OPCodesCB[0x88] = &Processor::OPCodeCB0x88;
1054
m_OPCodesCB[0x89] = &Processor::OPCodeCB0x89;
1055
m_OPCodesCB[0x8A] = &Processor::OPCodeCB0x8A;
1056
m_OPCodesCB[0x8B] = &Processor::OPCodeCB0x8B;
1057
m_OPCodesCB[0x8C] = &Processor::OPCodeCB0x8C;
1058
m_OPCodesCB[0x8D] = &Processor::OPCodeCB0x8D;
1059
m_OPCodesCB[0x8E] = &Processor::OPCodeCB0x8E;
1060
m_OPCodesCB[0x8F] = &Processor::OPCodeCB0x8F;
1061
1062
m_OPCodesCB[0x90] = &Processor::OPCodeCB0x90;
1063
m_OPCodesCB[0x91] = &Processor::OPCodeCB0x91;
1064
m_OPCodesCB[0x92] = &Processor::OPCodeCB0x92;
1065
m_OPCodesCB[0x93] = &Processor::OPCodeCB0x93;
1066
m_OPCodesCB[0x94] = &Processor::OPCodeCB0x94;
1067
m_OPCodesCB[0x95] = &Processor::OPCodeCB0x95;
1068
m_OPCodesCB[0x96] = &Processor::OPCodeCB0x96;
1069
m_OPCodesCB[0x97] = &Processor::OPCodeCB0x97;
1070
m_OPCodesCB[0x98] = &Processor::OPCodeCB0x98;
1071
m_OPCodesCB[0x99] = &Processor::OPCodeCB0x99;
1072
m_OPCodesCB[0x9A] = &Processor::OPCodeCB0x9A;
1073
m_OPCodesCB[0x9B] = &Processor::OPCodeCB0x9B;
1074
m_OPCodesCB[0x9C] = &Processor::OPCodeCB0x9C;
1075
m_OPCodesCB[0x9D] = &Processor::OPCodeCB0x9D;
1076
m_OPCodesCB[0x9E] = &Processor::OPCodeCB0x9E;
1077
m_OPCodesCB[0x9F] = &Processor::OPCodeCB0x9F;
1078
1079
m_OPCodesCB[0xA0] = &Processor::OPCodeCB0xA0;
1080
m_OPCodesCB[0xA1] = &Processor::OPCodeCB0xA1;
1081
m_OPCodesCB[0xA2] = &Processor::OPCodeCB0xA2;
1082
m_OPCodesCB[0xA3] = &Processor::OPCodeCB0xA3;
1083
m_OPCodesCB[0xA4] = &Processor::OPCodeCB0xA4;
1084
m_OPCodesCB[0xA5] = &Processor::OPCodeCB0xA5;
1085
m_OPCodesCB[0xA6] = &Processor::OPCodeCB0xA6;
1086
m_OPCodesCB[0xA7] = &Processor::OPCodeCB0xA7;
1087
m_OPCodesCB[0xA8] = &Processor::OPCodeCB0xA8;
1088
m_OPCodesCB[0xA9] = &Processor::OPCodeCB0xA9;
1089
m_OPCodesCB[0xAA] = &Processor::OPCodeCB0xAA;
1090
m_OPCodesCB[0xAB] = &Processor::OPCodeCB0xAB;
1091
m_OPCodesCB[0xAC] = &Processor::OPCodeCB0xAC;
1092
m_OPCodesCB[0xAD] = &Processor::OPCodeCB0xAD;
1093
m_OPCodesCB[0xAE] = &Processor::OPCodeCB0xAE;
1094
m_OPCodesCB[0xAF] = &Processor::OPCodeCB0xAF;
1095
1096
m_OPCodesCB[0xB0] = &Processor::OPCodeCB0xB0;
1097
m_OPCodesCB[0xB1] = &Processor::OPCodeCB0xB1;
1098
m_OPCodesCB[0xB2] = &Processor::OPCodeCB0xB2;
1099
m_OPCodesCB[0xB3] = &Processor::OPCodeCB0xB3;
1100
m_OPCodesCB[0xB4] = &Processor::OPCodeCB0xB4;
1101
m_OPCodesCB[0xB5] = &Processor::OPCodeCB0xB5;
1102
m_OPCodesCB[0xB6] = &Processor::OPCodeCB0xB6;
1103
m_OPCodesCB[0xB7] = &Processor::OPCodeCB0xB7;
1104
m_OPCodesCB[0xB8] = &Processor::OPCodeCB0xB8;
1105
m_OPCodesCB[0xB9] = &Processor::OPCodeCB0xB9;
1106
m_OPCodesCB[0xBA] = &Processor::OPCodeCB0xBA;
1107
m_OPCodesCB[0xBB] = &Processor::OPCodeCB0xBB;
1108
m_OPCodesCB[0xBC] = &Processor::OPCodeCB0xBC;
1109
m_OPCodesCB[0xBD] = &Processor::OPCodeCB0xBD;
1110
m_OPCodesCB[0xBE] = &Processor::OPCodeCB0xBE;
1111
m_OPCodesCB[0xBF] = &Processor::OPCodeCB0xBF;
1112
1113
m_OPCodesCB[0xC0] = &Processor::OPCodeCB0xC0;
1114
m_OPCodesCB[0xC1] = &Processor::OPCodeCB0xC1;
1115
m_OPCodesCB[0xC2] = &Processor::OPCodeCB0xC2;
1116
m_OPCodesCB[0xC3] = &Processor::OPCodeCB0xC3;
1117
m_OPCodesCB[0xC4] = &Processor::OPCodeCB0xC4;
1118
m_OPCodesCB[0xC5] = &Processor::OPCodeCB0xC5;
1119
m_OPCodesCB[0xC6] = &Processor::OPCodeCB0xC6;
1120
m_OPCodesCB[0xC7] = &Processor::OPCodeCB0xC7;
1121
m_OPCodesCB[0xC8] = &Processor::OPCodeCB0xC8;
1122
m_OPCodesCB[0xC9] = &Processor::OPCodeCB0xC9;
1123
m_OPCodesCB[0xCA] = &Processor::OPCodeCB0xCA;
1124
m_OPCodesCB[0xCB] = &Processor::OPCodeCB0xCB;
1125
m_OPCodesCB[0xCC] = &Processor::OPCodeCB0xCC;
1126
m_OPCodesCB[0xCD] = &Processor::OPCodeCB0xCD;
1127
m_OPCodesCB[0xCE] = &Processor::OPCodeCB0xCE;
1128
m_OPCodesCB[0xCF] = &Processor::OPCodeCB0xCF;
1129
1130
m_OPCodesCB[0xD0] = &Processor::OPCodeCB0xD0;
1131
m_OPCodesCB[0xD1] = &Processor::OPCodeCB0xD1;
1132
m_OPCodesCB[0xD2] = &Processor::OPCodeCB0xD2;
1133
m_OPCodesCB[0xD3] = &Processor::OPCodeCB0xD3;
1134
m_OPCodesCB[0xD4] = &Processor::OPCodeCB0xD4;
1135
m_OPCodesCB[0xD5] = &Processor::OPCodeCB0xD5;
1136
m_OPCodesCB[0xD6] = &Processor::OPCodeCB0xD6;
1137
m_OPCodesCB[0xD7] = &Processor::OPCodeCB0xD7;
1138
m_OPCodesCB[0xD8] = &Processor::OPCodeCB0xD8;
1139
m_OPCodesCB[0xD9] = &Processor::OPCodeCB0xD9;
1140
m_OPCodesCB[0xDA] = &Processor::OPCodeCB0xDA;
1141
m_OPCodesCB[0xDB] = &Processor::OPCodeCB0xDB;
1142
m_OPCodesCB[0xDC] = &Processor::OPCodeCB0xDC;
1143
m_OPCodesCB[0xDD] = &Processor::OPCodeCB0xDD;
1144
m_OPCodesCB[0xDE] = &Processor::OPCodeCB0xDE;
1145
m_OPCodesCB[0xDF] = &Processor::OPCodeCB0xDF;
1146
1147
m_OPCodesCB[0xE0] = &Processor::OPCodeCB0xE0;
1148
m_OPCodesCB[0xE1] = &Processor::OPCodeCB0xE1;
1149
m_OPCodesCB[0xE2] = &Processor::OPCodeCB0xE2;
1150
m_OPCodesCB[0xE3] = &Processor::OPCodeCB0xE3;
1151
m_OPCodesCB[0xE4] = &Processor::OPCodeCB0xE4;
1152
m_OPCodesCB[0xE5] = &Processor::OPCodeCB0xE5;
1153
m_OPCodesCB[0xE6] = &Processor::OPCodeCB0xE6;
1154
m_OPCodesCB[0xE7] = &Processor::OPCodeCB0xE7;
1155
m_OPCodesCB[0xE8] = &Processor::OPCodeCB0xE8;
1156
m_OPCodesCB[0xE9] = &Processor::OPCodeCB0xE9;
1157
m_OPCodesCB[0xEA] = &Processor::OPCodeCB0xEA;
1158
m_OPCodesCB[0xEB] = &Processor::OPCodeCB0xEB;
1159
m_OPCodesCB[0xEC] = &Processor::OPCodeCB0xEC;
1160
m_OPCodesCB[0xED] = &Processor::OPCodeCB0xED;
1161
m_OPCodesCB[0xEE] = &Processor::OPCodeCB0xEE;
1162
m_OPCodesCB[0xEF] = &Processor::OPCodeCB0xEF;
1163
1164
m_OPCodesCB[0xF0] = &Processor::OPCodeCB0xF0;
1165
m_OPCodesCB[0xF1] = &Processor::OPCodeCB0xF1;
1166
m_OPCodesCB[0xF2] = &Processor::OPCodeCB0xF2;
1167
m_OPCodesCB[0xF3] = &Processor::OPCodeCB0xF3;
1168
m_OPCodesCB[0xF4] = &Processor::OPCodeCB0xF4;
1169
m_OPCodesCB[0xF5] = &Processor::OPCodeCB0xF5;
1170
m_OPCodesCB[0xF6] = &Processor::OPCodeCB0xF6;
1171
m_OPCodesCB[0xF7] = &Processor::OPCodeCB0xF7;
1172
m_OPCodesCB[0xF8] = &Processor::OPCodeCB0xF8;
1173
m_OPCodesCB[0xF9] = &Processor::OPCodeCB0xF9;
1174
m_OPCodesCB[0xFA] = &Processor::OPCodeCB0xFA;
1175
m_OPCodesCB[0xFB] = &Processor::OPCodeCB0xFB;
1176
m_OPCodesCB[0xFC] = &Processor::OPCodeCB0xFC;
1177
m_OPCodesCB[0xFD] = &Processor::OPCodeCB0xFD;
1178
m_OPCodesCB[0xFE] = &Processor::OPCodeCB0xFE;
1179
m_OPCodesCB[0xFF] = &Processor::OPCodeCB0xFF;
1180
1181
for (int i = 0x00; i < 0x40; i++)
1182
{
1183
m_OPCodesED[i] = &Processor::InvalidOPCode;
1184
}
1185
1186
m_OPCodesED[0x40] = &Processor::OPCodeED0x40;
1187
m_OPCodesED[0x41] = &Processor::OPCodeED0x41;
1188
m_OPCodesED[0x42] = &Processor::OPCodeED0x42;
1189
m_OPCodesED[0x43] = &Processor::OPCodeED0x43;
1190
m_OPCodesED[0x44] = &Processor::OPCodeED0x44;
1191
m_OPCodesED[0x45] = &Processor::OPCodeED0x45;
1192
m_OPCodesED[0x46] = &Processor::OPCodeED0x46;
1193
m_OPCodesED[0x47] = &Processor::OPCodeED0x47;
1194
m_OPCodesED[0x48] = &Processor::OPCodeED0x48;
1195
m_OPCodesED[0x49] = &Processor::OPCodeED0x49;
1196
m_OPCodesED[0x4A] = &Processor::OPCodeED0x4A;
1197
m_OPCodesED[0x4B] = &Processor::OPCodeED0x4B;
1198
m_OPCodesED[0x4C] = &Processor::OPCodeED0x4C;
1199
m_OPCodesED[0x4D] = &Processor::OPCodeED0x4D;
1200
m_OPCodesED[0x4E] = &Processor::OPCodeED0x4E;
1201
m_OPCodesED[0x4F] = &Processor::OPCodeED0x4F;
1202
1203
m_OPCodesED[0x50] = &Processor::OPCodeED0x50;
1204
m_OPCodesED[0x51] = &Processor::OPCodeED0x51;
1205
m_OPCodesED[0x52] = &Processor::OPCodeED0x52;
1206
m_OPCodesED[0x53] = &Processor::OPCodeED0x53;
1207
m_OPCodesED[0x54] = &Processor::OPCodeED0x54;
1208
m_OPCodesED[0x55] = &Processor::OPCodeED0x55;
1209
m_OPCodesED[0x56] = &Processor::OPCodeED0x56;
1210
m_OPCodesED[0x57] = &Processor::OPCodeED0x57;
1211
m_OPCodesED[0x58] = &Processor::OPCodeED0x58;
1212
m_OPCodesED[0x59] = &Processor::OPCodeED0x59;
1213
m_OPCodesED[0x5A] = &Processor::OPCodeED0x5A;
1214
m_OPCodesED[0x5B] = &Processor::OPCodeED0x5B;
1215
m_OPCodesED[0x5C] = &Processor::OPCodeED0x5C;
1216
m_OPCodesED[0x5D] = &Processor::OPCodeED0x5D;
1217
m_OPCodesED[0x5E] = &Processor::OPCodeED0x5E;
1218
m_OPCodesED[0x5F] = &Processor::OPCodeED0x5F;
1219
1220
m_OPCodesED[0x60] = &Processor::OPCodeED0x60;
1221
m_OPCodesED[0x61] = &Processor::OPCodeED0x61;
1222
m_OPCodesED[0x62] = &Processor::OPCodeED0x62;
1223
m_OPCodesED[0x63] = &Processor::OPCodeED0x63;
1224
m_OPCodesED[0x64] = &Processor::OPCodeED0x64;
1225
m_OPCodesED[0x65] = &Processor::OPCodeED0x65;
1226
m_OPCodesED[0x66] = &Processor::OPCodeED0x66;
1227
m_OPCodesED[0x67] = &Processor::OPCodeED0x67;
1228
m_OPCodesED[0x68] = &Processor::OPCodeED0x68;
1229
m_OPCodesED[0x69] = &Processor::OPCodeED0x69;
1230
m_OPCodesED[0x6A] = &Processor::OPCodeED0x6A;
1231
m_OPCodesED[0x6B] = &Processor::OPCodeED0x6B;
1232
m_OPCodesED[0x6C] = &Processor::OPCodeED0x6C;
1233
m_OPCodesED[0x6D] = &Processor::OPCodeED0x6D;
1234
m_OPCodesED[0x6E] = &Processor::OPCodeED0x6E;
1235
m_OPCodesED[0x6F] = &Processor::OPCodeED0x6F;
1236
1237
m_OPCodesED[0x70] = &Processor::OPCodeED0x70;
1238
m_OPCodesED[0x71] = &Processor::OPCodeED0x71;
1239
m_OPCodesED[0x72] = &Processor::OPCodeED0x72;
1240
m_OPCodesED[0x73] = &Processor::OPCodeED0x73;
1241
m_OPCodesED[0x74] = &Processor::OPCodeED0x74;
1242
m_OPCodesED[0x75] = &Processor::OPCodeED0x75;
1243
m_OPCodesED[0x76] = &Processor::OPCodeED0x76;
1244
m_OPCodesED[0x77] = &Processor::InvalidOPCode;
1245
m_OPCodesED[0x78] = &Processor::OPCodeED0x78;
1246
m_OPCodesED[0x79] = &Processor::OPCodeED0x79;
1247
m_OPCodesED[0x7A] = &Processor::OPCodeED0x7A;
1248
m_OPCodesED[0x7B] = &Processor::OPCodeED0x7B;
1249
m_OPCodesED[0x7C] = &Processor::OPCodeED0x7C;
1250
m_OPCodesED[0x7D] = &Processor::OPCodeED0x7D;
1251
m_OPCodesED[0x7E] = &Processor::OPCodeED0x7E;
1252
1253
for (int i = 0x7F; i < 0xA0; i++)
1254
{
1255
m_OPCodesED[i] = &Processor::InvalidOPCode;
1256
}
1257
1258
m_OPCodesED[0xA0] = &Processor::OPCodeED0xA0;
1259
m_OPCodesED[0xA1] = &Processor::OPCodeED0xA1;
1260
m_OPCodesED[0xA2] = &Processor::OPCodeED0xA2;
1261
m_OPCodesED[0xA3] = &Processor::OPCodeED0xA3;
1262
m_OPCodesED[0xA4] = &Processor::InvalidOPCode;
1263
m_OPCodesED[0xA5] = &Processor::InvalidOPCode;
1264
m_OPCodesED[0xA6] = &Processor::InvalidOPCode;
1265
m_OPCodesED[0xA7] = &Processor::InvalidOPCode;
1266
m_OPCodesED[0xA8] = &Processor::OPCodeED0xA8;
1267
m_OPCodesED[0xA9] = &Processor::OPCodeED0xA9;
1268
m_OPCodesED[0xAA] = &Processor::OPCodeED0xAA;
1269
m_OPCodesED[0xAB] = &Processor::OPCodeED0xAB;
1270
m_OPCodesED[0xAC] = &Processor::InvalidOPCode;
1271
m_OPCodesED[0xAD] = &Processor::InvalidOPCode;
1272
m_OPCodesED[0xAE] = &Processor::InvalidOPCode;
1273
m_OPCodesED[0xAF] = &Processor::InvalidOPCode;
1274
1275
m_OPCodesED[0xB0] = &Processor::OPCodeED0xB0;
1276
m_OPCodesED[0xB1] = &Processor::OPCodeED0xB1;
1277
m_OPCodesED[0xB2] = &Processor::OPCodeED0xB2;
1278
m_OPCodesED[0xB3] = &Processor::OPCodeED0xB3;
1279
m_OPCodesED[0xB4] = &Processor::InvalidOPCode;
1280
m_OPCodesED[0xB5] = &Processor::InvalidOPCode;
1281
m_OPCodesED[0xB6] = &Processor::InvalidOPCode;
1282
m_OPCodesED[0xB7] = &Processor::InvalidOPCode;
1283
m_OPCodesED[0xB8] = &Processor::OPCodeED0xB8;
1284
m_OPCodesED[0xB9] = &Processor::OPCodeED0xB9;
1285
m_OPCodesED[0xBA] = &Processor::OPCodeED0xBA;
1286
m_OPCodesED[0xBB] = &Processor::OPCodeED0xBB;
1287
1288
for (int i = 0xBC; i <= 0xFF; i++)
1289
{
1290
m_OPCodesED[i] = &Processor::InvalidOPCode;
1291
}
1292
}
1293
1294