Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tweaking OpenBIOS' fastboot to work with cheat roms. #1465

Merged
merged 1 commit into from
Nov 22, 2023
Merged
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
7 changes: 5 additions & 2 deletions src/mips/openbios/shell/shell.c
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,13 @@ int startShell(uint32_t arg) {
}
#endif
#ifdef OPENBIOS_FASTBOOT
return 0;
// Embed a simple jr $ra / nop to simulate a shell being copied and run,
// so cheat cart hooks and other tricks can still work properly.
static const uint32_t dummy[2] = {0x03e00008, 0};
memcpy((uint32_t *)0x80030000, dummy, sizeof(dummy));
#else
memcpy((uint32_t *)0x80030000, _binary_shell_bin_start, _binary_shell_bin_end - _binary_shell_bin_start);
#endif
flushCache();
return ((int (*)(int))0x80030000)(arg);
#endif
}