You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: ZAPAROO_FORK.md
+22-22Lines changed: 22 additions & 22 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -20,23 +20,23 @@ non-blocking spawn) are intentionally omitted.
20
20
21
21
| # | Cluster | Purpose | Where it lives |
22
22
|---|---------|---------|----------------|
23
-
| 1 |**External launcher process management**| Spawn `zaparoo/launcher` via `agetty` on tty2; SIGTERM/SIGKILL on shutdown; bounded `waitpid`; respawn timer; 3-strike crash give-up |`support/zaparoo/alt_launcher.cpp` (`spawn`, `kill_launcher`, `alt_launcher_poll`, `return_to_normal_mode`) |
24
-
| 2 |**Process discovery & gating**|`alt_launcher_configured()` = file exists at `zaparoo/launcher` (cached, with sticky escape bit); `alt_launcher_active()` = process running |`support/zaparoo/alt_launcher.cpp:34-43,329-332`|
23
+
| 1 |**External frontend process management**| Spawn `zaparoo/frontend` via `agetty` on tty2; SIGTERM/SIGKILL on shutdown; bounded `waitpid`; respawn timer; 3-strike crash give-up |`support/zaparoo/alt_launcher.cpp` (`spawn`, `kill_launcher`, `alt_launcher_poll`, `return_to_normal_mode`) |
24
+
| 2 |**Process discovery & gating**|`alt_launcher_configured()` = file exists at `zaparoo/frontend` (cached, with sticky escape bit); `alt_launcher_active()` = process running |`support/zaparoo/alt_launcher.cpp:34-43,329-332`|
25
25
| 3 |**Custom menu RBF discovery**|`menu_rbf_name()` / `is_menu_rbf()` so a Zaparoo build can ship its own renamed menu RBF and the file_io / fpga_io / user_io paths still recognize it |`support/zaparoo/menu_rbf.cpp/.h`; consumers in `file_io.cpp`, `fpga_io.cpp`, `user_io.cpp`|
26
26
| 4 |**Forced cfg overrides**|`alt_launcher_cfg_apply()` forces `cfg.fb_terminal = 1; cfg.recents = 1` after INI parse. Original `ALT_LAUNCHER` / `MENU_RBF` INI knobs were dropped in favor of file-existence detection |`cfg.cpp:614`, `support/zaparoo/alt_launcher.cpp:24-30`|
27
27
| 5 |**Polling integration**|`alt_launcher_poll()` driven by main scheduler tick |`scheduler.cpp:36`, `support/zaparoo/alt_launcher.cpp:365`|
28
-
| 6 |**TTY / framebuffer hygiene**| Clear/reset tty2 around launcher lifecycle; toggle `video_fb_enable` and `video_chvt` only on respawn paths; don't touch them on plain shutdown |`support/zaparoo/alt_launcher.cpp` (`clear_launcher_tty`, `reset_launcher_tty`) |
29
-
| 7 |**Joypad routing into launcher**|`alt_launcher_fb_terminal_key()` translates `JOY_L2/R2/OSD` to `KEY_F1/BACKSPACE/MENU`; `joy_digital()` short-circuits to `uinp_send_key` when launcher active |`input.cpp:2475-2484`, `support/zaparoo/alt_launcher.cpp:45-62`|
30
-
| 8 |**Native CRT rendering path**|Launcher running in CRT mode: kernel framebuffer at 320×240 RGBA8888, FPGA scans separate region at `0x3A000000`, `status[9]=1` gates it; pre-spawn blank wipes the prior frame |`support/zaparoo/alt_launcher.cpp` (`enable_native_crt_path`, `disable_native_crt_path`, `blank_native_crt_fb`); paired with `Menu_MiSTer/rtl/native_video_*.sv`|
28
+
| 6 |**TTY / framebuffer hygiene**| Clear/reset tty2 around frontend lifecycle; toggle `video_fb_enable` and `video_chvt` only on respawn paths; don't touch them on plain shutdown |`support/zaparoo/alt_launcher.cpp` (`clear_launcher_tty`, `reset_launcher_tty`) |
29
+
| 7 |**Joypad routing into frontend**|`alt_launcher_fb_terminal_key()` translates `JOY_L2/R2/OSD` to `KEY_F1/BACKSPACE/MENU`; `joy_digital()` short-circuits to `uinp_send_key` when frontend active |`input.cpp:2475-2484`, `support/zaparoo/alt_launcher.cpp:45-62`|
30
+
| 8 |**Native CRT rendering path**|Frontend running in CRT mode: kernel framebuffer at 320×240 RGBA8888, FPGA scans separate region at `0x3A000000`, `status[9]=1` gates it; pre-spawn blank wipes the prior frame |`support/zaparoo/alt_launcher.cpp` (`enable_native_crt_path`, `disable_native_crt_path`, `blank_native_crt_fb`); paired with `Menu_MiSTer/rtl/native_video_*.sv`|
31
31
| 9 |**CRT mode persistence**| 1-byte `zaparoo_launcher_crt.bin` via `FileSaveConfig` / `FileLoadConfig`; loaded at menu init, applied on spawn |`support/zaparoo/alt_launcher.cpp:76-89,344,499`|
32
32
| 10 |**Native-core auto-init**|`zaparoo_is_native_core()` matches core name `"Zaparoo Launcher"`; `zaparoo_alt_launcher_init_for_core()` auto-spawns when the FPGA loads that core |`support/zaparoo/alt_launcher.cpp:480-495`, `user_io.cpp:1543`|
33
-
| 11 |**In-core "Launcher" OSD entry**| Adds row 31 (`ALT_LAUNCHER_MENUSUB`) to MENU_COMMON1 marked with `reboot_req` when activated |`menu.cpp:2831,2845-2849,3088-3091`|
34
-
| 12 |**OSD/F12 overlay over running launcher**| F12 / `KEY_MENU` reaches the OSD even with launcher running; on menu core opens System Settings directly (skip file picker); F1/F9 disabled when launcher active; `vga_nag` suppressed; auto-open suppressed in CRT mode |`menu.cpp:843-852,1289,1304-1311,1334,1583,1604-1611,6727,6739,6816,6901`, `user_io.cpp:4162-4171`|
33
+
| 11 |**In-core "Frontend" OSD entry**| Adds row 31 (`ALT_LAUNCHER_MENUSUB`) to MENU_COMMON1 marked with `reboot_req` when activated |`menu.cpp:2831,2845-2849,3088-3091`|
34
+
| 12 |**OSD/F12 overlay over running frontend**| F12 / `KEY_MENU` reaches the OSD even with frontend running; on menu core opens System Settings directly (skip file picker); F1/F9 disabled when frontend active; `vga_nag` suppressed; auto-open suppressed in CRT mode |`menu.cpp:843-852,1289,1304-1311,1334,1583,1604-1611,6727,6739,6816,6901`, `user_io.cpp:4162-4171`|
35
35
| 13 |**Trimmed System Settings render**|`alt_launcher_render_system_menu()` overrides MENU_SYSTEM1 body for the alt-launcher path; `alt_launcher_translate_system_select()` maps trimmed menusub indices (Remap, Define joy, Scripts, Reboot, Exit) to upstream dispatch slots |`support/zaparoo/alt_launcher_menu.cpp`, `menu.cpp:6739-6745,6816-6821`|
36
-
| 14 |**Right-side Zaparoo Launcher pages (two-page)**| Right-arrow from System Settings enters `MENU_ZAPAROO_LAUNCHER1/2` (top page: Video, Exit). Selecting Video enters `MENU_ZAPAROO_VIDEO1/2` (sub-page: CRT mode, H Offset, V Offset, Exit) where left/right adjust values and `±` also work. Both pages live in one helper file with split renderers / select handlers per page |`support/zaparoo/launcher_pages.cpp/.h` (`launcher_page_*`, `video_page_*`), `support/zaparoo/alt_launcher.cpp` (offset state + setters), `menu.cpp``MENU_ZAPAROO_LAUNCHER*` and `MENU_ZAPAROO_VIDEO*` cases |
36
+
| 14 |**Right-side Zaparoo Frontend pages (two-page)**| Right-arrow from System Settings enters `MENU_ZAPAROO_LAUNCHER1/2` (top page: Video, Exit). Selecting Video enters `MENU_ZAPAROO_VIDEO1/2` (sub-page: CRT mode, H Offset, V Offset, Exit) where left/right adjust values and `±` also work. Both pages live in one helper file with split renderers / select handlers per page |`support/zaparoo/launcher_pages.cpp/.h` (`launcher_page_*`, `video_page_*`), `support/zaparoo/alt_launcher.cpp` (offset state + setters), `menu.cpp``MENU_ZAPAROO_LAUNCHER*` and `MENU_ZAPAROO_VIDEO*` cases |
37
37
| 15 |**H/V offset persistence and push**| 2-byte `zaparoo_video_offsets.bin` via `FileSaveConfig` / `FileLoadConfig`; loaded at menu init alongside the CRT byte; values pushed to FPGA via `user_io_status_set("[13:10]" / "[17:14]")` so the change takes effect immediately |`support/zaparoo/alt_launcher.cpp` (`load_persisted_offsets`, `save_persisted_offsets`, `alt_launcher_set_h_offset`/`_v_offset`, `zaparoo_alt_launcher_init_for_menu`) |
38
-
| 16 |**OSD auto-dismiss on launcher spawn**|`spawn()` calls `MenuHide()` after fork so an OSD still up from CRT toggle / Reboot doesn't trap input once the launcher grabs the input device |`support/zaparoo/alt_launcher.cpp` (end of `spawn`) |
39
-
| 17 |**CRT-mode-on-exit safety**| If the launcher exits while in CRT mode (clean or crashed), drop back to HDMI / normal mode for the rest of this session instead of respawning into CRT — avoids a UX trap where the user just left CRT but the launcher would respawn into it. Persisted preference is left untouched so next reboot honors it |`support/zaparoo/alt_launcher.cpp``alt_launcher_poll()` post-`waitpid` branch |
38
+
| 16 |**OSD auto-dismiss on frontend spawn**|`spawn()` calls `MenuHide()` after fork so an OSD still up from CRT toggle / Reboot doesn't trap input once the frontend grabs the input device |`support/zaparoo/alt_launcher.cpp` (end of `spawn`) |
39
+
| 17 |**CRT-mode-on-exit safety**| If the frontend exits while in CRT mode (clean or crashed), drop back to HDMI / normal mode for the rest of this session instead of respawning into CRT — avoids a UX trap where the user just left CRT but the frontend would respawn into it. Persisted preference is left untouched so next reboot honors it |`support/zaparoo/alt_launcher.cpp``alt_launcher_poll()` post-`waitpid` branch |
40
40
| 18 |**Escape-to-stock semantics**| Sticky `s_escaped` flag makes `alt_launcher_configured()` return `false` after a clean exit, so the rest of the session reverts to stock OSD; reboot resets it |`support/zaparoo/alt_launcher.cpp:32,38-43,229-241`|
0 commit comments