Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
folium-app
GitHub Repository: folium-app/Folium
Path: blob/a-new-beginning/Cherry/Core/include/Processor.h
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
#ifndef PROCESSOR_H
21
#define PROCESSOR_H
22
23
#include <list>
24
#include "definitions.h"
25
#include "SixteenBitRegister.h"
26
#include "CVMemory.h"
27
28
class IOPorts;
29
30
class Processor
31
{
32
public:
33
struct ProcessorState
34
{
35
SixteenBitRegister* AF;
36
SixteenBitRegister* BC;
37
SixteenBitRegister* DE;
38
SixteenBitRegister* HL;
39
SixteenBitRegister* AF2;
40
SixteenBitRegister* BC2;
41
SixteenBitRegister* DE2;
42
SixteenBitRegister* HL2;
43
SixteenBitRegister* IX;
44
SixteenBitRegister* IY;
45
SixteenBitRegister* SP;
46
SixteenBitRegister* PC;
47
SixteenBitRegister* WZ;
48
u8* I;
49
u8* R;
50
bool* IFF1;
51
bool* IFF2;
52
bool* Halt;
53
bool* INT;
54
bool* NMI;
55
};
56
57
public:
58
Processor(CVMemory* pMemory);
59
~Processor();
60
void Init();
61
void Reset();
62
unsigned int RunFor(unsigned int tstates);
63
void InjectTStates(unsigned int tstates);
64
void RequestINT(bool assert);
65
void RequestNMI();
66
void SetIOPOrts(IOPorts* pIOPorts);
67
IOPorts* GetIOPOrts();
68
void SaveState(std::ostream& stream);
69
void LoadState(std::istream& stream);
70
ProcessorState* GetState();
71
bool Disassemble(u16 address);
72
void DisassembleNextOpcode();
73
bool BreakpointHit();
74
void RequestMemoryBreakpoint();
75
bool Halted();
76
bool DuringInputOpcode();
77
78
private:
79
typedef void (Processor::*OPCptr) (void);
80
OPCptr m_OPCodes[256];
81
OPCptr m_OPCodesCB[256];
82
OPCptr m_OPCodesED[256];
83
CVMemory* m_pMemory;
84
SixteenBitRegister AF;
85
SixteenBitRegister BC;
86
SixteenBitRegister DE;
87
SixteenBitRegister HL;
88
SixteenBitRegister AF2;
89
SixteenBitRegister BC2;
90
SixteenBitRegister DE2;
91
SixteenBitRegister HL2;
92
SixteenBitRegister IX;
93
SixteenBitRegister IY;
94
SixteenBitRegister SP;
95
SixteenBitRegister PC;
96
SixteenBitRegister WZ;
97
u8 I;
98
u8 R;
99
bool m_bIFF1;
100
bool m_bIFF2;
101
bool m_bHalt;
102
bool m_bBranchTaken;
103
unsigned int m_iTStates;
104
unsigned int m_iInjectedTStates;
105
bool m_bAfterEI;
106
int m_iInterruptMode;
107
IOPorts* m_pIOPorts;
108
u8 m_CurrentPrefix;
109
bool m_bINTRequested;
110
bool m_bNMIRequested;
111
bool m_bPrefixedCBOpcode;
112
u8 m_PrefixedCBValue;
113
bool m_bInputLastCycle;
114
bool m_bBreakpointHit;
115
bool m_bRequestMemBreakpoint;
116
ProcessorState m_ProcessorState;
117
118
private:
119
u8 FetchOPCode();
120
u16 FetchArg16();
121
void ExecuteOPCode();
122
void LeaveHalt();
123
void ClearAllFlags();
124
void ToggleZeroFlagFromResult(u16 result);
125
void ToggleSignFlagFromResult(u8 result);
126
void ToggleXYFlagsFromResult(u8 result);
127
void ToggleParityFlagFromResult(u8 result);
128
void SetFlag(u8 flag);
129
void FlipFlag(u8 flag);
130
void ToggleFlag(u8 flag);
131
void ClearFlag(u8 flag);
132
bool IsSetFlag(u8 flag);
133
void StackPush(SixteenBitRegister* reg);
134
void StackPop(SixteenBitRegister* reg);
135
void SetInterruptMode(int mode);
136
void IncreaseR();
137
void UpdateProActionReplay();
138
void InvalidOPCode();
139
void UndocumentedOPCode();
140
SixteenBitRegister* GetPrefixedRegister();
141
u16 GetEffectiveAddress();
142
bool IsPrefixedInstruction();
143
void OPCodes_LD(u8* reg1, u8 value);
144
void OPCodes_LD(u8* reg, u16 address);
145
void OPCodes_LD(u16 address, u8 reg);
146
void OPCodes_LD_dd_nn(SixteenBitRegister* reg);
147
void OPCodes_LD_nn_dd(SixteenBitRegister* reg);
148
void OPCodes_LDI();
149
void OPCodes_LDD();
150
void OPCodes_RST(u16 address);
151
void OPCodes_CALL_nn();
152
void OPCodes_CALL_nn_Conditional(bool condition);
153
void OPCodes_JP_nn();
154
void OPCodes_JP_nn_Conditional(bool condition);
155
void OPCodes_JR_n();
156
void OPCodes_JR_n_conditional(bool condition);
157
void OPCodes_RET();
158
void OPCodes_RET_Conditional(bool condition);
159
void OPCodes_IN_C(u8* reg);
160
void OPCodes_INI();
161
void OPCodes_IND();
162
void OPCodes_OUT_C(u8* reg);
163
void OPCodes_OUTI();
164
void OPCodes_OUTD();
165
void OPCodes_EX(SixteenBitRegister* reg1, SixteenBitRegister* reg2);
166
void OPCodes_OR(u8 number);
167
void OPCodes_XOR(u8 number);
168
void OPCodes_AND(u8 number);
169
void OPCodes_CP(u8 number);
170
void OPCodes_CPI();
171
void OPCodes_CPD();
172
void OPCodes_INC(u8* reg);
173
void OPCodes_INC_HL();
174
void OPCodes_DEC(u8* reg);
175
void OPCodes_DEC_HL();
176
void OPCodes_ADD(u8 number);
177
void OPCodes_ADC(u8 number);
178
void OPCodes_SUB(u8 number);
179
void OPCodes_SBC(u8 number);
180
void OPCodes_ADD_HL(u16 number);
181
void OPCodes_ADC_HL(u16 number);
182
void OPCodes_SBC_HL(u16 number);
183
void OPCodes_SLL(u8* reg);
184
void OPCodes_SLL_HL();
185
void OPCodes_SLA(u8* reg);
186
void OPCodes_SLA_HL();
187
void OPCodes_SRA(u8* reg);
188
void OPCodes_SRA_HL();
189
void OPCodes_SRL(u8* reg);
190
void OPCodes_SRL_HL();
191
void OPCodes_RLC(u8* reg, bool isRegisterA = false);
192
void OPCodes_RLC_HL();
193
void OPCodes_RL(u8* reg, bool isRegisterA = false);
194
void OPCodes_RL_HL();
195
void OPCodes_RRC(u8* reg, bool isRegisterA = false);
196
void OPCodes_RRC_HL();
197
void OPCodes_RR(u8* reg, bool isRegisterA = false);
198
void OPCodes_RR_HL();
199
void OPCodes_BIT(u8* reg, int bit);
200
void OPCodes_BIT_HL(int bit);
201
void OPCodes_SET(u8* reg, int bit);
202
void OPCodes_SET_HL(int bit);
203
void OPCodes_RES(u8* reg, int bit);
204
void OPCodes_RES_HL(int bit);
205
void InitOPCodeFunctors();
206
207
void OPCode0x00();
208
void OPCode0x01();
209
void OPCode0x02();
210
void OPCode0x03();
211
void OPCode0x04();
212
void OPCode0x05();
213
void OPCode0x06();
214
void OPCode0x07();
215
void OPCode0x08();
216
void OPCode0x09();
217
void OPCode0x0A();
218
void OPCode0x0B();
219
void OPCode0x0C();
220
void OPCode0x0D();
221
void OPCode0x0E();
222
void OPCode0x0F();
223
void OPCode0x10();
224
void OPCode0x11();
225
void OPCode0x12();
226
void OPCode0x13();
227
void OPCode0x14();
228
void OPCode0x15();
229
void OPCode0x16();
230
void OPCode0x17();
231
void OPCode0x18();
232
void OPCode0x19();
233
void OPCode0x1A();
234
void OPCode0x1B();
235
void OPCode0x1C();
236
void OPCode0x1D();
237
void OPCode0x1E();
238
void OPCode0x1F();
239
void OPCode0x20();
240
void OPCode0x21();
241
void OPCode0x22();
242
void OPCode0x23();
243
void OPCode0x24();
244
void OPCode0x25();
245
void OPCode0x26();
246
void OPCode0x27();
247
void OPCode0x28();
248
void OPCode0x29();
249
void OPCode0x2A();
250
void OPCode0x2B();
251
void OPCode0x2C();
252
void OPCode0x2D();
253
void OPCode0x2E();
254
void OPCode0x2F();
255
void OPCode0x30();
256
void OPCode0x31();
257
void OPCode0x32();
258
void OPCode0x33();
259
void OPCode0x34();
260
void OPCode0x35();
261
void OPCode0x36();
262
void OPCode0x37();
263
void OPCode0x38();
264
void OPCode0x39();
265
void OPCode0x3A();
266
void OPCode0x3B();
267
void OPCode0x3C();
268
void OPCode0x3D();
269
void OPCode0x3E();
270
void OPCode0x3F();
271
void OPCode0x40();
272
void OPCode0x41();
273
void OPCode0x42();
274
void OPCode0x43();
275
void OPCode0x44();
276
void OPCode0x45();
277
void OPCode0x46();
278
void OPCode0x47();
279
void OPCode0x48();
280
void OPCode0x49();
281
void OPCode0x4A();
282
void OPCode0x4B();
283
void OPCode0x4C();
284
void OPCode0x4D();
285
void OPCode0x4E();
286
void OPCode0x4F();
287
void OPCode0x50();
288
void OPCode0x51();
289
void OPCode0x52();
290
void OPCode0x53();
291
void OPCode0x54();
292
void OPCode0x55();
293
void OPCode0x56();
294
void OPCode0x57();
295
void OPCode0x58();
296
void OPCode0x59();
297
void OPCode0x5A();
298
void OPCode0x5B();
299
void OPCode0x5C();
300
void OPCode0x5D();
301
void OPCode0x5E();
302
void OPCode0x5F();
303
void OPCode0x60();
304
void OPCode0x61();
305
void OPCode0x62();
306
void OPCode0x63();
307
void OPCode0x64();
308
void OPCode0x65();
309
void OPCode0x66();
310
void OPCode0x67();
311
void OPCode0x68();
312
void OPCode0x69();
313
void OPCode0x6A();
314
void OPCode0x6B();
315
void OPCode0x6C();
316
void OPCode0x6D();
317
void OPCode0x6E();
318
void OPCode0x6F();
319
void OPCode0x70();
320
void OPCode0x71();
321
void OPCode0x72();
322
void OPCode0x73();
323
void OPCode0x74();
324
void OPCode0x75();
325
void OPCode0x76();
326
void OPCode0x77();
327
void OPCode0x78();
328
void OPCode0x79();
329
void OPCode0x7A();
330
void OPCode0x7B();
331
void OPCode0x7C();
332
void OPCode0x7D();
333
void OPCode0x7E();
334
void OPCode0x7F();
335
void OPCode0x80();
336
void OPCode0x81();
337
void OPCode0x82();
338
void OPCode0x83();
339
void OPCode0x84();
340
void OPCode0x85();
341
void OPCode0x86();
342
void OPCode0x87();
343
void OPCode0x88();
344
void OPCode0x89();
345
void OPCode0x8A();
346
void OPCode0x8B();
347
void OPCode0x8C();
348
void OPCode0x8D();
349
void OPCode0x8E();
350
void OPCode0x8F();
351
void OPCode0x90();
352
void OPCode0x91();
353
void OPCode0x92();
354
void OPCode0x93();
355
void OPCode0x94();
356
void OPCode0x95();
357
void OPCode0x96();
358
void OPCode0x97();
359
void OPCode0x98();
360
void OPCode0x99();
361
void OPCode0x9A();
362
void OPCode0x9B();
363
void OPCode0x9C();
364
void OPCode0x9D();
365
void OPCode0x9E();
366
void OPCode0x9F();
367
void OPCode0xA0();
368
void OPCode0xA1();
369
void OPCode0xA2();
370
void OPCode0xA3();
371
void OPCode0xA4();
372
void OPCode0xA5();
373
void OPCode0xA6();
374
void OPCode0xA7();
375
void OPCode0xA8();
376
void OPCode0xA9();
377
void OPCode0xAA();
378
void OPCode0xAB();
379
void OPCode0xAC();
380
void OPCode0xAD();
381
void OPCode0xAE();
382
void OPCode0xAF();
383
void OPCode0xB0();
384
void OPCode0xB1();
385
void OPCode0xB2();
386
void OPCode0xB3();
387
void OPCode0xB4();
388
void OPCode0xB5();
389
void OPCode0xB6();
390
void OPCode0xB7();
391
void OPCode0xB8();
392
void OPCode0xB9();
393
void OPCode0xBA();
394
void OPCode0xBB();
395
void OPCode0xBC();
396
void OPCode0xBD();
397
void OPCode0xBE();
398
void OPCode0xBF();
399
void OPCode0xC0();
400
void OPCode0xC1();
401
void OPCode0xC2();
402
void OPCode0xC3();
403
void OPCode0xC4();
404
void OPCode0xC5();
405
void OPCode0xC6();
406
void OPCode0xC7();
407
void OPCode0xC8();
408
void OPCode0xC9();
409
void OPCode0xCA();
410
void OPCode0xCB();
411
void OPCode0xCC();
412
void OPCode0xCD();
413
void OPCode0xCE();
414
void OPCode0xCF();
415
void OPCode0xD0();
416
void OPCode0xD1();
417
void OPCode0xD2();
418
void OPCode0xD3();
419
void OPCode0xD4();
420
void OPCode0xD5();
421
void OPCode0xD6();
422
void OPCode0xD7();
423
void OPCode0xD8();
424
void OPCode0xD9();
425
void OPCode0xDA();
426
void OPCode0xDB();
427
void OPCode0xDC();
428
void OPCode0xDD();
429
void OPCode0xDE();
430
void OPCode0xDF();
431
void OPCode0xE0();
432
void OPCode0xE1();
433
void OPCode0xE2();
434
void OPCode0xE3();
435
void OPCode0xE4();
436
void OPCode0xE5();
437
void OPCode0xE6();
438
void OPCode0xE7();
439
void OPCode0xE8();
440
void OPCode0xE9();
441
void OPCode0xEA();
442
void OPCode0xEB();
443
void OPCode0xEC();
444
void OPCode0xED();
445
void OPCode0xEE();
446
void OPCode0xEF();
447
void OPCode0xF0();
448
void OPCode0xF1();
449
void OPCode0xF2();
450
void OPCode0xF3();
451
void OPCode0xF4();
452
void OPCode0xF5();
453
void OPCode0xF6();
454
void OPCode0xF7();
455
void OPCode0xF8();
456
void OPCode0xF9();
457
void OPCode0xFA();
458
void OPCode0xFB();
459
void OPCode0xFC();
460
void OPCode0xFD();
461
void OPCode0xFE();
462
void OPCode0xFF();
463
464
void OPCodeCB0x00();
465
void OPCodeCB0x01();
466
void OPCodeCB0x02();
467
void OPCodeCB0x03();
468
void OPCodeCB0x04();
469
void OPCodeCB0x05();
470
void OPCodeCB0x06();
471
void OPCodeCB0x07();
472
void OPCodeCB0x08();
473
void OPCodeCB0x09();
474
void OPCodeCB0x0A();
475
void OPCodeCB0x0B();
476
void OPCodeCB0x0C();
477
void OPCodeCB0x0D();
478
void OPCodeCB0x0E();
479
void OPCodeCB0x0F();
480
void OPCodeCB0x10();
481
void OPCodeCB0x11();
482
void OPCodeCB0x12();
483
void OPCodeCB0x13();
484
void OPCodeCB0x14();
485
void OPCodeCB0x15();
486
void OPCodeCB0x16();
487
void OPCodeCB0x17();
488
void OPCodeCB0x18();
489
void OPCodeCB0x19();
490
void OPCodeCB0x1A();
491
void OPCodeCB0x1B();
492
void OPCodeCB0x1C();
493
void OPCodeCB0x1D();
494
void OPCodeCB0x1E();
495
void OPCodeCB0x1F();
496
void OPCodeCB0x20();
497
void OPCodeCB0x21();
498
void OPCodeCB0x22();
499
void OPCodeCB0x23();
500
void OPCodeCB0x24();
501
void OPCodeCB0x25();
502
void OPCodeCB0x26();
503
void OPCodeCB0x27();
504
void OPCodeCB0x28();
505
void OPCodeCB0x29();
506
void OPCodeCB0x2A();
507
void OPCodeCB0x2B();
508
void OPCodeCB0x2C();
509
void OPCodeCB0x2D();
510
void OPCodeCB0x2E();
511
void OPCodeCB0x2F();
512
void OPCodeCB0x30();
513
void OPCodeCB0x31();
514
void OPCodeCB0x32();
515
void OPCodeCB0x33();
516
void OPCodeCB0x34();
517
void OPCodeCB0x35();
518
void OPCodeCB0x36();
519
void OPCodeCB0x37();
520
void OPCodeCB0x38();
521
void OPCodeCB0x39();
522
void OPCodeCB0x3A();
523
void OPCodeCB0x3B();
524
void OPCodeCB0x3C();
525
void OPCodeCB0x3D();
526
void OPCodeCB0x3E();
527
void OPCodeCB0x3F();
528
void OPCodeCB0x40();
529
void OPCodeCB0x41();
530
void OPCodeCB0x42();
531
void OPCodeCB0x43();
532
void OPCodeCB0x44();
533
void OPCodeCB0x45();
534
void OPCodeCB0x46();
535
void OPCodeCB0x47();
536
void OPCodeCB0x48();
537
void OPCodeCB0x49();
538
void OPCodeCB0x4A();
539
void OPCodeCB0x4B();
540
void OPCodeCB0x4C();
541
void OPCodeCB0x4D();
542
void OPCodeCB0x4E();
543
void OPCodeCB0x4F();
544
void OPCodeCB0x50();
545
void OPCodeCB0x51();
546
void OPCodeCB0x52();
547
void OPCodeCB0x53();
548
void OPCodeCB0x54();
549
void OPCodeCB0x55();
550
void OPCodeCB0x56();
551
void OPCodeCB0x57();
552
void OPCodeCB0x58();
553
void OPCodeCB0x59();
554
void OPCodeCB0x5A();
555
void OPCodeCB0x5B();
556
void OPCodeCB0x5C();
557
void OPCodeCB0x5D();
558
void OPCodeCB0x5E();
559
void OPCodeCB0x5F();
560
void OPCodeCB0x60();
561
void OPCodeCB0x61();
562
void OPCodeCB0x62();
563
void OPCodeCB0x63();
564
void OPCodeCB0x64();
565
void OPCodeCB0x65();
566
void OPCodeCB0x66();
567
void OPCodeCB0x67();
568
void OPCodeCB0x68();
569
void OPCodeCB0x69();
570
void OPCodeCB0x6A();
571
void OPCodeCB0x6B();
572
void OPCodeCB0x6C();
573
void OPCodeCB0x6D();
574
void OPCodeCB0x6E();
575
void OPCodeCB0x6F();
576
void OPCodeCB0x70();
577
void OPCodeCB0x71();
578
void OPCodeCB0x72();
579
void OPCodeCB0x73();
580
void OPCodeCB0x74();
581
void OPCodeCB0x75();
582
void OPCodeCB0x76();
583
void OPCodeCB0x77();
584
void OPCodeCB0x78();
585
void OPCodeCB0x79();
586
void OPCodeCB0x7A();
587
void OPCodeCB0x7B();
588
void OPCodeCB0x7C();
589
void OPCodeCB0x7D();
590
void OPCodeCB0x7E();
591
void OPCodeCB0x7F();
592
void OPCodeCB0x80();
593
void OPCodeCB0x81();
594
void OPCodeCB0x82();
595
void OPCodeCB0x83();
596
void OPCodeCB0x84();
597
void OPCodeCB0x85();
598
void OPCodeCB0x86();
599
void OPCodeCB0x87();
600
void OPCodeCB0x88();
601
void OPCodeCB0x89();
602
void OPCodeCB0x8A();
603
void OPCodeCB0x8B();
604
void OPCodeCB0x8C();
605
void OPCodeCB0x8D();
606
void OPCodeCB0x8E();
607
void OPCodeCB0x8F();
608
void OPCodeCB0x90();
609
void OPCodeCB0x91();
610
void OPCodeCB0x92();
611
void OPCodeCB0x93();
612
void OPCodeCB0x94();
613
void OPCodeCB0x95();
614
void OPCodeCB0x96();
615
void OPCodeCB0x97();
616
void OPCodeCB0x98();
617
void OPCodeCB0x99();
618
void OPCodeCB0x9A();
619
void OPCodeCB0x9B();
620
void OPCodeCB0x9C();
621
void OPCodeCB0x9D();
622
void OPCodeCB0x9E();
623
void OPCodeCB0x9F();
624
void OPCodeCB0xA0();
625
void OPCodeCB0xA1();
626
void OPCodeCB0xA2();
627
void OPCodeCB0xA3();
628
void OPCodeCB0xA4();
629
void OPCodeCB0xA5();
630
void OPCodeCB0xA6();
631
void OPCodeCB0xA7();
632
void OPCodeCB0xA8();
633
void OPCodeCB0xA9();
634
void OPCodeCB0xAA();
635
void OPCodeCB0xAB();
636
void OPCodeCB0xAC();
637
void OPCodeCB0xAD();
638
void OPCodeCB0xAE();
639
void OPCodeCB0xAF();
640
void OPCodeCB0xB0();
641
void OPCodeCB0xB1();
642
void OPCodeCB0xB2();
643
void OPCodeCB0xB3();
644
void OPCodeCB0xB4();
645
void OPCodeCB0xB5();
646
void OPCodeCB0xB6();
647
void OPCodeCB0xB7();
648
void OPCodeCB0xB8();
649
void OPCodeCB0xB9();
650
void OPCodeCB0xBA();
651
void OPCodeCB0xBB();
652
void OPCodeCB0xBC();
653
void OPCodeCB0xBD();
654
void OPCodeCB0xBE();
655
void OPCodeCB0xBF();
656
void OPCodeCB0xC0();
657
void OPCodeCB0xC1();
658
void OPCodeCB0xC2();
659
void OPCodeCB0xC3();
660
void OPCodeCB0xC4();
661
void OPCodeCB0xC5();
662
void OPCodeCB0xC6();
663
void OPCodeCB0xC7();
664
void OPCodeCB0xC8();
665
void OPCodeCB0xC9();
666
void OPCodeCB0xCA();
667
void OPCodeCB0xCB();
668
void OPCodeCB0xCC();
669
void OPCodeCB0xCD();
670
void OPCodeCB0xCE();
671
void OPCodeCB0xCF();
672
void OPCodeCB0xD0();
673
void OPCodeCB0xD1();
674
void OPCodeCB0xD2();
675
void OPCodeCB0xD3();
676
void OPCodeCB0xD4();
677
void OPCodeCB0xD5();
678
void OPCodeCB0xD6();
679
void OPCodeCB0xD7();
680
void OPCodeCB0xD8();
681
void OPCodeCB0xD9();
682
void OPCodeCB0xDA();
683
void OPCodeCB0xDB();
684
void OPCodeCB0xDC();
685
void OPCodeCB0xDD();
686
void OPCodeCB0xDE();
687
void OPCodeCB0xDF();
688
void OPCodeCB0xE0();
689
void OPCodeCB0xE1();
690
void OPCodeCB0xE2();
691
void OPCodeCB0xE3();
692
void OPCodeCB0xE4();
693
void OPCodeCB0xE5();
694
void OPCodeCB0xE6();
695
void OPCodeCB0xE7();
696
void OPCodeCB0xE8();
697
void OPCodeCB0xE9();
698
void OPCodeCB0xEA();
699
void OPCodeCB0xEB();
700
void OPCodeCB0xEC();
701
void OPCodeCB0xED();
702
void OPCodeCB0xEE();
703
void OPCodeCB0xEF();
704
void OPCodeCB0xF0();
705
void OPCodeCB0xF1();
706
void OPCodeCB0xF2();
707
void OPCodeCB0xF3();
708
void OPCodeCB0xF4();
709
void OPCodeCB0xF5();
710
void OPCodeCB0xF6();
711
void OPCodeCB0xF7();
712
void OPCodeCB0xF8();
713
void OPCodeCB0xF9();
714
void OPCodeCB0xFA();
715
void OPCodeCB0xFB();
716
void OPCodeCB0xFC();
717
void OPCodeCB0xFD();
718
void OPCodeCB0xFE();
719
void OPCodeCB0xFF();
720
721
void OPCodeED0x40();
722
void OPCodeED0x41();
723
void OPCodeED0x42();
724
void OPCodeED0x43();
725
void OPCodeED0x44();
726
void OPCodeED0x45();
727
void OPCodeED0x46();
728
void OPCodeED0x47();
729
void OPCodeED0x48();
730
void OPCodeED0x49();
731
void OPCodeED0x4A();
732
void OPCodeED0x4B();
733
void OPCodeED0x4C();
734
void OPCodeED0x4D();
735
void OPCodeED0x4E();
736
void OPCodeED0x4F();
737
void OPCodeED0x50();
738
void OPCodeED0x51();
739
void OPCodeED0x52();
740
void OPCodeED0x53();
741
void OPCodeED0x54();
742
void OPCodeED0x55();
743
void OPCodeED0x56();
744
void OPCodeED0x57();
745
void OPCodeED0x58();
746
void OPCodeED0x59();
747
void OPCodeED0x5A();
748
void OPCodeED0x5B();
749
void OPCodeED0x5C();
750
void OPCodeED0x5D();
751
void OPCodeED0x5E();
752
void OPCodeED0x5F();
753
void OPCodeED0x60();
754
void OPCodeED0x61();
755
void OPCodeED0x62();
756
void OPCodeED0x63();
757
void OPCodeED0x64();
758
void OPCodeED0x65();
759
void OPCodeED0x66();
760
void OPCodeED0x67();
761
void OPCodeED0x68();
762
void OPCodeED0x69();
763
void OPCodeED0x6A();
764
void OPCodeED0x6B();
765
void OPCodeED0x6C();
766
void OPCodeED0x6D();
767
void OPCodeED0x6E();
768
void OPCodeED0x6F();
769
void OPCodeED0x70();
770
void OPCodeED0x71();
771
void OPCodeED0x72();
772
void OPCodeED0x73();
773
void OPCodeED0x74();
774
void OPCodeED0x75();
775
void OPCodeED0x76();
776
void OPCodeED0x78();
777
void OPCodeED0x79();
778
void OPCodeED0x7A();
779
void OPCodeED0x7B();
780
void OPCodeED0x7C();
781
void OPCodeED0x7D();
782
void OPCodeED0x7E();
783
void OPCodeED0xA0();
784
void OPCodeED0xA1();
785
void OPCodeED0xA2();
786
void OPCodeED0xA3();
787
void OPCodeED0xA8();
788
void OPCodeED0xA9();
789
void OPCodeED0xAA();
790
void OPCodeED0xAB();
791
void OPCodeED0xB0();
792
void OPCodeED0xB1();
793
void OPCodeED0xB2();
794
void OPCodeED0xB3();
795
void OPCodeED0xB8();
796
void OPCodeED0xB9();
797
void OPCodeED0xBA();
798
void OPCodeED0xBB();
799
};
800
801
const bool kZ80ParityTable[256] = {
802
true, false, false, true, false, true, true, false,
803
false, true, true, false, true, false, false, true,
804
false, true, true, false, true, false, false, true,
805
true, false, false, true, false, true, true, false,
806
false, true, true, false, true, false, false, true,
807
true, false, false, true, false, true, true, false,
808
true, false, false, true, false, true, true, false,
809
false, true, true, false, true, false, false, true,
810
false, true, true, false, true, false, false, true,
811
true, false, false, true, false, true, true, false,
812
true, false, false, true, false, true, true, false,
813
false, true, true, false, true, false, false, true,
814
true, false, false, true, false, true, true, false,
815
false, true, true, false, true, false, false, true,
816
false, true, true, false, true, false, false, true,
817
true, false, false, true, false, true, true, false,
818
false, true, true, false, true, false, false, true,
819
true, false, false, true, false, true, true, false,
820
true, false, false, true, false, true, true, false,
821
false, true, true, false, true, false, false, true,
822
true, false, false, true, false, true, true, false,
823
false, true, true, false, true, false, false, true,
824
false, true, true, false, true, false, false, true,
825
true, false, false, true, false, true, true, false,
826
true, false, false, true, false, true, true, false,
827
false, true, true, false, true, false, false, true,
828
false, true, true, false, true, false, false, true,
829
true, false, false, true, false, true, true, false,
830
false, true, true, false, true, false, false, true,
831
true, false, false, true, false, true, true, false,
832
true, false, false, true, false, true, true, false,
833
false, true, true, false, true, false, false, true
834
};
835
836
#include "Processor_inline.h"
837
838
#endif /* PROCESSOR_H */
839
840