8000 V0.6.0 develop by axgdev · Pull Request #10 · axgdev/UniFrog · GitHub
[go: up one dir, main page]

Skip to content

V0.6.0 develop - #10

Merged
axgdev merged 28 commits into
mainfrom
v0.6.0-develop
Aug 20, 2026
Merged

axgdev merged 28 commits into
mainfrom
v0.6.0-develop

Conversation

@axgdev
@axgdev axgdev commented Aug 19, 2026 •
Copy link
Copy Markdown
Owner

Summary

Merge the v0.6.0 development stack into main.

This brings the native SF2000/GB300 runtime, frontend, libretro host, media support, fastboot flow, reproducible dependency setup, and QEMU validation workflow together as a cohesive release foundation.

Compared with main, this branch contains 25 commits and the large source reorganization into apps, foundation, components, include, mk, and tools.

Main changes

  • Introduce the native device frontend:

    • SD-root browsing through Explore.
    • Folder and file navigation with system heuristics.
    • Core registry, associations, favorites, history, settings, themes, languages, and reader UI.
    • External core validation and improved blueMSX packaging.
    • Stable high-performance SD policy; battery warnings no longer switch SD modes.
  • Add the complete libretro host/runtime:

    • Core loading and module lifecycle management.
    • Save-state handling, content loading, archive support, pacing, menu integration, and launch diagnostics.
    • Expanded pinned core manifest with additional systems and Prosty/FrogUI variants.
    • QPSX uses the public frog2k-qpsx main_unifrog branch without a local patch queue.
  • Add native media support:

    • HCRTOS/FFmpeg integration.
    • Buffered file I/O, direct audio paths, video buffering, seek recovery, and media diagnostics.
    • LZ4, stb, NanoSVG, zlib, zstd, and libchdr are managed as explicit pinned dependencies.
  • Reorganize and harden boot:

    • Fastboot handoff and staged ASD loading.
    • Board detection and diagnostic handoff records.
    • Improved boot-trace checkpoints around GE, module, frontend, and first-frame startup.
    • Preserved bootloader clock/GE handoff state.
  • Make builds reproducible and faster:

    • Download and verify the frog-toolchain automatically.
    • Centralize build options and dependency pins.
    • Improve tokenized build stamps and incremental rebuild behavior.
    • Preserve parallel jobserver behavior in nested builds.
    • Move JS2300 to the public frog2k-javascript main_unifrog branch.
  • Add validation and release infrastructure:

    • Host-side component tests.
    • Architecture, layout, dependency, frontend, and core-manifest checks.
    • QEMU smoke workflow and build/package checks.
    • Expanded documentation, source ownership guidance, licensing, and onboarding notes.

Dependency updates

  • frog2k-javascript: public main_unifrog, pinned to b9dc3d3.
  • frog2k-qpsx: public main_unifrog, pinned to 12a161f.
  • unifrog-hcrtos-sdk: updated to d319f16.

Validation

  • make check JOBS=4 passes.
  • The complete core/module build and ASD validation pass.
  • Public dependency branches are fetched and checked out by immutable commit.
  • QEMU and physical-device smoke testing should be run as release-gate validation.

axgdev added 28 commits August 10, 2026 18:05
Chain-boot runs 201 and 202 reached storage and FRONTEND_BEGIN without an exception, but that marker precedes directory setup, wireless input, the second framebuffer open, GE rendering, and the event loop.  It therefore could not distinguish a working menu from the observed second-logo freeze.\n\nAdd retained checkpoints around each native startup phase and around the first GE fill, sync, framebuffer pan, and loop iteration.  Include return values, buffer state, and launcher item count in the existing trace arguments.  The bounded retained buffer preserves the initial sequence even after later frames fill it.\n\nEvidence: make quick-check and make verify pass.  Under QEMU, both direct boot and NuttX-chain ASD/BIN paths reach UI_OPEN_DONE, populate eight launcher items, complete GE fill/sync/pan with zero return codes, and return from the first loop iteration.\n\nRisk is diagnostic overhead during the first few frontend frames; functional ordering and fallback behavior are unchanged.  Revert this commit to return to the v0.5.2 trace surface.
Physical runs 207 and 208 proved that ROM remount, storage adoption, log reset, the first large log writes, theme loading, and wireless initialization all complete.  The visible second logo was therefore not the failure site.  Recovery still reported only event 108 because boot trace updates remained dirty in HCRTOS cache.

