feat(zaparoo): add native CRT launch mode#1
Conversation
|
Caution Review failedPull request was closed or merged during review 📝 WalkthroughWalkthroughAlt launcher system adds native CRT mode support with environment-based process spawning, framebuffer state management, conditional shutdown behavior, and core-type detection. Input routing and core initialization are updated to integrate the new functionality. ChangesNative CRT Alt Launcher Support
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Tip 💬 Introducing Slack Agent: The best way for teams to turn conversations into code.Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.
Built for teams:
One agent for your entire SDLC. Right inside Slack. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Validation update: Main now launches 3S-ARM CRT mode with fb0 set to RGB565 384x224 (mode: 565 1 384 224 768), keeps status[9] asserted, skips video_fb_enable(1), and restores 960x720 rgb32 on exit. Verified on MiSTer: CORENAME/RBFNAME=3S-ARM, launcher --crt, native writer logs copying RGB565 from /dev/fb0 384x224 to DDR. |
Reduce upstream merge surface and prevent regressions for users without
the Zaparoo core:
- Move is_zaparoo_native_core() / zaparoo_alt_launcher_init_for_core()
out of user_io.cpp into support/zaparoo/alt_launcher.{cpp,h}.
- Drop the temporary "3S-ARM" core-name constant; only "Zaparoo Launcher"
is recognised.
- Drop the CORE_TYPE_UNKNOWN call site (unreachable: the launcher core
uses standard hps_io and identifies as CORE_TYPE_8BIT). Net diff in
user_io.cpp is now a single added function call.
- Gate disable_native_crt_path() on s_native_crt at every call site so
HDMI / non-launcher users never see writes to
/sys/module/MiSTer_fb/parameters/mode, set_vga_fb(0), or status[9]
changes on core load.
- Remove unused s_tty_deadline and the obsolete 384x224 RGB565 dead line
in set_native_crt_fb_mode().
Summary
Adds a Zaparoo native CRT launch path for the new Zaparoo Launcher core
(see
ZaparooProject/Menu_MiSTer).When that core is loaded, Main_MiSTer disables the HPS framebuffer/scaler,
sets
status[9]so the FPGA reads frames from the core's native DDR videoreader, and spawns the alt launcher with
--crt.CRT mode is inferred entirely from the core's reported name — there is no
new MiSTer.ini option. Loading any other core (or running with no Zaparoo
core at all) keeps the existing behaviour unchanged.
End-user setup
MiSTer.inihasALT_LAUNCHER=zaparoo/launcher(path to the launcherbinary) and
FB_TERMINAL=1.e.g.
/media/fat/_Other/Zaparoo_Launcher.rbf. Stockmenu.rbfisnever overwritten. Detection is by core name, not by path, so the RBF
can live wherever the package wants to put it.
bootcore=inMiSTer.inican point at the launcher RBF forautomatic boot. Otherwise the user picks it from the OSD file browser.
When the core loads, Main_MiSTer recognises the reported name
(
Zaparoo Launcher) and brings up the CRT path automatically.Behaviour change for non-Zaparoo users
None. All native-CRT side effects (writes to
/sys/module/MiSTer_fb/parameters/mode,set_vga_fb(0),status[9]toggling) are gated on
s_native_crt, which only becomes true afteralt_launcher_init(true)— itself only callable fromzaparoo_alt_launcher_init_for_core(), which short-circuits unlesscfg.alt_launcher[0] && cfg.fb_terminal && zaparoo_is_native_core().HDMI-only users without
ALT_LAUNCHERconfigured see byte-for-byteidentical behaviour to upstream.
Details
support/zaparoo/alt_launcher.{cpp,h}helperszaparoo_is_native_core()andzaparoo_alt_launcher_init_for_core()(gated on alt-launcher config + fb_terminal + matching core name).
alt_launcher_init()with anative_crtflag./sys/module/MiSTer_fb/parameters/modeto8888 1 320 240 1280(RGBX8888, stride 320×4 = 1280; matchesMenu_MiSTer's
native_video_reader.sv320×240 contract)status[9]video_fb_enable(1)status[9]and the fb mode while the launcher is alive(some cores re-clock the FB after a delay)
ALT_LAUNCHER_CRT=1and execs the launcher with--crtvideo_fb_enable(1)s_native_crtwas set, clearsstatus[9]and restores thedefault 960×720 fb mode
video_fb_enable(0), identical topre-PR behaviour
Upstream merge surface
Per
AGENTS.md, this fork is auto-rebased againstMiSTer-devel/Main_MiSTer. Touching upstream files is minimised:user_io.cpp: +1 line — a single call tozaparoo_alt_launcher_init_for_core()inside the existingCORE_TYPE_8BITelse branch.input.cpp,menu.cpp: untouched by this feature(
menu.cppshows a diff vs fork master only because the PRbranch picked up upstream commit
fca5f11 F7 = Keyboard Map (#1187)via a master merge).
support/zaparoo/alt_launcher.{cpp,h},which is glob-included by the Makefile and has zero conflict
surface against upstream.
Validation
./docker-build.sh(producesbin/MiSTer_Zaparoo, no warnings).s_native_crtmutation is contained and theHDMI/no-launcher path is unchanged.
ALT_LAUNCHERconfigured: cores boot andrun normally.
ALT_LAUNCHER=zaparoo/launcher:launcher starts on VT2 with the HPS framebuffer (non-CRT path).
--crt,status[9]=1visible in core, native 320×240 RGBX8888 videoreaches CRT.
Summary by CodeRabbit
Release Notes
New Features
Improvements