Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions support/zaparoo/alt_launcher.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions support/zaparoo/alt_launcher.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
1 change: 1 addition & 0 deletions user_io.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down