Flush each appended retained trace prefix and add boundaries around local and wireless input completion, input clearing, boot-ok marker creation, and UI opening.  Also avoid probing the pending-version path twice while recording the boot-ok write result.

Verification: make quick-check TOOLCHAIN=/root/toolchain/mipsel-mti-elf and make verify TOOLCHAIN=/root/toolchain/mipsel-mti-elf passed, including the final link-layout and fastboot ASD checks.  Reverting this commit removes only the additional retained diagnostics and the duplicate pending-path cleanup.
Physical ASD and BIN runs 211/212 produce the same durable trace: frontend setup and UI open complete, then the first frame stops after ui.begin and before ge_fill.done while the second boot logo remains scanned out. This proves hcge_fill_rect is blocking on inherited GE ownership rather than a filesystem, input, or panel failure.

The native menu already CPU-renders all text, icons, and list rows. Make its occasional 320x240 background clear use the same bounded CPU renderer and do not open or synchronize HCGE from the menu. GE remains available to emulator and media presenter paths where acceleration is material. Add a persistent ui_fill.done boundary for physical confirmation.

Evidence: quick-check and full verify pass with the MIPS toolchain, including native frontend checks, firmware link/layout audit, and fastboot ASD validation. The expected cost is a bounded 150 KiB software clear only when the menu redraws; rollback is this commit.
The CPU fill in 8768455 isolated the physical freeze but was only a diagnostic workaround. Runs 215-217 prove that workaround reaches the menu, while bootloader/QEMU investigation identifies the actual ownership defect: NuttX held the shared GE reset for microseconds although hcRTOS HCGE_RESET holds it for 10 ms.

Restore the normal hcGE open, fill, sync, and present sequence. Preserve the durable ui_fill.done marker on both the accelerated success path and the bounded CPU fallback so future physical logs distinguish successful GE work from fallback rendering.

Evidence: make quick-check and make verify pass with TOOLCHAIN=/root/toolchain/mipsel-mti-elf. The bootloader handoff smoke reaches repeated GE-backed frames for both UniFrog ASD and BIN when paired with the corrected 10 ms handoff reset. Risk is confined to exposing the shared GE again; rollback is this commit, while the preferred rollback point for the complete fix includes the paired bootloader reset change.
Add retained phase markers around the first hcRTOS GE operation: queue allocation/open, surface setup, state construction, vendor submission entry, and submission return. The previous physical traces stopped at ui.begin, which only proved the CPU was blocked somewhere inside hcge_fill_rect. These markers distinguish queue construction, the direct vendor doorbell, and the later sync/present path without changing rendering or adding a CPU fallback. Record the GE queue addresses and first/last words so a physical trace can be compared with QEMU's strict queue model. Advance the SDK submodule to the deferred-IRQ-registration fix.

Evidence: runs 225 and 226 both retain the second logo and stop before ge_fill.done; Linux run 227 reaches userspace with the same handoff. The strict QEMU ASD/BIN smoke now reaches ge_submit.done, ge_fill.done, ge_sync.done, presentation, and the menu loop with no GE errors. Risk: retained trace slots are finite and the new markers consume five entries per first frame; rollback is this commit's parent, while the SDK fix has its own commit.
Treat raw GE selector 3 as an ownership contract shared by the bootloader, Linux, NuttX, and the vendor hcge reset. Normal UI startup already inherits that source; document the reason and keep a software mirror in the GE wrapper so an idempotent selector-3 request cannot issue a live HCGE_SET_CLOCK ioctl. Update the API documentation to distinguish inherited startup from explicit runtime changes.

