-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcpu_opcode.h
972 lines (966 loc) · 31 KB
/
cpu_opcode.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
// *** WARNING ***
// This file is generated by gen6502.rb
// Keep untouched or ruin the abstraction
// generated file
#pragma once
#include "utils.h"
typedef enum op {
// Addressing:IMPLIED
OP_00_BRK = 0x00,
// Addressing:PRE_INDIRECT_X
OP_01_ORA = 0x01,
// Addressing:IMPLIED
OP_02_STP_UNOFFICIAL = 0x02,
// Addressing:PRE_INDIRECT_X
OP_03_SLO_UNOFFICIAL = 0x03,
// Addressing:ZERO_PAGE
OP_04_NOP_UNOFFICIAL = 0x04,
// Addressing:ZERO_PAGE
OP_05_ORA = 0x05,
// Addressing:ZERO_PAGE
OP_06_ASL = 0x06,
// Addressing:ZERO_PAGE
OP_07_SLO_UNOFFICIAL = 0x07,
// Addressing:IMPLIED
OP_08_PHP = 0x08,
// Addressing:IMMEDIATE
OP_09_ORA = 0x09,
// Addressing:ACCUMULATOR
OP_0A_ASL = 0x0A,
// Addressing:IMMEDIATE
OP_0B_ANC_UNOFFICIAL = 0x0B,
// Addressing:ABSOLUTE
OP_0C_NOP_UNOFFICIAL = 0x0C,
// Addressing:ABSOLUTE
OP_0D_ORA = 0x0D,
// Addressing:ABSOLUTE
OP_0E_ASL = 0x0E,
// Addressing:ABSOLUTE
OP_0F_SLO_UNOFFICIAL = 0x0F,
// Addressing:RELATIVE
OP_10_BPL = 0x10,
// Addressing:POST_INDIRECT_Y
OP_11_ORA = 0x11,
// Addressing:IMPLIED
OP_12_STP_UNOFFICIAL = 0x12,
// Addressing:POST_INDIRECT_Y
OP_13_SLO_UNOFFICIAL = 0x13,
// Addressing:ZERO_PAGE_X
OP_14_NOP_UNOFFICIAL = 0x14,
// Addressing:ZERO_PAGE_X
OP_15_ORA = 0x15,
// Addressing:ZERO_PAGE_X
OP_16_ASL = 0x16,
// Addressing:ZERO_PAGE_X
OP_17_SLO_UNOFFICIAL = 0x17,
// Addressing:IMPLIED
OP_18_CLC = 0x18,
// Addressing:ABSOLUTE_Y
OP_19_ORA = 0x19,
// Addressing:IMPLIED
OP_1A_NOP_UNOFFICIAL = 0x1A,
// Addressing:ABSOLUTE_Y
OP_1B_SLO_UNOFFICIAL = 0x1B,
// Addressing:ABSOLUTE_X
OP_1C_NOP_UNOFFICIAL = 0x1C,
// Addressing:ABSOLUTE_X
OP_1D_ORA = 0x1D,
// Addressing:ABSOLUTE_X
OP_1E_ASL = 0x1E,
// Addressing:ABSOLUTE_X
OP_1F_SLO_UNOFFICIAL = 0x1F,
// Addressing:ABSOLUTE
OP_20_JSR = 0x20,
// Addressing:PRE_INDIRECT_X
OP_21_AND = 0x21,
// Addressing:IMPLIED
OP_22_STP_UNOFFICIAL = 0x22,
// Addressing:PRE_INDIRECT_X
OP_23_RLA_UNOFFICIAL = 0x23,
// Addressing:ZERO_PAGE
OP_24_BIT = 0x24,
// Addressing:ZERO_PAGE
OP_25_AND = 0x25,
// Addressing:ZERO_PAGE
OP_26_ROL = 0x26,
// Addressing:ZERO_PAGE
OP_27_RLA_UNOFFICIAL = 0x27,
// Addressing:IMPLIED
OP_28_PLP = 0x28,
// Addressing:IMMEDIATE
OP_29_AND = 0x29,
// Addressing:ACCUMULATOR
OP_2A_ROL = 0x2A,
// Addressing:IMMEDIATE
OP_2B_ANC_UNOFFICIAL = 0x2B,
// Addressing:ABSOLUTE
OP_2C_BIT = 0x2C,
// Addressing:ABSOLUTE
OP_2D_AND = 0x2D,
// Addressing:ABSOLUTE
OP_2E_ROL = 0x2E,
// Addressing:ABSOLUTE
OP_2F_RLA_UNOFFICIAL = 0x2F,
// Addressing:RELATIVE
OP_30_BMI = 0x30,
// Addressing:POST_INDIRECT_Y
OP_31_AND = 0x31,
// Addressing:IMPLIED
OP_32_STP_UNOFFICIAL = 0x32,
// Addressing:POST_INDIRECT_Y
OP_33_RLA_UNOFFICIAL = 0x33,
// Addressing:ZERO_PAGE_X
OP_34_NOP_UNOFFICIAL = 0x34,
// Addressing:ZERO_PAGE_X
OP_35_AND = 0x35,
// Addressing:ZERO_PAGE_X
OP_36_ROL = 0x36,
// Addressing:ZERO_PAGE_X
OP_37_RLA_UNOFFICIAL = 0x37,
// Addressing:IMPLIED
OP_38_SEC = 0x38,
// Addressing:ABSOLUTE_Y
OP_39_AND = 0x39,
// Addressing:IMPLIED
OP_3A_NOP_UNOFFICIAL = 0x3A,
// Addressing:ABSOLUTE_Y
OP_3B_RLA_UNOFFICIAL = 0x3B,
// Addressing:ABSOLUTE_X
OP_3C_NOP_UNOFFICIAL = 0x3C,
// Addressing:ABSOLUTE_X
OP_3D_AND = 0x3D,
// Addressing:ABSOLUTE_X
OP_3E_ROL = 0x3E,
// Addressing:ABSOLUTE_X
OP_3F_RLA_UNOFFICIAL = 0x3F,
// Addressing:IMPLIED
OP_40_RTI = 0x40,
// Addressing:PRE_INDIRECT_X
OP_41_EOR = 0x41,
// Addressing:IMPLIED
OP_42_STP_UNOFFICIAL = 0x42,
// Addressing:PRE_INDIRECT_X
OP_43_SRE_UNOFFICIAL = 0x43,
// Addressing:ZERO_PAGE
OP_44_NOP_UNOFFICIAL = 0x44,
// Addressing:ZERO_PAGE
OP_45_EOR = 0x45,
// Addressing:ZERO_PAGE
OP_46_LSR = 0x46,
// Addressing:ZERO_PAGE
OP_47_SRE_UNOFFICIAL = 0x47,
// Addressing:IMPLIED
OP_48_PHA = 0x48,
// Addressing:IMMEDIATE
OP_49_EOR = 0x49,
// Addressing:ACCUMULATOR
OP_4A_LSR = 0x4A,
// Addressing:IMMEDIATE
OP_4B_ALR_UNOFFICIAL = 0x4B,
// Addressing:ABSOLUTE
OP_4C_JMP = 0x4C,
// Addressing:ABSOLUTE
OP_4D_EOR = 0x4D,
// Addressing:ABSOLUTE
OP_4E_LSR = 0x4E,
// Addressing:ABSOLUTE
OP_4F_SRE_UNOFFICIAL = 0x4F,
// Addressing:RELATIVE
OP_50_BVC = 0x50,
// Addressing:POST_INDIRECT_Y
OP_51_EOR = 0x51,
// Addressing:IMPLIED
OP_52_STP_UNOFFICIAL = 0x52,
// Addressing:POST_INDIRECT_Y
OP_53_SRE_UNOFFICIAL = 0x53,
// Addressing:ZERO_PAGE_X
OP_54_NOP_UNOFFICIAL = 0x54,
// Addressing:ZERO_PAGE_X
OP_55_EOR = 0x55,
// Addressing:ZERO_PAGE_X
OP_56_LSR = 0x56,
// Addressing:ZERO_PAGE_X
OP_57_SRE_UNOFFICIAL = 0x57,
// Addressing:IMPLIED
OP_58_CLI = 0x58,
// Addressing:ABSOLUTE_Y
OP_59_EOR = 0x59,
// Addressing:IMPLIED
OP_5A_NOP_UNOFFICIAL = 0x5A,
// Addressing:ABSOLUTE_Y
OP_5B_SRE_UNOFFICIAL = 0x5B,
// Addressing:ABSOLUTE_X
OP_5C_NOP_UNOFFICIAL = 0x5C,
// Addressing:ABSOLUTE_X
OP_5D_EOR = 0x5D,
// Addressing:ABSOLUTE_X
OP_5E_LSR = 0x5E,
// Addressing:ABSOLUTE_X
OP_5F_SRE_UNOFFICIAL = 0x5F,
// Addressing:IMPLIED
OP_60_RTS = 0x60,
// Addressing:PRE_INDIRECT_X
OP_61_ADC = 0x61,
// Addressing:IMPLIED
OP_62_STP_UNOFFICIAL = 0x62,
// Addressing:PRE_INDIRECT_X
OP_63_RRA_UNOFFICIAL = 0x63,
// Addressing:ZERO_PAGE
OP_64_NOP_UNOFFICIAL = 0x64,
// Addressing:ZERO_PAGE
OP_65_ADC = 0x65,
// Addressing:ZERO_PAGE
OP_66_ROR = 0x66,
// Addressing:ZERO_PAGE
OP_67_RRA_UNOFFICIAL = 0x67,
// Addressing:IMPLIED
OP_68_PLA = 0x68,
// Addressing:IMMEDIATE
OP_69_ADC = 0x69,
// Addressing:ACCUMULATOR
OP_6A_ROR = 0x6A,
// Addressing:IMMEDIATE
OP_6B_ARR_UNOFFICIAL = 0x6B,
// Addressing:INDIRECT
OP_6C_JMP = 0x6C,
// Addressing:ABSOLUTE
OP_6D_ADC = 0x6D,
// Addressing:ABSOLUTE
OP_6E_ROR = 0x6E,
// Addressing:ABSOLUTE
OP_6F_RRA_UNOFFICIAL = 0x6F,
// Addressing:RELATIVE
OP_70_BVS = 0x70,
// Addressing:POST_INDIRECT_Y
OP_71_ADC = 0x71,
// Addressing:IMPLIED
OP_72_STP_UNOFFICIAL = 0x72,
// Addressing:POST_INDIRECT_Y
OP_73_RRA_UNOFFICIAL = 0x73,
// Addressing:ZERO_PAGE_X
OP_74_NOP_UNOFFICIAL = 0x74,
// Addressing:ZERO_PAGE_X
OP_75_ADC = 0x75,
// Addressing:ZERO_PAGE_X
OP_76_ROR = 0x76,
// Addressing:ZERO_PAGE_X
OP_77_RRA_UNOFFICIAL = 0x77,
// Addressing:IMPLIED
OP_78_SEI = 0x78,
// Addressing:ABSOLUTE_Y
OP_79_ADC = 0x79,
// Addressing:IMPLIED
OP_7A_NOP_UNOFFICIAL = 0x7A,
// Addressing:ABSOLUTE_Y
OP_7B_RRA_UNOFFICIAL = 0x7B,
// Addressing:ABSOLUTE_X
OP_7C_NOP_UNOFFICIAL = 0x7C,
// Addressing:ABSOLUTE_X
OP_7D_ADC = 0x7D,
// Addressing:ABSOLUTE_X
OP_7E_ROR = 0x7E,
// Addressing:ABSOLUTE_X
OP_7F_RRA_UNOFFICIAL = 0x7F,
// Addressing:IMMEDIATE
OP_80_NOP_UNOFFICIAL = 0x80,
// Addressing:PRE_INDIRECT_X
OP_81_STA = 0x81,
// Addressing:IMMEDIATE
OP_82_NOP_UNOFFICIAL = 0x82,
// Addressing:PRE_INDIRECT_X
OP_83_SAX_UNOFFICIAL = 0x83,
// Addressing:ZERO_PAGE
OP_84_STY = 0x84,
// Addressing:ZERO_PAGE
OP_85_STA = 0x85,
// Addressing:ZERO_PAGE
OP_86_STX = 0x86,
// Addressing:ZERO_PAGE
OP_87_SAX_UNOFFICIAL = 0x87,
// Addressing:IMPLIED
OP_88_DEY = 0x88,
// Addressing:IMMEDIATE
OP_89_NOP_UNOFFICIAL = 0x89,
// Addressing:IMPLIED
OP_8A_TXA = 0x8A,
// Addressing:IMMEDIATE
OP_8B_XAA_UNOFFICIAL = 0x8B,
// Addressing:ABSOLUTE
OP_8C_STY = 0x8C,
// Addressing:ABSOLUTE
OP_8D_STA = 0x8D,
// Addressing:ABSOLUTE
OP_8E_STX = 0x8E,
// Addressing:ABSOLUTE
OP_8F_SAX_UNOFFICIAL = 0x8F,
// Addressing:RELATIVE
OP_90_BCC = 0x90,
// Addressing:POST_INDIRECT_Y
OP_91_STA = 0x91,
// Addressing:IMPLIED
OP_92_STP_UNOFFICIAL = 0x92,
// Addressing:POST_INDIRECT_Y
OP_93_AHX_UNOFFICIAL = 0x93,
// Addressing:ZERO_PAGE_X
OP_94_STY = 0x94,
// Addressing:ZERO_PAGE_X
OP_95_STA = 0x95,
// Addressing:ZERO_PAGE_Y
OP_96_STX = 0x96,
// Addressing:ZERO_PAGE_Y
OP_97_SAX_UNOFFICIAL = 0x97,
// Addressing:IMPLIED
OP_98_TYA = 0x98,
// Addressing:ABSOLUTE_Y
OP_99_STA = 0x99,
// Addressing:IMPLIED
OP_9A_TXS = 0x9A,
// Addressing:ABSOLUTE_Y
OP_9B_TAS_UNOFFICIAL = 0x9B,
// Addressing:ABSOLUTE_X
OP_9C_SHY_UNOFFICIAL = 0x9C,
// Addressing:ABSOLUTE_X
OP_9D_STA = 0x9D,
// Addressing:ABSOLUTE_Y
OP_9E_SHX_UNOFFICIAL = 0x9E,
// Addressing:ABSOLUTE_Y
OP_9F_AHX_UNOFFICIAL = 0x9F,
// Addressing:IMMEDIATE
OP_A0_LDY = 0xA0,
// Addressing:PRE_INDIRECT_X
OP_A1_LDA = 0xA1,
// Addressing:IMMEDIATE
OP_A2_LDX = 0xA2,
// Addressing:PRE_INDIRECT_X
OP_A3_LAX_UNOFFICIAL = 0xA3,
// Addressing:ZERO_PAGE
OP_A4_LDY = 0xA4,
// Addressing:ZERO_PAGE
OP_A5_LDA = 0xA5,
// Addressing:ZERO_PAGE
OP_A6_LDX = 0xA6,
// Addressing:ZERO_PAGE
OP_A7_LAX_UNOFFICIAL = 0xA7,
// Addressing:IMPLIED
OP_A8_TAY = 0xA8,
// Addressing:IMMEDIATE
OP_A9_LDA = 0xA9,
// Addressing:IMPLIED
OP_AA_TAX = 0xAA,
// Addressing:IMMEDIATE
OP_AB_LAX_UNOFFICIAL = 0xAB,
// Addressing:ABSOLUTE
OP_AC_LDY = 0xAC,
// Addressing:ABSOLUTE
OP_AD_LDA = 0xAD,
// Addressing:ABSOLUTE
OP_AE_LDX = 0xAE,
// Addressing:ABSOLUTE
OP_AF_LAX_UNOFFICIAL = 0xAF,
// Addressing:RELATIVE
OP_B0_BCS = 0xB0,
// Addressing:POST_INDIRECT_Y
OP_B1_LDA = 0xB1,
// Addressing:IMPLIED
OP_B2_STP_UNOFFICIAL = 0xB2,
// Addressing:POST_INDIRECT_Y
OP_B3_LAX_UNOFFICIAL = 0xB3,
// Addressing:ZERO_PAGE_X
OP_B4_LDY = 0xB4,
// Addressing:ZERO_PAGE_X
OP_B5_LDA = 0xB5,
// Addressing:ZERO_PAGE_Y
OP_B6_LDX = 0xB6,
// Addressing:ZERO_PAGE_Y
OP_B7_LAX_UNOFFICIAL = 0xB7,
// Addressing:IMPLIED
OP_B8_CLV = 0xB8,
// Addressing:ABSOLUTE_Y
OP_B9_LDA = 0xB9,
// Addressing:IMPLIED
OP_BA_TSX = 0xBA,
// Addressing:ABSOLUTE_Y
OP_BB_LAS_UNOFFICIAL = 0xBB,
// Addressing:ABSOLUTE_X
OP_BC_LDY = 0xBC,
// Addressing:ABSOLUTE_X
OP_BD_LDA = 0xBD,
// Addressing:ABSOLUTE_Y
OP_BE_LDX = 0xBE,
// Addressing:ABSOLUTE_Y
OP_BF_LAX_UNOFFICIAL = 0xBF,
// Addressing:IMMEDIATE
OP_C0_CPY = 0xC0,
// Addressing:PRE_INDIRECT_X
OP_C1_CMP = 0xC1,
// Addressing:IMMEDIATE
OP_C2_NOP_UNOFFICIAL = 0xC2,
// Addressing:PRE_INDIRECT_X
OP_C3_DCP_UNOFFICIAL = 0xC3,
// Addressing:ZERO_PAGE
OP_C4_CPY = 0xC4,
// Addressing:ZERO_PAGE
OP_C5_CMP = 0xC5,
// Addressing:ZERO_PAGE
OP_C6_DEC = 0xC6,
// Addressing:ZERO_PAGE
OP_C7_DCP_UNOFFICIAL = 0xC7,
// Addressing:IMPLIED
OP_C8_INY = 0xC8,
// Addressing:IMMEDIATE
OP_C9_CMP = 0xC9,
// Addressing:IMPLIED
OP_CA_DEX = 0xCA,
// Addressing:IMMEDIATE
OP_CB_AXS_UNOFFICIAL = 0xCB,
// Addressing:ABSOLUTE
OP_CC_CPY = 0xCC,
// Addressing:ABSOLUTE
OP_CD_CMP = 0xCD,
// Addressing:ABSOLUTE
OP_CE_DEC = 0xCE,
// Addressing:ABSOLUTE
OP_CF_DCP_UNOFFICIAL = 0xCF,
// Addressing:RELATIVE
OP_D0_BNE = 0xD0,
// Addressing:POST_INDIRECT_Y
OP_D1_CMP = 0xD1,
// Addressing:IMPLIED
OP_D2_STP_UNOFFICIAL = 0xD2,
// Addressing:POST_INDIRECT_Y
OP_D3_DCP_UNOFFICIAL = 0xD3,
// Addressing:ZERO_PAGE_X
OP_D4_NOP_UNOFFICIAL = 0xD4,
// Addressing:ZERO_PAGE_X
OP_D5_CMP = 0xD5,
// Addressing:ZERO_PAGE_X
OP_D6_DEC = 0xD6,
// Addressing:ZERO_PAGE_X
OP_D7_DCP_UNOFFICIAL = 0xD7,
// Addressing:IMPLIED
OP_D8_CLD = 0xD8,
// Addressing:ABSOLUTE_Y
OP_D9_CMP = 0xD9,
// Addressing:IMPLIED
OP_DA_NOP_UNOFFICIAL = 0xDA,
// Addressing:ABSOLUTE_Y
OP_DB_DCP_UNOFFICIAL = 0xDB,
// Addressing:ABSOLUTE_X
OP_DC_NOP_UNOFFICIAL = 0xDC,
// Addressing:ABSOLUTE_X
OP_DD_CMP = 0xDD,
// Addressing:ABSOLUTE_X
OP_DE_DEC = 0xDE,
// Addressing:ABSOLUTE_X
OP_DF_DCP_UNOFFICIAL = 0xDF,
// Addressing:IMMEDIATE
OP_E0_CPX = 0xE0,
// Addressing:PRE_INDIRECT_X
OP_E1_SBC = 0xE1,
// Addressing:IMMEDIATE
OP_E2_NOP_UNOFFICIAL = 0xE2,
// Addressing:PRE_INDIRECT_X
OP_E3_ISC_UNOFFICIAL = 0xE3,
// Addressing:ZERO_PAGE
OP_E4_CPX = 0xE4,
// Addressing:ZERO_PAGE
OP_E5_SBC = 0xE5,
// Addressing:ZERO_PAGE
OP_E6_INC = 0xE6,
// Addressing:ZERO_PAGE
OP_E7_ISC_UNOFFICIAL = 0xE7,
// Addressing:IMPLIED
OP_E8_INX = 0xE8,
// Addressing:IMMEDIATE
OP_E9_SBC = 0xE9,
// Addressing:IMPLIED
OP_EA_NOP = 0xEA,
// Addressing:IMMEDIATE
OP_EB_SBC_UNOFFICIAL = 0xEB,
// Addressing:ABSOLUTE
OP_EC_CPX = 0xEC,
// Addressing:ABSOLUTE
OP_ED_SBC = 0xED,
// Addressing:ABSOLUTE
OP_EE_INC = 0xEE,
// Addressing:ABSOLUTE
OP_EF_ISC_UNOFFICIAL = 0xEF,
// Addressing:RELATIVE
OP_F0_BEQ = 0xF0,
// Addressing:POST_INDIRECT_Y
OP_F1_SBC = 0xF1,
// Addressing:IMPLIED
OP_F2_STP_UNOFFICIAL = 0xF2,
// Addressing:POST_INDIRECT_Y
OP_F3_ISC_UNOFFICIAL = 0xF3,
// Addressing:ZERO_PAGE_X
OP_F4_NOP_UNOFFICIAL = 0xF4,
// Addressing:ZERO_PAGE_X
OP_F5_SBC = 0xF5,
// Addressing:ZERO_PAGE_X
OP_F6_INC = 0xF6,
// Addressing:ZERO_PAGE_X
OP_F7_ISC_UNOFFICIAL = 0xF7,
// Addressing:IMPLIED
OP_F8_SED = 0xF8,
// Addressing:ABSOLUTE_Y
OP_F9_SBC = 0xF9,
// Addressing:IMPLIED
OP_FA_NOP_UNOFFICIAL = 0xFA,
// Addressing:ABSOLUTE_Y
OP_FB_ISC_UNOFFICIAL = 0xFB,
// Addressing:ABSOLUTE_X
OP_FC_NOP_UNOFFICIAL = 0xFC,
// Addressing:ABSOLUTE_X
OP_FD_SBC = 0xFD,
// Addressing:ABSOLUTE_X
OP_FE_INC = 0xFE,
// Addressing:ABSOLUTE_X
OP_FF_ISC_UNOFFICIAL = 0xFF,
} op_t;
typedef enum op_mode {
OP_MODE_IMPLIED,
OP_MODE_PRE_INDIRECT_X,
OP_MODE_ZERO_PAGE,
OP_MODE_IMMEDIATE,
OP_MODE_ACCUMULATOR,
OP_MODE_ABSOLUTE,
OP_MODE_RELATIVE,
OP_MODE_POST_INDIRECT_Y,
OP_MODE_ZERO_PAGE_X,
OP_MODE_ABSOLUTE_Y,
OP_MODE_ABSOLUTE_X,
OP_MODE_INDIRECT,
OP_MODE_ZERO_PAGE_Y,
} op_mode_t;
static inline bool op_is_official(op_t op)
{
switch (op) {
case OP_00_BRK: /* Fallthrough */
case OP_01_ORA: /* Fallthrough */
case OP_05_ORA: /* Fallthrough */
case OP_06_ASL: /* Fallthrough */
case OP_08_PHP: /* Fallthrough */
case OP_09_ORA: /* Fallthrough */
case OP_0A_ASL: /* Fallthrough */
case OP_0D_ORA: /* Fallthrough */
case OP_0E_ASL: /* Fallthrough */
case OP_10_BPL: /* Fallthrough */
case OP_11_ORA: /* Fallthrough */
case OP_15_ORA: /* Fallthrough */
case OP_16_ASL: /* Fallthrough */
case OP_18_CLC: /* Fallthrough */
case OP_19_ORA: /* Fallthrough */
case OP_1D_ORA: /* Fallthrough */
case OP_1E_ASL: /* Fallthrough */
case OP_20_JSR: /* Fallthrough */
case OP_21_AND: /* Fallthrough */
case OP_24_BIT: /* Fallthrough */
case OP_25_AND: /* Fallthrough */
case OP_26_ROL: /* Fallthrough */
case OP_28_PLP: /* Fallthrough */
case OP_29_AND: /* Fallthrough */
case OP_2A_ROL: /* Fallthrough */
case OP_2C_BIT: /* Fallthrough */
case OP_2D_AND: /* Fallthrough */
case OP_2E_ROL: /* Fallthrough */
case OP_30_BMI: /* Fallthrough */
case OP_31_AND: /* Fallthrough */
case OP_35_AND: /* Fallthrough */
case OP_36_ROL: /* Fallthrough */
case OP_38_SEC: /* Fallthrough */
case OP_39_AND: /* Fallthrough */
case OP_3D_AND: /* Fallthrough */
case OP_3E_ROL: /* Fallthrough */
case OP_40_RTI: /* Fallthrough */
case OP_41_EOR: /* Fallthrough */
case OP_45_EOR: /* Fallthrough */
case OP_46_LSR: /* Fallthrough */
case OP_48_PHA: /* Fallthrough */
case OP_49_EOR: /* Fallthrough */
case OP_4A_LSR: /* Fallthrough */
case OP_4C_JMP: /* Fallthrough */
case OP_4D_EOR: /* Fallthrough */
case OP_4E_LSR: /* Fallthrough */
case OP_50_BVC: /* Fallthrough */
case OP_51_EOR: /* Fallthrough */
case OP_55_EOR: /* Fallthrough */
case OP_56_LSR: /* Fallthrough */
case OP_58_CLI: /* Fallthrough */
case OP_59_EOR: /* Fallthrough */
case OP_5D_EOR: /* Fallthrough */
case OP_5E_LSR: /* Fallthrough */
case OP_60_RTS: /* Fallthrough */
case OP_61_ADC: /* Fallthrough */
case OP_65_ADC: /* Fallthrough */
case OP_66_ROR: /* Fallthrough */
case OP_68_PLA: /* Fallthrough */
case OP_69_ADC: /* Fallthrough */
case OP_6A_ROR: /* Fallthrough */
case OP_6C_JMP: /* Fallthrough */
case OP_6D_ADC: /* Fallthrough */
case OP_6E_ROR: /* Fallthrough */
case OP_70_BVS: /* Fallthrough */
case OP_71_ADC: /* Fallthrough */
case OP_75_ADC: /* Fallthrough */
case OP_76_ROR: /* Fallthrough */
case OP_78_SEI: /* Fallthrough */
case OP_79_ADC: /* Fallthrough */
case OP_7D_ADC: /* Fallthrough */
case OP_7E_ROR: /* Fallthrough */
case OP_81_STA: /* Fallthrough */
case OP_84_STY: /* Fallthrough */
case OP_85_STA: /* Fallthrough */
case OP_86_STX: /* Fallthrough */
case OP_88_DEY: /* Fallthrough */
case OP_8A_TXA: /* Fallthrough */
case OP_8C_STY: /* Fallthrough */
case OP_8D_STA: /* Fallthrough */
case OP_8E_STX: /* Fallthrough */
case OP_90_BCC: /* Fallthrough */
case OP_91_STA: /* Fallthrough */
case OP_94_STY: /* Fallthrough */
case OP_95_STA: /* Fallthrough */
case OP_96_STX: /* Fallthrough */
case OP_98_TYA: /* Fallthrough */
case OP_99_STA: /* Fallthrough */
case OP_9A_TXS: /* Fallthrough */
case OP_9D_STA: /* Fallthrough */
case OP_A0_LDY: /* Fallthrough */
case OP_A1_LDA: /* Fallthrough */
case OP_A2_LDX: /* Fallthrough */
case OP_A4_LDY: /* Fallthrough */
case OP_A5_LDA: /* Fallthrough */
case OP_A6_LDX: /* Fallthrough */
case OP_A8_TAY: /* Fallthrough */
case OP_A9_LDA: /* Fallthrough */
case OP_AA_TAX: /* Fallthrough */
case OP_AC_LDY: /* Fallthrough */
case OP_AD_LDA: /* Fallthrough */
case OP_AE_LDX: /* Fallthrough */
case OP_B0_BCS: /* Fallthrough */
case OP_B1_LDA: /* Fallthrough */
case OP_B4_LDY: /* Fallthrough */
case OP_B5_LDA: /* Fallthrough */
case OP_B6_LDX: /* Fallthrough */
case OP_B8_CLV: /* Fallthrough */
case OP_B9_LDA: /* Fallthrough */
case OP_BA_TSX: /* Fallthrough */
case OP_BC_LDY: /* Fallthrough */
case OP_BD_LDA: /* Fallthrough */
case OP_BE_LDX: /* Fallthrough */
case OP_C0_CPY: /* Fallthrough */
case OP_C1_CMP: /* Fallthrough */
case OP_C4_CPY: /* Fallthrough */
case OP_C5_CMP: /* Fallthrough */
case OP_C6_DEC: /* Fallthrough */
case OP_C8_INY: /* Fallthrough */
case OP_C9_CMP: /* Fallthrough */
case OP_CA_DEX: /* Fallthrough */
case OP_CC_CPY: /* Fallthrough */
case OP_CD_CMP: /* Fallthrough */
case OP_CE_DEC: /* Fallthrough */
case OP_D0_BNE: /* Fallthrough */
case OP_D1_CMP: /* Fallthrough */
case OP_D5_CMP: /* Fallthrough */
case OP_D6_DEC: /* Fallthrough */
case OP_D8_CLD: /* Fallthrough */
case OP_D9_CMP: /* Fallthrough */
case OP_DD_CMP: /* Fallthrough */
case OP_DE_DEC: /* Fallthrough */
case OP_E0_CPX: /* Fallthrough */
case OP_E1_SBC: /* Fallthrough */
case OP_E4_CPX: /* Fallthrough */
case OP_E5_SBC: /* Fallthrough */
case OP_E6_INC: /* Fallthrough */
case OP_E8_INX: /* Fallthrough */
case OP_E9_SBC: /* Fallthrough */
case OP_EA_NOP: /* Fallthrough */
case OP_EC_CPX: /* Fallthrough */
case OP_ED_SBC: /* Fallthrough */
case OP_EE_INC: /* Fallthrough */
case OP_F0_BEQ: /* Fallthrough */
case OP_F1_SBC: /* Fallthrough */
case OP_F5_SBC: /* Fallthrough */
case OP_F6_INC: /* Fallthrough */
case OP_F8_SED: /* Fallthrough */
case OP_F9_SBC: /* Fallthrough */
case OP_FD_SBC: /* Fallthrough */
case OP_FE_INC: /* Fallthrough */
return true;
default:
return false;
}
}
static inline int op_length(op_t op)
{
switch (op) {
case OP_00_BRK: /* Fallthrough */
case OP_02_STP_UNOFFICIAL: /* Fallthrough */
case OP_08_PHP: /* Fallthrough */
case OP_0A_ASL: /* Fallthrough */
case OP_12_STP_UNOFFICIAL: /* Fallthrough */
case OP_18_CLC: /* Fallthrough */
case OP_1A_NOP_UNOFFICIAL: /* Fallthrough */
case OP_22_STP_UNOFFICIAL: /* Fallthrough */
case OP_28_PLP: /* Fallthrough */
case OP_2A_ROL: /* Fallthrough */
case OP_32_STP_UNOFFICIAL: /* Fallthrough */
case OP_38_SEC: /* Fallthrough */
case OP_3A_NOP_UNOFFICIAL: /* Fallthrough */
case OP_40_RTI: /* Fallthrough */
case OP_42_STP_UNOFFICIAL: /* Fallthrough */
case OP_48_PHA: /* Fallthrough */
case OP_4A_LSR: /* Fallthrough */
case OP_52_STP_UNOFFICIAL: /* Fallthrough */
case OP_58_CLI: /* Fallthrough */
case OP_5A_NOP_UNOFFICIAL: /* Fallthrough */
case OP_60_RTS: /* Fallthrough */
case OP_62_STP_UNOFFICIAL: /* Fallthrough */
case OP_68_PLA: /* Fallthrough */
case OP_6A_ROR: /* Fallthrough */
case OP_72_STP_UNOFFICIAL: /* Fallthrough */
case OP_78_SEI: /* Fallthrough */
case OP_7A_NOP_UNOFFICIAL: /* Fallthrough */
case OP_88_DEY: /* Fallthrough */
case OP_8A_TXA: /* Fallthrough */
case OP_92_STP_UNOFFICIAL: /* Fallthrough */
case OP_98_TYA: /* Fallthrough */
case OP_9A_TXS: /* Fallthrough */
case OP_A8_TAY: /* Fallthrough */
case OP_AA_TAX: /* Fallthrough */
case OP_B2_STP_UNOFFICIAL: /* Fallthrough */
case OP_B8_CLV: /* Fallthrough */
case OP_BA_TSX: /* Fallthrough */
case OP_C8_INY: /* Fallthrough */
case OP_CA_DEX: /* Fallthrough */
case OP_D2_STP_UNOFFICIAL: /* Fallthrough */
case OP_D8_CLD: /* Fallthrough */
case OP_DA_NOP_UNOFFICIAL: /* Fallthrough */
case OP_E8_INX: /* Fallthrough */
case OP_EA_NOP: /* Fallthrough */
case OP_F2_STP_UNOFFICIAL: /* Fallthrough */
case OP_F8_SED: /* Fallthrough */
case OP_FA_NOP_UNOFFICIAL: /* Fallthrough */
return 1;
case OP_01_ORA: /* Fallthrough */
case OP_03_SLO_UNOFFICIAL: /* Fallthrough */
case OP_04_NOP_UNOFFICIAL: /* Fallthrough */
case OP_05_ORA: /* Fallthrough */
case OP_06_ASL: /* Fallthrough */
case OP_07_SLO_UNOFFICIAL: /* Fallthrough */
case OP_09_ORA: /* Fallthrough */
case OP_0B_ANC_UNOFFICIAL: /* Fallthrough */
case OP_10_BPL: /* Fallthrough */
case OP_11_ORA: /* Fallthrough */
case OP_13_SLO_UNOFFICIAL: /* Fallthrough */
case OP_14_NOP_UNOFFICIAL: /* Fallthrough */
case OP_15_ORA: /* Fallthrough */
case OP_16_ASL: /* Fallthrough */
case OP_17_SLO_UNOFFICIAL: /* Fallthrough */
case OP_21_AND: /* Fallthrough */
case OP_23_RLA_UNOFFICIAL: /* Fallthrough */
case OP_24_BIT: /* Fallthrough */
case OP_25_AND: /* Fallthrough */
case OP_26_ROL: /* Fallthrough */
case OP_27_RLA_UNOFFICIAL: /* Fallthrough */
case OP_29_AND: /* Fallthrough */
case OP_2B_ANC_UNOFFICIAL: /* Fallthrough */
case OP_30_BMI: /* Fallthrough */
case OP_31_AND: /* Fallthrough */
case OP_33_RLA_UNOFFICIAL: /* Fallthrough */
case OP_34_NOP_UNOFFICIAL: /* Fallthrough */
case OP_35_AND: /* Fallthrough */
case OP_36_ROL: /* Fallthrough */
case OP_37_RLA_UNOFFICIAL: /* Fallthrough */
case OP_41_EOR: /* Fallthrough */
case OP_43_SRE_UNOFFICIAL: /* Fallthrough */
case OP_44_NOP_UNOFFICIAL: /* Fallthrough */
case OP_45_EOR: /* Fallthrough */
case OP_46_LSR: /* Fallthrough */
case OP_47_SRE_UNOFFICIAL: /* Fallthrough */
case OP_49_EOR: /* Fallthrough */
case OP_4B_ALR_UNOFFICIAL: /* Fallthrough */
case OP_50_BVC: /* Fallthrough */
case OP_51_EOR: /* Fallthrough */
case OP_53_SRE_UNOFFICIAL: /* Fallthrough */
case OP_54_NOP_UNOFFICIAL: /* Fallthrough */
case OP_55_EOR: /* Fallthrough */
case OP_56_LSR: /* Fallthrough */
case OP_57_SRE_UNOFFICIAL: /* Fallthrough */
case OP_61_ADC: /* Fallthrough */
case OP_63_RRA_UNOFFICIAL: /* Fallthrough */
case OP_64_NOP_UNOFFICIAL: /* Fallthrough */
case OP_65_ADC: /* Fallthrough */
case OP_66_ROR: /* Fallthrough */
case OP_67_RRA_UNOFFICIAL: /* Fallthrough */
case OP_69_ADC: /* Fallthrough */
case OP_6B_ARR_UNOFFICIAL: /* Fallthrough */
case OP_70_BVS: /* Fallthrough */
case OP_71_ADC: /* Fallthrough */
case OP_73_RRA_UNOFFICIAL: /* Fallthrough */
case OP_74_NOP_UNOFFICIAL: /* Fallthrough */
case OP_75_ADC: /* Fallthrough */
case OP_76_ROR: /* Fallthrough */
case OP_77_RRA_UNOFFICIAL: /* Fallthrough */
case OP_80_NOP_UNOFFICIAL: /* Fallthrough */
case OP_81_STA: /* Fallthrough */
case OP_82_NOP_UNOFFICIAL: /* Fallthrough */
case OP_83_SAX_UNOFFICIAL: /* Fallthrough */
case OP_84_STY: /* Fallthrough */
case OP_85_STA: /* Fallthrough */
case OP_86_STX: /* Fallthrough */
case OP_87_SAX_UNOFFICIAL: /* Fallthrough */
case OP_89_NOP_UNOFFICIAL: /* Fallthrough */
case OP_8B_XAA_UNOFFICIAL: /* Fallthrough */
case OP_90_BCC: /* Fallthrough */
case OP_91_STA: /* Fallthrough */
case OP_93_AHX_UNOFFICIAL: /* Fallthrough */
case OP_94_STY: /* Fallthrough */
case OP_95_STA: /* Fallthrough */
case OP_96_STX: /* Fallthrough */
case OP_97_SAX_UNOFFICIAL: /* Fallthrough */
case OP_A0_LDY: /* Fallthrough */
case OP_A1_LDA: /* Fallthrough */
case OP_A2_LDX: /* Fallthrough */
case OP_A3_LAX_UNOFFICIAL: /* Fallthrough */
case OP_A4_LDY: /* Fallthrough */
case OP_A5_LDA: /* Fallthrough */
case OP_A6_LDX: /* Fallthrough */
case OP_A7_LAX_UNOFFICIAL: /* Fallthrough */
case OP_A9_LDA: /* Fallthrough */
case OP_AB_LAX_UNOFFICIAL: /* Fallthrough */
case OP_B0_BCS: /* Fallthrough */
case OP_B1_LDA: /* Fallthrough */
case OP_B3_LAX_UNOFFICIAL: /* Fallthrough */
case OP_B4_LDY: /* Fallthrough */
case OP_B5_LDA: /* Fallthrough */
case OP_B6_LDX: /* Fallthrough */
case OP_B7_LAX_UNOFFICIAL: /* Fallthrough */
case OP_C0_CPY: /* Fallthrough */
case OP_C1_CMP: /* Fallthrough */
case OP_C2_NOP_UNOFFICIAL: /* Fallthrough */
case OP_C3_DCP_UNOFFICIAL: /* Fallthrough */
case OP_C4_CPY: /* Fallthrough */
case OP_C5_CMP: /* Fallthrough */
case OP_C6_DEC: /* Fallthrough */
case OP_C7_DCP_UNOFFICIAL: /* Fallthrough */
case OP_C9_CMP: /* Fallthrough */
case OP_CB_AXS_UNOFFICIAL: /* Fallthrough */
case OP_D0_BNE: /* Fallthrough */
case OP_D1_CMP: /* Fallthrough */
case OP_D3_DCP_UNOFFICIAL: /* Fallthrough */
case OP_D4_NOP_UNOFFICIAL: /* Fallthrough */
case OP_D5_CMP: /* Fallthrough */
case OP_D6_DEC: /* Fallthrough */
case OP_D7_DCP_UNOFFICIAL: /* Fallthrough */
case OP_E0_CPX: /* Fallthrough */
case OP_E1_SBC: /* Fallthrough */
case OP_E2_NOP_UNOFFICIAL: /* Fallthrough */
case OP_E3_ISC_UNOFFICIAL: /* Fallthrough */
case OP_E4_CPX: /* Fallthrough */
case OP_E5_SBC: /* Fallthrough */
case OP_E6_INC: /* Fallthrough */
case OP_E7_ISC_UNOFFICIAL: /* Fallthrough */
case OP_E9_SBC: /* Fallthrough */
case OP_EB_SBC_UNOFFICIAL: /* Fallthrough */
case OP_F0_BEQ: /* Fallthrough */
case OP_F1_SBC: /* Fallthrough */
case OP_F3_ISC_UNOFFICIAL: /* Fallthrough */
case OP_F4_NOP_UNOFFICIAL: /* Fallthrough */
case OP_F5_SBC: /* Fallthrough */
case OP_F6_INC: /* Fallthrough */
case OP_F7_ISC_UNOFFICIAL: /* Fallthrough */
return 2;
case OP_0C_NOP_UNOFFICIAL: /* Fallthrough */
case OP_0D_ORA: /* Fallthrough */
case OP_0E_ASL: /* Fallthrough */
case OP_0F_SLO_UNOFFICIAL: /* Fallthrough */
case OP_19_ORA: /* Fallthrough */
case OP_1B_SLO_UNOFFICIAL: /* Fallthrough */
case OP_1C_NOP_UNOFFICIAL: /* Fallthrough */
case OP_1D_ORA: /* Fallthrough */
case OP_1E_ASL: /* Fallthrough */
case OP_1F_SLO_UNOFFICIAL: /* Fallthrough */
case OP_20_JSR: /* Fallthrough */
case OP_2C_BIT: /* Fallthrough */
case OP_2D_AND: /* Fallthrough */
case OP_2E_ROL: /* Fallthrough */
case OP_2F_RLA_UNOFFICIAL: /* Fallthrough */
case OP_39_AND: /* Fallthrough */
case OP_3B_RLA_UNOFFICIAL: /* Fallthrough */
case OP_3C_NOP_UNOFFICIAL: /* Fallthrough */
case OP_3D_AND: /* Fallthrough */
case OP_3E_ROL: /* Fallthrough */
case OP_3F_RLA_UNOFFICIAL: /* Fallthrough */
case OP_4C_JMP: /* Fallthrough */
case OP_4D_EOR: /* Fallthrough */
case OP_4E_LSR: /* Fallthrough */
case OP_4F_SRE_UNOFFICIAL: /* Fallthrough */
case OP_59_EOR: /* Fallthrough */
case OP_5B_SRE_UNOFFICIAL: /* Fallthrough */
case OP_5C_NOP_UNOFFICIAL: /* Fallthrough */
case OP_5D_EOR: /* Fallthrough */
case OP_5E_LSR: /* Fallthrough */
case OP_5F_SRE_UNOFFICIAL: /* Fallthrough */
case OP_6C_JMP: /* Fallthrough */
case OP_6D_ADC: /* Fallthrough */
case OP_6E_ROR: /* Fallthrough */
case OP_6F_RRA_UNOFFICIAL: /* Fallthrough */
case OP_79_ADC: /* Fallthrough */
case OP_7B_RRA_UNOFFICIAL: /* Fallthrough */
case OP_7C_NOP_UNOFFICIAL: /* Fallthrough */
case OP_7D_ADC: /* Fallthrough */
case OP_7E_ROR: /* Fallthrough */
case OP_7F_RRA_UNOFFICIAL: /* Fallthrough */
case OP_8C_STY: /* Fallthrough */
case OP_8D_STA: /* Fallthrough */
case OP_8E_STX: /* Fallthrough */
case OP_8F_SAX_UNOFFICIAL: /* Fallthrough */
case OP_99_STA: /* Fallthrough */
case OP_9B_TAS_UNOFFICIAL: /* Fallthrough */
case OP_9C_SHY_UNOFFICIAL: /* Fallthrough */
case OP_9D_STA: /* Fallthrough */
case OP_9E_SHX_UNOFFICIAL: /* Fallthrough */
case OP_9F_AHX_UNOFFICIAL: /* Fallthrough */
case OP_AC_LDY: /* Fallthrough */
case OP_AD_LDA: /* Fallthrough */
case OP_AE_LDX: /* Fallthrough */
case OP_AF_LAX_UNOFFICIAL: /* Fallthrough */
case OP_B9_LDA: /* Fallthrough */
case OP_BB_LAS_UNOFFICIAL: /* Fallthrough */
case OP_BC_LDY: /* Fallthrough */
case OP_BD_LDA: /* Fallthrough */
case OP_BE_LDX: /* Fallthrough */
case OP_BF_LAX_UNOFFICIAL: /* Fallthrough */
case OP_CC_CPY: /* Fallthrough */
case OP_CD_CMP: /* Fallthrough */
case OP_CE_DEC: /* Fallthrough */
case OP_CF_DCP_UNOFFICIAL: /* Fallthrough */
case OP_D9_CMP: /* Fallthrough */
case OP_DB_DCP_UNOFFICIAL: /* Fallthrough */
case OP_DC_NOP_UNOFFICIAL: /* Fallthrough */
case OP_DD_CMP: /* Fallthrough */
case OP_DE_DEC: /* Fallthrough */
case OP_DF_DCP_UNOFFICIAL: /* Fallthrough */
case OP_EC_CPX: /* Fallthrough */
case OP_ED_SBC: /* Fallthrough */
case OP_EE_INC: /* Fallthrough */
case OP_EF_ISC_UNOFFICIAL: /* Fallthrough */
case OP_F9_SBC: /* Fallthrough */
case OP_FB_ISC_UNOFFICIAL: /* Fallthrough */
case OP_FC_NOP_UNOFFICIAL: /* Fallthrough */
case OP_FD_SBC: /* Fallthrough */
case OP_FE_INC: /* Fallthrough */
case OP_FF_ISC_UNOFFICIAL: /* Fallthrough */
return 3;
}
}
typedef struct op_profile {
uint8_t op;
char name[4];
op_mode_t mode;
uint8_t length;
bool official;
} op_profile_t;
extern op_profile_t op_profiles[256];