diff --git a/support/zaparoo/alt_launcher.cpp b/support/zaparoo/alt_launcher.cpp index facab9f92..127aca6fc 100644 --- a/support/zaparoo/alt_launcher.cpp +++ b/support/zaparoo/alt_launcher.cpp @@ -390,6 +390,14 @@ static void zero_native_crt_words(void) shmem_unmap(p, map_size); } +// The menu core's native video reader activates on any non-zero control word +// at 0x3A000000 and that core no longer clears DDR on startup, so a previous +// core's leftovers make it scan out garbage instead of its noise background. +void zaparoo_native_video_release(void) +{ + zero_native_crt_words(); +} + static void clear_launcher_tty(void) { int tty_fd = open(s_tty_path, O_WRONLY | O_CLOEXEC); @@ -1187,6 +1195,9 @@ void alt_launcher_poll(void) void alt_launcher_shutdown(void) { fflush(stdout); + // Every FPGA reconfiguration passes through here, so the incoming core + // cannot inherit a stale native video control block. + zero_native_crt_words(); if (!s_pid) { // installed(): orphans from a previous Main hold fb0/tty7 regardless diff --git a/support/zaparoo/alt_launcher.h b/support/zaparoo/alt_launcher.h index 034ebdd60..27c57dcc7 100644 --- a/support/zaparoo/alt_launcher.h +++ b/support/zaparoo/alt_launcher.h @@ -62,3 +62,5 @@ bool zaparoo_is_native_core(void); void zaparoo_alt_launcher_init_for_core(void); void zaparoo_alt_launcher_init_for_menu(void); void zaparoo_alt_launcher_start_for_menu(void); +// Parks the menu core on its own background until a writer publishes frames. +void zaparoo_native_video_release(void); diff --git a/user_io.cpp b/user_io.cpp index ea36d28c4..9276855ea 100644 --- a/user_io.cpp +++ b/user_io.cpp @@ -1573,6 +1573,7 @@ void user_io_init(const char *path, const char *xml) else if (is_menu()) { user_io_status_set("[4]", (cfg.menu_pal) ? 1 : 0); + zaparoo_native_video_release(); if (alt_launcher_configured()) { if (rbf_path[0] || !zaparoo_is_native_core()) zaparoo_alt_launcher_init_for_menu();