Evidence: vanilla UniFrog v0.5.2 changed selector 3 to selector 0 from unifrog_ui_open() before its first doorbell, which wedges physical HC15xx GE. The corrected path opens the vendor context without that transition.

Verification: make doctor, make quick-check, make, make verify with the MIPS toolchain; sf2000_bootloader make qemu-unifrog-handoff-smoke with ASD and BIN artifacts.

Risk and rollback: the public struct gains two bookkeeping fields and explicit runtime selector changes retain their existing ioctl path. Reverting this commit restores the previous wrapper behavior without changing the bootloader handoff ABI. Generated outputs and the dirty SDK submodule are intentionally not committed.
The GE IRQ-registration fix (4dfac9a) is now on the SDK origin main, and
the follow-up gitignore commit (ceba458) stops kernel/build/ from making
the submodule appear modified for untracked content.  Pin the submodule
to the new SDK main head so a fresh clone stays clean.
Remove the repository-owned JS2300 and MQuickJS source trees and fetch the pinned frog2k-javascript repository instead. The standalone checkout owns MQuickJS and the runtime build, while UniFrog supplies the platform host callbacks, including complete-file reads for targets without a reliable stdio fallback. Update setup, diagnostics, pin reporting, and documentation to use checkout-local Frog Toolchain v1.3.2 newlib paths and eliminate the old JS bootstrap. Separate compiler optimization from direct linker optimization because binutils 2.47 correctly rejects the compiler-only -Os spelling when ld is invoked directly.\n\nEvidence:\n- make deps-js2300\n- make -j8 js2300-check\n- make -j8 check\n\nThe full check completed successfully, including firmware, core modules, packaging, and layout checks. The backup branch backup/260813_improvements0-before-frog2k-javascript-20260819 remains the rollback point.
Update the standalone JS2300 pin to 124170281bafaafee64522d40d2175803b09c091 and use a normal shallow clone so the fresh dependency checkout is clean before the pin guard runs. This keeps the standalone fetch deterministic without treating the valid no-checkout index state as local edits.\n\nEvidence:\n- make deps-js2300\n- make -j8 js2300-check\n- make -j8 check\n\nThe full firmware and layout c
8000
heck completed successfully.
Move UniFrog to frog2k-javascript 0f22b45c679ef116c9f1c8d04812c19c10cfb645 and report standalone versus extension execution through JS2300.mode(). The platform adapter remains responsible for HCRTOS storage and display callbacks; the runtime stays OS-neutral.

Evidence: git diff --check; make deps-js2300; make -j8 js2300-check; make -j8 check. Risk is limited to the fetched runtime pin and host-table wiring; rollback is this commit.
Document JS2300.mode() alongside the common scripting API so UniFrog scripts can distinguish standalone and extension execution contexts.

