OXYGENHUB
◆ rrdc-perf enhanced-x16-emulator / tests / spec_65c02.txt
1.8 KiB · Plain Text · last changed chore(): initial commit 25 days ago source blame history raw
1
# Documented sizes and base cycle counts for the instructions the 65C02 adds
2
# to the 6502, taken from the opcode list at
3
# http://6502.org/tutorials/65c02opcodes.html
4
#
5
# Checked against src/cpu/tables.h by tests/check_opcode_spec.py.
6
#
7
# ProcessorTests measures what the hardware does. This records what the
8
# documentation says, so a change to the tables that contradicts the published
9
# spec has to be argued for rather than slipped in. The two have disagreed
10
# once already, over the cycle count of $5C.
11
#
12
# The note is that page's footnote letter, marking counts that vary with
13
# decimal mode, a taken branch or a page crossing. The number here is the base.
14
#
15
# opcode bytes cycles note
16
00 1 7 -
17
02 2 2 -
18
03 1 1 -
19
04 2 5 -
20
07 2 5 -
21
0B 1 1 -
22
0C 3 6 -
23
0F 3 5 a
24
12 2 5 -
25
13 1 1 -
26
14 2 5 -
27
17 2 5 -
28
1A 1 2 -
29
1B 1 1 -
30
1C 3 6 -
31
1E 3 6 a
32
1F 3 5 a
33
22 2 2 -
34
23 1 1 -
35
27 2 5 -
36
2B 1 1 -
37
2F 3 5 a
38
32 2 5 -
39
33 1 1 -
40
34 2 4 -
41
37 2 5 -
42
3A 1 2 -
43
3B 1 1 -
44
3C 3 4 a
45
3E 3 6 a
46
3F 3 5 a
47
42 2 2 -
48
43 1 1 -
49
44 2 3 -
50
47 2 5 -
51
4B 1 1 -
52
4F 3 5 a
53
52 2 5 -
54
53 1 1 -
55
54 2 4 -
56
57 2 5 -
57
5A 1 3 -
58
5B 1 1 -
59
5C 3 8 j
60
5E 3 6 a
61
5F 3 5 a
62
61 2 6 a
63
62 2 2 -
64
63 1 1 -
65
64 2 3 -
66
65 2 3 a
67
67 2 5 -
68
69 2 2 a
69
6B 1 1 -
70
6C 3 6 -
71
6D 3 4 a
72
6F 3 5 a
73
71 2 5 b
74
72 2 5 a
75
73 1 1 -
76
74 2 4 -
77
75 2 4 a
78
77 2 5 -
79
79 3 4 b
80
7A 1 4 -
81
7B 1 1 -
82
7C 3 6 -
83
7D 3 4 b
84
7E 3 6 a
85
7F 3 5 a
86
80 2 3 a
87
82 2 2 -
88
83 1 1 -
89
87 2 5 -
90
89 2 2 -
91
8B 1 1 -
92
8F 3 5 a
93
92 2 5 -
94
93 1 1 -
95
97 2 5 -
96
9B 1 1 -
97
9C 3 4 -
98
9E 3 5 -
99
9F 3 5 a
100
A3 1 1 -
101
A7 2 5 -
102
AB 1 1 -
103
AF 3 5 a
104
B2 2 5 -
105
B3 1 1 -
106
B7 2 5 -
107
BB 1 1 -
108
BF 3 5 a
109
C2 2 2 -
110
C3 1 1 -
111
C7 2 5 -
112
CB 1 3 -
113
CF 3 5 a
114
D2 2 5 -
115
D3 1 1 -
116
D4 2 4 -
117
D7 2 5 -
118
DA 1 3 -
119
DB 1 3 -
120
DC 3 4 i
121
DF 3 5 a
122
E1 2 6 a
123
E2 2 2 -
124
E3 1 1 -
125
E5 2 3 a
126
E7 2 5 -
127
E9 2 2 a
128
EB 1 1 -
129
ED 3 4 a
130
EF 3 5 a
131
F1 2 5 b
132
F2 2 5 a
133
F3 1 1 -
134
F4 2 4 -
135
F5 2 4 a
136
F7 2 5 -
137
F9 3 4 b
138
FA 1 4 -
139
FB 1 1 -
140
FC 3 4 i
141
FD 3 4 b
142
FF 3 5 a