Commit 50bf5cc
committed
feat: dual-mode menu core with switchable native FB reader
Adds a runtime-switchable "FB mode" alongside the original menu behavior.
When status[9]=0 (default), the menu core renders the original cosine+LFSR
pattern through the unchanged PAL/NTSC scandoubler timing — every existing
menu surface (HDMI wallpaper compositor, OSD, F1 wallpaper cycle) keeps
working. When status[9]=1, native_video_top takes over and feeds VGA from
the 320x240 RGBX8888 framebuffer the HPS-side launcher writes into DDR.
Carried forward from codex/zaparoo-rgbx8888-native-core (PR #2):
- rtl/native_video_reader.sv — DDR burst reader with ping-pong buffers
- rtl/native_video_timing.sv — 320x240 NTSC native CRT timing
- rtl/native_video_top.sv — wrapper
- PLL output1 20 MHz -> 27.027 MHz (required for 15.734 kHz NTSC line rate)
Deliberately NOT carried forward — preserves original menu functionality:
- CONF_STR title stays "MENU" (so is_menu() in Main_MiSTer still matches,
F1 wallpaper cycling still works)
- VIDEO_ARX/ARY stay 0/0 (no aspect-ratio change in cosine mode)
- PAL/NTSC scandoubler ce_pix logic intact
- Original cosine HV counters intact
Mux on status[9] & native_active, with fallback to the cosine path until
the first DDR frame is loaded so the output is never undriven.
The DDR clear loop is removed — it was one-time boot scaffolding using the
same DDRAM_* signals the native reader now owns. native_video_reader holds
ddr_rd/ddr_we low when status[9]=0, so DDR is unused in the default mode.1 parent 5c09db7 commit 50bf5cc
6 files changed
Lines changed: 592 additions & 33 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
3 | 2 | | |
4 | 3 | | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
5 | 7 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
336 | 336 | | |
337 | 337 | | |
338 | 338 | | |
339 | | - | |
340 | | - | |
341 | | - | |
| 339 | + | |
342 | 340 | | |
343 | 341 | | |
344 | 342 | | |
345 | 343 | | |
346 | 344 | | |
347 | | - | |
348 | | - | |
349 | | - | |
350 | | - | |
351 | | - | |
352 | | - | |
353 | | - | |
354 | | - | |
355 | | - | |
356 | | - | |
357 | | - | |
358 | | - | |
359 | | - | |
360 | | - | |
361 | | - | |
362 | | - | |
363 | | - | |
364 | | - | |
365 | | - | |
366 | | - | |
367 | | - | |
368 | | - | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
369 | 348 | | |
370 | 349 | | |
371 | 350 | | |
| |||
550 | 529 | | |
551 | 530 | | |
552 | 531 | | |
553 | | - | |
554 | | - | |
555 | | - | |
556 | | - | |
557 | | - | |
558 | | - | |
| 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 | + | |
559 | 585 | | |
560 | 586 | | |
0 commit comments