Evidence: git diff --check; the runtime and UniFrog build checks already pass at the pinned standalone commit. Risk is documentation-only; rollback is this commit.
Port the current mufrog-commandc source layout, frontend, media/runtime services, diagnostics, expanded libretro core set, and the matching unifrog-hcrtos-sdk gitlink into the protected integration branch.\n\nReplace the in-tree MQuickJS/buildroot assumptions with the pinned frog-toolchain v1.3.2 release archives and the standalone frog2k-javascript checkout. Keep all dependency, SDK, toolchain, build, and output paths overrideable so a clean checkout can be built without /opt state.\n\nKeep SD storage in the configured high-performance mode regardless of battery readings. Battery warnings now require three low samples, recover with hysteresis and two normal samples, and only tell the user to save and charge.\n\nUse -Os for host checks and device size builds, use linker garbage collection instead of passing compiler optimization flags to ld, serialize the shared CHD support archive prerequisite, and add ccache-aware QEMU SF2000 boot smoke coverage.\n\nEvidence: make -j8 host-quick-check; make -j8 check BUILD_PROGRESS=1 with external frog-toolchain, SDK, JS2300, and dependency paths; make js2300-check; make qemu-smoke. All passed, including ASD validation and the QEMU boot trace.\n\nRisk: this is a large architectural import and changes the source paths, dependency contract, and SDK revision together. Rollback: revert this commit or restore backup/260819_0-before-mufrog-commandc-20260819; the original repository was not modified during integration.
Evidence: host linux-runner and the isolated device check both pass after removing the unused frontend model value, unreachable wallpaper helper, stale label, unused framebuffer formatter, and host-only compressed-path helpers.\n\nRisk: the removed symbols were private or terminal enum members; compressed implementations remain enabled for device builds and are only excluded from the explicitly no-compressed host build.\n\nVerification: make -j8 linux-runner LINUX_CORE_IDS=quicknes with isolated frog-toolchain, SDK, and dependency paths; make -j8 check CORE_IDS=quicknes with the same isolated paths; git diff --check.\n\nRollback: revert this commit to restore the removed symbols and original path buffer sizes.
Evidence: clean isolated make verify passes with the complete default core set, all host sanitizers, firmware/link-layout checks, both ASD checks, and the QEMU boot smoke. A warm FFmpeg invocation performs no rebuild, selected CORE_IDS produce distinct package stamps, and the focused nested core build no longer reports jobserver warnings.\n\nChanges: keep automatic -j only at the top-level make, preserve the jobserver for generated core recipes, serialize shared libretro-common/CHD archives before the batch core sub-build, track actual FFmpeg configuration inputs instead of every Makefile edit, remove the redundant frontend config stamp, and include selected-core package inputs in the package key. The sanitizer now includes the repository JS2300 headers when JS2300 is relocated.\n\nRisk: the FFmpeg token intentionally rebuilds when codec lists, toolchain, SDK, flags, or its build script change; unrelated Makefile edits no longer do. The shared archive prerequisite adds ordering only to batch builds.\n\nVerification: make -j8 verify with isolated DEPS/SDK/JS2300/TOOLCHAIN/BUILD/OUT/HCRTOS_FFMPEG_INSTALL; make qemu-smoke with the isolated ASD; make -j8 host-sanitize-check; git diff --check.\n\nRollback: revert this commit to restore the previous dependency graph and frontend sanitizer include set.
Keep the frontend viewer action callback beside the XCB implementation that
actually consumes it. The headless host build does not enable XCB, so compiling
the callback there produced an unused-function warning and carried code that
could never execute.

Evidence: the callback has no callers outside xcb_run(), and host-visual-check
passes after the change without the UniFrog-owned warning. The change only
moves the existing function under the existing UNIFROG_HOST_XCB guard; XCB
behavior is unchanged. Rollback is the parent commit.
Order every cross-compiled object, core build, fastboot object, and SDK kernel build behind a content-addressed toolchain stamp. The stamp invokes the pinned frog-toolchain bootstrap once per resolved toolchain/script configuration, so parallel setup cannot start SDK or core compilation while the compiler is still downloading, while warm builds remain no-ops. Keep ci-toolchain as a compatibility target backed by the same stamp. Update the SDK gitlink to the published bootloader-compatible branch, which also preserves GNU make's nested jobserver.\n\nEvidence: a fresh clone with a new dependency directory completed parallel setup, a clean SDK and top-level build, make verify, and QEMU smoke; the clean build compiled lz4frame.c before the libretro session/content objects and produced all firmware/core/fastboot artifacts. Rollback point: revert this commit and the SDK branch commit independently.
Change the launch-menu Explore action to a generic SD-root browser while retaining the configured ROM-system view for storage settings. Generic directory browsing now keeps unassociated regular files visible so folder-name core heuristics and the existing Other Cores path can handle them. Remove ROM-root back-navigation redirects so the generic browser remains consistent across the SD card. Stabilize the open-with input before rebuilding the item array; this prevents duplicated Other Cores entries caused by an invalidated item pointer.

Make Safe Shutdown show real write stages and present the safe-to-power-off screen synchronously after the verified flush, avoiding the stale 40% frame.

