Dev portable 1#3
Merged
Merged
Conversation
Integration
When PRG32_PIN_BUZZER is not defined (< 0, e.g., in QEMU/desktop targets), calls to prg32_audio_tone() and prg32_audio_sample_u8() would previously return instantly. This not only prevented audio playback but completely bypassed vTaskDelay(), causing severe timing issues in game loops (such as infinite firing speed in wing_commander). This commit resolves both issues by routing tones to the I2S synth engine: - A new `hz_to_midi_note()` helper converts requested frequencies to the closest matching MIDI note. - The fallback exactly mimics the setup menu's audio test tune, registering the `setup_audio_wave` sine wave to sample ID 63 and instrument ID 31. - Tones are then played via `prg32_audio_note_on` and `prg32_audio_note_off`. - `vTaskDelay()` is now strictly enforced for both tone and sample playback, guaranteeing that games maintain correct timing even if audio is disabled. Additionally, a basic square wave (`builtin_beep_wave`) was included under an `#if 0` block as an optional reference for a traditional "buzzer" sound.
fix: restored screen working configurations
fix: diffs with old working repo
Audio fix
fix: set PRG32_PIN_RGB_LED to 8
Aligned entire repository to new QEMU flash image 'qemu_flash.bin'
… to BSSID This commit resolves an issue where the ESP32-C6 was caught in a loop of connection timeouts (Reason 201 NO AP FOUND) on borderline weak signals because it was scanning blindly too fast and failing to lock onto the AP. Changes included: - Increased active scan dwell time (min=100ms, max=300ms) in the initial `scan_networks` pass to reliably discover borderline networks. - Removed the strict `selected_ap_locked` condition in `prg32_wifi_start_mode` so the connection sequence correctly utilizes the target channel and BSSID explicitly discovered during the boot scan. - Explicitly set `WIFI_ALL_CHANNEL_SCAN` and `WIFI_CONNECT_AP_BY_SIGNAL` in the connection configuration to ensure maximum reliability. These changes allow the framework to isolate the router's beacons out of the noise floor, skipping blind channel hopping and connecting instantly.
This commit ensures the firmware falls back to a default, known Cartridge Store server address if no mDNS service or saved URL is available. Changes included: - Added `PRG32_STORE_SERVER_URL` macro definition in `prg32_config.h`. - Initialized NVS explicitly in `prg32_init()` to allow writing the default Store URL into the flash storage immediately upon boot. - Added a fallback in `prg32_setup_store.c` to gracefully use the default URL if the user actively clears the saved NVS configuration and proceeds straight to the browse menu.
RAM Optimization, Cartridge Store and Wi-Fi Stability
- Wraps WiFi credentials in `prg32_config.h` with `#ifndef` and conditionally includes `prg32_env.h` - Adds `prg32_env.h` to `.gitignore` to prevent committing secrets - Provides `prg32_env.h.example` as a template for local overrides
feat: add local environment file support for WiFi credentials
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.