Commit 5db804a
committed
feat: broadcast-geometry native video with PAL and 480i modes
Implements the FPGA side of docs/native-video-plan.md (all phases; the
zaparoo-launcher side comes separately).
- PLL output 1 retargeted 27.027027 -> 27.000000 MHz, giving exact NTSC
(15734.27 Hz) and PAL (15625.00 Hz) line rates.
- native_video_timing rebuilt around per-mode parameter sets: 352x240p60
(Switchres ntsc porches), 720x480i60 (CEA-861, 262+263-line fields with
half-line vsync offset on the odd field), 352x288p50 (Switchres pal).
Mode and trims latch at the field wrap; offsets clamp to -8..+8 px /
-8..+2 lines. Field flips at the start of vblank so the reader's line
preload always fetches the parity about to be displayed.
- native_video_reader parses DDR control word1: magic 0x5A50 selects the
v2 layout (buffers +0x1000/+0x180000, tight stride) and carries mode and
h/v offsets; without magic the legacy 320x240 layout is scanned centered
with 16-px side bars. word0 == 0 and DDR timeouts now clear frame_ready
so the core reverts to the noise pattern instead of scanning a dead
buffer. 480i fetches source line 2*line+field as two 180-beat bursts;
line FIFO deepened to 1024 words for the interlaced 2-line preload.
- menu.sv: OSD video options removed (CONF_STR back to stock), ce_pix
divider switches /4 / /2 by mode, VGA_F1 driven by the field bit.
- Self-checking iverilog testbenches in tb/ (run via tb/run.sh) verify all
mode timings in exact pixel ticks, the half-line interlace (both vsync
intervals exactly 262.5 lines), offset clamping, the v2/legacy fetch
sequences, double buffering, writer-stop reversion, and timeout recovery.
- Readme documents the native video output and the forced_scandoubler /
vga_scaler=1 note.1 parent 3a19e6d commit 5db804a
11 files changed
Lines changed: 1449 additions & 130 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
3 | 16 | | |
4 | 17 | | |
5 | 18 | | |
| |||
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
185 | 185 | | |
186 | 186 | | |
187 | 187 | | |
188 | | - | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
189 | 191 | | |
190 | 192 | | |
191 | 193 | | |
| |||
207 | 209 | | |
208 | 210 | | |
209 | 211 | | |
210 | | - | |
211 | | - | |
212 | | - | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
213 | 215 | | |
214 | 216 | | |
215 | 217 | | |
216 | | - | |
217 | | - | |
218 | | - | |
219 | 218 | | |
220 | 219 | | |
221 | 220 | | |
| |||
348 | 347 | | |
349 | 348 | | |
350 | 349 | | |
351 | | - | |
352 | | - | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
353 | 353 | | |
354 | 354 | | |
355 | 355 | | |
| |||
460 | 460 | | |
461 | 461 | | |
462 | 462 | | |
463 | | - | |
464 | 463 | | |
465 | 464 | | |
466 | 465 | | |
467 | | - | |
468 | | - | |
469 | | - | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
470 | 472 | | |
471 | 473 | | |
472 | 474 | | |
473 | 475 | | |
474 | 476 | | |
475 | | - | |
| 477 | + | |
476 | 478 | | |
477 | 479 | | |
478 | 480 | | |
479 | 481 | | |
480 | | - | |
481 | | - | |
482 | | - | |
483 | | - | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
484 | 485 | | |
485 | 486 | | |
486 | 487 | | |
| |||
489 | 490 | | |
490 | 491 | | |
491 | 492 | | |
| 493 | + | |
492 | 494 | | |
493 | 495 | | |
494 | 496 | | |
| |||
518 | 520 | | |
519 | 521 | | |
520 | 522 | | |
521 | | - | |
522 | | - | |
523 | | - | |
524 | | - | |
525 | | - | |
526 | | - | |
527 | | - | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
528 | 526 | | |
529 | 527 | | |
530 | | - | |
531 | | - | |
| 528 | + | |
| 529 | + | |
532 | 530 | | |
533 | 531 | | |
534 | 532 | | |
| |||
550 | 548 | | |
551 | 549 | | |
552 | 550 | | |
553 | | - | |
554 | | - | |
| 551 | + | |
| 552 | + | |
| 553 | + | |
555 | 554 | | |
556 | | - | |
557 | | - | |
| 555 | + | |
| 556 | + | |
558 | 557 | | |
559 | 558 | | |
560 | 559 | | |
| |||
0 commit comments