Evidence: host-quick-check passed; Linux headless smoke showed Explore opening the SD root, an unassociated A2600/Unknown.bin entry selecting stella2014, and exactly one Other Cores entry. Linux Safe Shutdown rendered successfully.
Risk: the launch model gains one appended action value; existing action values remain stable. ROM-system configuration behavior is retained. Rollback: revert this commit to restore the previous ROM-root Explore action and shutdown presentation.
Regenerate the QPSX patch queue from the pinned upstream 368310a source and include the architecture-compatible improvements from sf2000-qpsx-playstation-emulator: move the ISO directory scratch buffer out of the constrained stack, fail incomplete CUE sheets atomically, avoid re-running the hidden compatibility menu after a manual close, and implement libretro memory-backed savestates with correct event restoration and external-load cleanup.

Do not port Linux mount paths, Linux dirent/cacheflush interfaces, NOMMU/PIC dispatcher changes, or other PIE-specific work; UniFrog builds a bare-metal MIPS32 static core with its own frontend ABI. The queue was applied to a fresh checkout and the resulting core built successfully with the UniFrog MIPS32 -Os toolchain.

Evidence: make -C cores dep-patches-check CORE_IDS=qpsx passed; make -C cores qpsx passed with only pre-existing upstream enum warnings. Rollback: revert this commit to return to the original five-patch UniFrog QPSX queue.
Allow the MIPS GP linker anchor to sit beyond the final BSS byte while retaining complete application-slot bounds in the runtime loader. Classify module failures so deterministic format, ABI, identity, range, and export errors do not trigger an expensive SD unmount/remount retry, and expose the failure reason in diagnostics. Sanitize mapped frontend cores before the open-with decision so unavailable cores cannot silently fall through to auto dispatch.\n\nStage blueMSX Machines and Databases from the pinned core checkout at the libretro system-directory root, install them without touching unrelated BIOS files, and audit the package for both required assets. Add a regression for the GP layout edge case.\n\nEvidence: make core-registry-check, make host-quick-check, make check, and a temporary-SD make install all passed. The host runner loaded the supplied GB and GBA ZIPs through their real Gambatte and gpSP paths. Risk is limited to external-module validation/retry classification and generated blueMSX package contents; rollback is this commit.
Pin the unifrog-hcrtos-sdk gitlink to d40af71, a clean forward-port of the useful 260819_0 module-init retained-trace instrumentation. The SDK hook remains weak and covers both grouped and single module initialization.\n\nMake hosted smoke and SD-card release workflows authenticate the private JS2300 checkout through the required FROG2K_JAVASCRIPT_TOKEN secret using an ephemeral Git configuration, and document that release prerequisite. Keep the self-hosted QEMU workflow's path-based dependency model unchanged.\n\nEvidence: SDK check with frog-toolchain v1.3.2, the SF2000 DTS, and JOBS=4; make check BUILD_PROGRESS=1 JOBS=4; make qemu-smoke BUILD_PROGRESS=1 JOBS=4; all workflow YAML parses; make -n ci-sd-zip; git diff --check.\n\nRisk: hosted CI now intentionally fails early when the read-only JS2300 secret is missing. The SDK adds at most two retained trace entries per initialized module. Before tagging a release, push SDK commit d40af71 on branch 260819_1 and then push this parent commit so the gitlink is fetchable. Rollback: revert this commit and restore the SDK gitlink to d8af7c3.\n
Advance the UniFrog SDK gitlink to d319f16 on the 260819_1 SDK branch. This is the follow-up to the 260819_0 diagnostic forward-port and bounds retained module-name packing at the terminating NUL.\n\nEvidence: make -C unifrog-hcrtos-sdk check with frog-toolchain v1.3.2; make check BUILD_PROGRESS=1 JOBS=4; make qemu-smoke BUILD_PROGRESS=1 JOBS=4; all passed.\n\nRisk: none beyond the SDK diagnostic helper; the parent now requires d319f16 to be available to release runners. Rollback: revert this commit to restore the parent gitlink to d40af71.
Replace the UniFrog QPSX source URL with axgdev/frog2k-qpsx and pin its public equivalent of the former 368310aa source tree at 167e7e13. The public tree is byte-for-byte identical to the former base, so the existing UniFrog QPSX patch queue remains unchanged.\n\nAdd the public QPSX SSH-to-HTTPS rewrite to hosted smoke and SD-card workflows so public dependency fetches do not require a runner SSH key. Keep the JS2300 private checkout and token contract unchanged because the current UniFrog pin 44036f37 contains API 0.10 service/core changes that public 72c73366 does not yet contain.\n\nEvidence: public-base tree comparison; all QPSX patches apply and reproduce the existing patched tree; make -C cores dep-patches-check DEP=qpsx; make check BUILD_PROGRESS=1 JOBS=4; make qemu-smoke BUILD_PROGRESS=1 JOBS=4; workflow YAML validation.\n\nRisk: UniFrog still requires the private JS2300 repository until its matching API 0.10 commit is published. Rollback: revert this commit to restore the former QPSX URL/ref and remove the workflow rewrite.
Move UniFrog's JS2300 dependency to the public frog2k-javascript main_unifrog branch at b9dc3d3 and make the branch-plus-commit pin part of the fetch stamp. CI now uses public HTTPS rewrites and no longer requires a private repository token.\n\nConsume the public frog2k-qpsx main_unifrog branch at 12a161f, which contains the generic QPSX fixes and UniFrog runtime integration. Remove the obsolete UniFrog patch queue so QPSX improvements are maintained in its own repository; Linux-specific QPSX work remains in the Linux frontend's public-main configuration.\n\nEvidence: make check JOBS=4 passed, the fresh isolated QPSX dependency checkout fetched main_unifrog and built successfully, and git diff --check passed. Risk: future JS/QPSX changes require moving the immutable pins and their public branches together. Rollback: revert this commit and restore the prior dependency pins/patch queue.
Pin the public frog2k-javascript main_unifrog dependency at 48d848f, whose portable-check target compiles the host adapter with -c into a dedicated object. TCC in the Alpine commit-smoke container attempts to link the previous -fsyntax-only invocation, which incorrectly surfaced JS_GetTypedArrayData and JS_ToCStringLen as undefined symbols; the compile-only check removes that tool-specific false failure without changing the firmware library.\n\nMake the QEMU workflow an explicit manual verification because it requires a labeled self-hosted runner, proprietary firmware, and a potentially expensive cold QEMU build. Bound active runs with concurrency cancellation, a 25-minute command timeout, and a 30-minute job timeout. Document that commit-smoke remains the fast PR gate.\n\nEvidence: make ci-commit-smoke HOSTCC=gcc JOBS=4 passed; make clean followed by make verify HOSTCC=gcc JOBS=4 passed; standalone HOSTCC=gcc portable-check passed in a clean temporary worktree; git diff --check passed. Risk: no runtime code or QEMU behavior changes; CI scheduling changes from automatic push/PR execution to explicit dispatch. Rollback: revert this commit and restore the previous JS2300 pin/workflow trigger policy.

The corresponding portable-check implementation is committed and published in frog2k-javascript as 48d848f99ac2e06bb3c88b4ae18a19108e6082b0.
The SDK repository is public and commit-smoke runs inside an Alpine container without an SSH key. The branch currently configured the submodule as git@github.com:axgdev/unifrog-hcrtos-sdk.git, so the parallel deps-sdk prerequisite failed during GitHub Actions dependency bootstrap even though the public frog2k-javascript clone completed successfully. Restore the HTTPS submodule URL so clean checkouts require no repository credentials.\n\nEvidence: an empty temporary worktree completed make deps-sdk and make deps-js2300 JOBS=4; make clean followed by make verify HOSTCC=gcc JOBS=4 passed; git diff --check passed. Risk: none for repository access; HTTPS is read-only and preserves the same public repository and pinned submodule commit. Rollback: restore the SSH URL only for environments that explicitly provide credentials.
@axgdev
axgdev merged commit d1cf44a into main Aug 20, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

0