Frame timing: Difference between revisions

From WSdev Wiki
Jump to navigationJump to search
(Created page with "Notes: * Sprite indices are given negatively. Sprites are filtered for every line, and are drawn from last found to first found. * Fetches may be off by one cycle. This stuff is complicated. {| class="wikitable" ! rowspan="2" | Cycle ! rowspan="2" | CPU ! colspan="4" | PPU ! rowspan="2" | APU ! rowspan="2" | Palette |- ! Mono/2BPP ! Color/2BPP ! Color/4BPP ! Line 144 |- | 0 | rowspan="117" style="vertical-align:top;" | V30MZ ! rowspan="256" style="text-align: center;"...")
 
No edit summary
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
== Line timing ==
Notes:
Notes:


Line 5: Line 7:


{| class="wikitable"
{| class="wikitable"
! rowspan="2" | Cycle
! rowspan="3" | Cycle
! colspan="7" | Quadrant
|-
! rowspan="2" | CPU
! rowspan="2" | CPU
! colspan="4" | PPU
! colspan="4" | Display
! rowspan="2" | APU
! rowspan="2" | Sound
! rowspan="2" | Palette
! rowspan="2" | Palette
|-
|-
Line 24: Line 28:
Copy one word every cycle
Copy one word every cycle
| rowspan="122" style="vertical-align:top;" |  
| rowspan="122" style="vertical-align:top;" |  
| rowspan="224" style="vertical-align:top;" | Fetch palette for pixel (N, Y)
| rowspan="224" style="vertical-align:top;" | Fetch palette for pixel (N, Y - 1)
|-
|-
| 1
| 1

Latest revision as of 18:25, 22 August 2023

Line timing

Notes:

  • Sprite indices are given negatively. Sprites are filtered for every line, and are drawn from last found to first found.
  • Fetches may be off by one cycle. This stuff is complicated.
Cycle Quadrant
CPU Display Sound Palette
Mono/2BPP Color/2BPP Color/4BPP Line 144
0 V30MZ TODO Fetch screen 1 cell (0, Y) TODO Sprite table DMA

Copy one word every cycle

Fetch palette for pixel (N, Y - 1)
1 Fetch tile data for above
2 Fetch screen 1 cell (1, Y)
3 Fetch tile data for above
4 Fetch screen 1 cell (2, Y)
5 Fetch tile data for above
6 Fetch screen 1 cell (3, Y)
7 Fetch tile data for above
8 Fetch screen 1 cell (4, Y)
9 Fetch tile data for above
10 Fetch screen 1 cell (5, Y)
11 Fetch tile data for above
12 Fetch screen 1 cell (6, Y)
13 Fetch tile data for above
14 Fetch screen 1 cell (7, Y)
15 Fetch tile data for above
16 Fetch screen 1 cell (8, Y)
17 Fetch tile data for above
18 Fetch screen 1 cell (9, Y)
19 Fetch tile data for above
20 Fetch screen 1 cell (10, Y)
21 Fetch tile data for above
22 Fetch screen 1 cell (11, Y)
23 Fetch tile data for above
24 Fetch screen 1 cell (12, Y)
25 Fetch tile data for above
26 Fetch screen 1 cell (13, Y)
27 Fetch tile data for above
28 Fetch screen 1 cell (14, Y)
29 Fetch tile data for above
30 Fetch screen 1 cell (15, Y)
31 Fetch tile data for above
32 Fetch screen 1 cell (16, Y)
33 Fetch tile data for above
34 Fetch screen 1 cell (17, Y)
35 Fetch tile data for above
36 Fetch screen 1 cell (18, Y)
37 Fetch tile data for above
38 Fetch screen 1 cell (19, Y)
39 Fetch tile data for above
40 Fetch screen 1 cell (20, Y)
41 Fetch tile data for above
42 Fetch screen 1 cell (21, Y)
43 Fetch tile data for above
44 Fetch screen 1 cell (22, Y)
45 Fetch tile data for above
46 Fetch screen 1 cell (23, Y)
47 Fetch tile data for above
48 Fetch screen 1 cell (24, Y)
49 Fetch tile data for above
50 Fetch screen 1 cell (25, Y)
51 Fetch tile data for above
52 Fetch screen 1 cell (26, Y)
53 Fetch tile data for above
54 Fetch screen 1 cell (27, Y)
55 Fetch tile data for above
56 Fetch screen 1 cell (28, Y)
57 Fetch tile data for above
58 Fetch screen 1 cell (29, Y)
59 Fetch tile data for above
60 Fetch screen 1 cell (30, Y)
61 Fetch tile data for above
62 Fetch screen 1 cell (31, Y)
63 Fetch tile data for above
64 Fetch screen 1 cell (0, Y)
65 Fetch tile data for above
66 Fetch screen 2 cell (0, Y)
67 Fetch tile data for above
68 Fetch screen 2 cell (1, Y)
69 Fetch tile data for above
70 Fetch screen 2 cell (2, Y)
71 Fetch tile data for above
72 Fetch screen 2 cell (3, Y)
73 Fetch tile data for above
74 Fetch screen 2 cell (4, Y)
75 Fetch tile data for above
76 Fetch screen 2 cell (5, Y)
77 Fetch tile data for above
78 Fetch screen 2 cell (6, Y)
79 Fetch tile data for above
80 Fetch screen 2 cell (7, Y)
81 Fetch tile data for above
82 Fetch screen 2 cell (8, Y)
83 Fetch tile data for above
84 Fetch screen 2 cell (9, Y)
85 Fetch tile data for above
86 Fetch screen 2 cell (10, Y)
87 Fetch tile data for above
88 Fetch screen 2 cell (11, Y)
89 Fetch tile data for above
90 Fetch screen 2 cell (12, Y)
91 Fetch tile data for above
92 Fetch screen 2 cell (13, Y)
93 Fetch tile data for above
94 Fetch screen 2 cell (14, Y)
95 Fetch tile data for above
96 Fetch screen 2 cell (15, Y)
97 Fetch tile data for above
98 Fetch screen 2 cell (16, Y)
99 Fetch tile data for above
100 Fetch screen 2 cell (17, Y)
101 Fetch tile data for above
102 Fetch screen 2 cell (18, Y)
103 Fetch tile data for above
104 Fetch screen 2 cell (19, Y)
105 Fetch tile data for above
106 Fetch screen 2 cell (20, Y)
107 Fetch tile data for above
108 Fetch screen 2 cell (21, Y)
109 Fetch tile data for above
110 Fetch screen 2 cell (22, Y)
111 Fetch tile data for above
112 Fetch screen 2 cell (23, Y)
113 Fetch tile data for above
114 Fetch screen 2 cell (24, Y)
115 Fetch tile data for above
116 Fetch screen 2 cell (25, Y)
117 (SDMA) Initialize Fetch tile data for above
118 Fetch screen 2 cell (26, Y)
119 Fetch tile data for above
120 Fetch screen 2 cell (27, Y)
121 Fetch tile data for above
122 (SDMA) Fetch RAM byte Fetch screen 2 cell (28, Y) Reset sound output
123 (SDMA) Write sound port Fetch tile data for above Fetch channel 1 wavetable sample
124 V30MZ Fetch screen 2 cell (29, Y) Fetch channel 2 wavetable sample

Add channel 1 output

125 Fetch tile data for above Fetch channel 3 wavetable sample

Add channel 2 output

126 Fetch screen 2 cell (30, Y) Fetch channel 4 wavetable sample

Add channel 3 output

127 Fetch tile data for above Add channel 4 output
128 Fetch screen 2 cell (31, Y)
129 Fetch tile data for above
130 Fetch screen 2 cell (0, Y)
131 Fetch tile data for above
132 TODO
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 Fetch tile data for sprite -1
159 TODO
160 Fetch tile data for sprite -2
161 TODO
162 Fetch tile data for sprite -3
163 TODO
164
165
166 Fetch tile data for sprite -4
167 TODO
168 Fetch tile data for sprite -5
169 TODO
170 Fetch tile data for sprite -6
171 TODO
172
173
174 Fetch tile data for sprite -7
175 TODO
176 Fetch tile data for sprite -8
177 TODO
178 Fetch tile data for sprite -9
179 TODO
180
181
182 Fetch tile data for sprite -10
183 TODO
184 Fetch tile data for sprite -11
185 TODO
186 Fetch tile data for sprite -12
187 TODO
188
189
190 Fetch tile data for sprite -13
191 TODO
192 Fetch tile data for sprite -14
193 TODO
194 Fetch tile data for sprite -15
195 TODO
196
197
198 Fetch tile data for sprite -16
199 TODO
200 Fetch tile data for sprite -17
201 TODO
202 Fetch tile data for sprite -18
203 TODO
204
205
206 Fetch tile data for sprite -19
207 TODO
208 Fetch tile data for sprite -20
209 TODO
210 Fetch tile data for sprite -21
211 TODO
212
213
214 Fetch tile data for sprite -22
215 TODO
216 Fetch tile data for sprite -23
217 TODO
218 Fetch tile data for sprite -24
219 TODO
220
221
222 Fetch tile data for sprite -25
223 TODO
224 Fetch tile data for sprite -26 TODO
225 TODO
226 Fetch tile data for sprite -27
227 TODO
228
229
230 Fetch tile data for sprite -28
231 TODO
232 Fetch tile data for sprite -29
233 TODO
234 Fetch tile data for sprite -30
235 TODO
236
237
238 Fetch tile data for sprite -31
239 TODO
240 Fetch tile data for sprite -32
241 TODO
242
243
244
245 (SDMA) Initialize
246
247
248
249
250 (SDMA) Fetch RAM byte Reset sound output
251 (SDMA) Write sound port Fetch channel 1 wavetable sample
252 V30MZ Fetch channel 2 wavetable sample

Add channel 1 output

253 Fetch channel 3 wavetable sample

Add channel 2 output

254 Fetch channel 4 wavetable sample

Add channel 3 output

255 Add channel 4 output