Fix emulator build script, UI rendering, and clean up repo

This commit is contained in:
Adolfo Reyna
2026-02-17 21:49:49 -05:00
parent 6d29e99394
commit b0ca1f1a55
9 changed files with 693 additions and 526 deletions

View File

@@ -173,7 +173,7 @@ bool SerialUploader::complete_launch() {
return launched;
}
bool SerialUploader::process() {
bool SerialUploader::process(bool spi_busy) {
if (state == IDLE) {
// Check for "UPLOAD" command
int c = getchar_timeout_us(0);
@@ -311,6 +311,9 @@ bool SerialUploader::process() {
}
if (state == WRITING_FILE) {
// Wait if SPI bus is busy (e.g. display refresh in progress on other core)
if (spi_busy) return false;
if (write_file_to_sd()) {
state = LAUNCHING_GAME;
// Prepare for launch by scanning games, but don't actually launch yet

View File

@@ -12,7 +12,8 @@ public:
// Process incoming serial data (call this frequently in main loop)
// Returns true if a game was launched
bool process();
// spi_busy: set to true if SPI bus is currently in use by another core (e.g. display refresh)
bool process(bool spi_busy = false);
// Check if uploader wants to launch a game (after upload complete)
bool wants_to_launch_game() const { return state == LAUNCHING_GAME; }