Commit 9493a84
Read the object's high tile byte one dot after the fetch
The mode-3 object fetch read both tile-data bytes during its fixed
6-cycle window. On hardware the high byte is read one dot after the
fetch's last cycle (SameBoy reads it with during_object_fetch already
cleared), so a mid-mode-3 write to LCDC.2 (sprite height) or the tile
that lands on that dot affects the high byte alone. Deferring the high
read by one dot halves the residual of m3_lcdc_obj_size_change (45->30)
and m3_lcdc_obj_size_change_scx (90->30); baselines tightened.
The object fetch still occupies the same six cycles and advances the
pixel machine identically, so the sprite-stall timing pinned by
intr_2_mode0_timing_sprites is unchanged (mooneye still green).
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01J1wLWscyUGS7CFwc3CjJR81 parent 0a9d4e4 commit 9493a84
2 files changed
Lines changed: 46 additions & 36 deletions
File tree
- core/src
- main/java/eu/rekawek/coffeegb/core/gpu/phase
- test/java/eu/rekawek/coffeegb/core/integration/mealybug
Lines changed: 44 additions & 34 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
110 | 110 | | |
111 | 111 | | |
112 | 112 | | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
113 | 119 | | |
114 | 120 | | |
115 | 121 | | |
| |||
157 | 163 | | |
158 | 164 | | |
159 | 165 | | |
| 166 | + | |
| 167 | + | |
160 | 168 | | |
161 | 169 | | |
162 | 170 | | |
| |||
203 | 211 | | |
204 | 212 | | |
205 | 213 | | |
206 | | - | |
| 214 | + | |
207 | 215 | | |
208 | 216 | | |
209 | 217 | | |
| |||
235 | 243 | | |
236 | 244 | | |
237 | 245 | | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
238 | 260 | | |
239 | 261 | | |
240 | 262 | | |
| |||
343 | 365 | | |
344 | 366 | | |
345 | 367 | | |
346 | | - | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
347 | 371 | | |
348 | 372 | | |
349 | 373 | | |
| 374 | + | |
350 | 375 | | |
351 | 376 | | |
352 | 377 | | |
353 | 378 | | |
| 379 | + | |
354 | 380 | | |
355 | 381 | | |
356 | 382 | | |
| |||
359 | 385 | | |
360 | 386 | | |
361 | 387 | | |
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 | | - | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
394 | 404 | | |
395 | 405 | | |
396 | 406 | | |
| |||
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
40 | | - | |
41 | | - | |
| 40 | + | |
| 41 | + | |
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
| |||
0 commit comments