Skip to content
ย 
ย 

Latest commit

ย 

History

1,301 Commits

Folders and files

NameName
Last commit message
Last commit date
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿ•น๏ธ OnionPlus โ€” Optimizations at a Glance

branch commits files diff neon tests ota status

๐Ÿ“ก OnionPlus ships and updates itself over-the-air โ€” ota_update.sh checks Amiga500/Onion releases directly on-device, so every optimization and hardening pass below reaches installs without a manual re-flash. See ยง9 ยท Build, CI & release for the wiring.


๐Ÿ—บ๏ธ Table of Contents

Section
๐ŸŽฏ Why this document exists
๐Ÿ–ผ๏ธ 1 ยท Vectorized pixel paths (NEON)
โšก 2 ยท Algorithmic wins (O(nยฒ) โ†’ O(n))
๐ŸŽจ 3 ยท Rendering & UI caches
๐Ÿ”‹ 4 ยท Power, battery & idle CPU
โš™๏ธ 5 ยท Process & syscall diet
๐Ÿ›ก๏ธ 6 ยท Security & memory hardening
๐Ÿ•น๏ธ 7 ยท AdvanceMENU frontend
๐Ÿงช 8 ยท Testing safety net
๐Ÿ—๏ธ 9 ยท Build, CI & release
๐Ÿ“Š 10 ยท Grand totals
๐Ÿ”€ 11 ยท Commit timeline
โœ… Final word

๐ŸŽฏ Why this document exists

OnionPlus is measured against OnionUI/Onion:main at merge-base 07505ea5 (4.4.0-beta). That is the comparison that matters for this fork. Some NEON kernels and early hardening were first written elsewhere; every percentage in this document is OnionPlus vs OnionUI/Onion:main, not vs that sibling branch.

The integration branch is onionplus-compact: the long OnionPlus history (97 commits to fa5bb007) squashed into topic commits, then the @robcodedev ports of still-open OnionUI/Onion PRs #1936โ€“#1946 (Amiga500 #217), and the 2026-09-09 review fixes (fbd26d06 list-cache dimming + installer Flip detect; bf3deb8e Flip 640 lock, fbmode before the FB driver, AXP percBat clamp). git rev-list --count 07505ea5..HEAD on this branch is the compact count, not 97.

On top of 07505ea5 the tree still carries the power/CPU batch, security review, hot-path passes, an AdvanceMENU frontend pass, a surgical Miyoo Mini Flip port from OnionUI/Onion:v4.5-dev that does not merge that branch, an OnionUI-parity review (charging-icon sentinel, RetroArch killall semantics, path bounds, rumble GPIO retry), and the 2026-09-01 independent review (findings Aโ€“G). Every pass reaches installs through the built-in OTA updater (Amiga500/Onion, assets OnionPlus-vโ€ฆ). Last code tip is bf3deb8e. This document groups everything shipped to date by category rather than by commit.

๐Ÿ”‘ Reading the icons

Icon Meaning
๐ŸŸฅ Order-of-magnitude win โ€” vectorized paths, quadratic โ†’ linear, busy-wait removal
๐ŸŸง Structural win โ€” a syscall/shell-out/scan eliminated on a repeatable path
๐ŸŸจ Incremental win โ€” smaller but still measurable saving
๐ŸŸฆ Robustness โ€” correctness / memory-safety fix, no performance claim
๐ŸŸฉ Quality floor โ€” tests, CI, tooling
๐Ÿ“ Speedup of the OnionPlus path vs the OnionUI/Onion:main equivalent
๐Ÿ“ Figure estimated analytically (algorithmic complexity / syscall count)
๐Ÿงช Verified by unit test in this repository
๐Ÿ›ก๏ธ Correctness/safety fix carrying no performance claim

โš ๏ธ Percentages compare OnionPlus code vs OnionUI/Onion:main (07505ea5). They have not been re-timed on a physical Miyoo as part of this fork. ๐Ÿ“ = analytical (complexity / syscall count). See methodology.


๐Ÿ–ผ๏ธ 1 ยท Vectorized pixel paths (NEON)

๐ŸŸฅ The single biggest performance category โ€” whole scalar loops replaced by ARM NEON vector kernels, each with a scalar C fallback so non-NEON builds still work.

Kernel What it replaced Speedup Evidence
๐Ÿ”„ neon_rotate180_inplace rotozoom blit + extra surface alloc ๐Ÿš€ +5000 % ๐Ÿ“
๐ŸŽจ neon_swap_rb_inplace scalar per-pixel loop ๐Ÿš€ ~+800 % ๐Ÿ“
๐ŸŽจ neon_argb_to_rgba scalar per-pixel loop ๐Ÿš€ ~+800 % ๐Ÿ“
๐ŸŽจ neon_rgb888_to_argb scalar per-pixel loop ๐Ÿš€ ~+800 % ๐Ÿ“
โšช neon_gray8_to_argb scalar per-pixel loop ๐Ÿš€ ~+600 % ๐Ÿ“
โšช neon_gray8a_to_argb scalar per-pixel loop ๐Ÿš€ ~+500 % ๐Ÿ“
๐ŸŽจ neon_argb_to_rgba_alpha scalar per-pixel + branch ๐Ÿš€ ~+600 % ๐Ÿ“
๐ŸŒซ๏ธ surfaceSetAlpha (NEON intrinsics) float mul + SDL_GetRGBA ๐Ÿš€ ~+400 % ๐Ÿ“
  • ๐Ÿ“ฆ 8 kernels total (7 hand-written ARM assembly + 1 NEON intrinsics), all guarded by #ifdef __ARM_NEON with a correct scalar tail loop for the remainder.
  • ๐Ÿงช Backed by test_neon, test_neon_pixel and test_alpha_scale โ€” 109 tests / 67,353 assertions cross-checking NEON output against the scalar oracle.
  • ๐Ÿ”ฌ Every scalar fallback is exercised on the x86-64 host CI; a separate neon-arm job cross-compiles the assembly and runs it under qemu-user.

โšก 2 ยท Algorithmic wins (O(nยฒ) โ†’ O(n))

๐ŸŸฅ๐ŸŸง String and path handling rewritten to drop a re-scan hidden inside a loop.

Function Before After Class Evidence
str_count_char strlen() re-evaluated every iteration single pointer walk O(nยฒ)โ†’O(n) ๐Ÿš€ โˆ’90 % ๐Ÿ“๐Ÿงช
file_removeExtension strlen + strcpy rescans one scan + length-known memcpy โˆ’50 % scans ๐Ÿ“๐Ÿงช
file_path_relative_to strcat loop rescanning from byte 0 explicit offset + memcpy O(nยฒ)โ†’O(n) ๐Ÿ“๐Ÿงช
file_resolvePath strcat loop per path component bounds-checked memcpy at offset O(nยฒ)โ†’O(n) ๐Ÿ“๐Ÿงช
file_read() fopen+fseekร—2+ftell+buffered fread stat64 + one read() loop 2 seeks removed ๐Ÿ“๐Ÿงช
๐Ÿ•น๏ธ move_Roms_Without_Preview.ps1 rescans the Snaps folder per ROM Snaps folder read once into a lookup set O(nยฒ)โ†’O(n) ๐Ÿ“
๐Ÿ•น๏ธ move_incompatible_Roms.ps1 linear XML scan per ROM ROM names indexed into a hashtable O(nยฒ)โ†’O(n) ๐Ÿ“

๐ŸŽ Bonus fixes bundled in: str_count_char also closed a 1-byte over-read (i <= strlen); the path-assembly rewrites add PATH_MAX bounds checks the old strcat versions lacked; the PowerShell hashtable rewrite also fixes a crash on ROM names containing an apostrophe.


๐ŸŽจ 3 ยท Rendering & UI caches

๐ŸŸฅ Redrawing the same pixels every frame is the classic "free win" โ€” cache it once, invalidate on change.

Cache Before After Impact
๐Ÿ”ค TTF label / list / footer / header / dialog surfaces TTF_RenderUTF8_Blended on every frame hash-invalidated cached SDL_Surface; hidden-row dim uses a SDL_ConvertSurface copy (_blit_cached_label) so surfaceSetAlpha never mutates the cache ๐Ÿš€ 5โ€“15 ms/frame saved ๐Ÿ“
๐Ÿ–ผ๏ธ infoPanel drawImage() zoomSurface() + free on every redraw scaled surface cached per (source, w, h) O(wยทh) scale eliminated on repeats ๐Ÿ“
๐ŸŽฎ playActivityUI page render 4ร— IMG_Load+SoftStretch+alloc per page flip 4 surfaces cached, reloaded only on page change page flips skip all image I/O ๐Ÿ“
๐Ÿ–ฅ๏ธ display_readOrWriteBuffer per-pixel loop on every row memcpy fast path for contiguous rows row copy vectorized ๐Ÿ“

๐Ÿงน Every cache above ships with its own teardown: list_free() releases the TTF slots, cleanImagesCache() frees the infoPanel scaled cache, and free_resources() releases the playActivityUI page cache โ€” so this is a speed win without a new leak.


๐Ÿ”‹ 4 ยท Power, battery & idle CPU

๐ŸŸฅ๐ŸŸง The category with the most direct battery-life relevance: fewer wake-ups, fewer forked subprocesses, fewer duplicate sysfs writes.

Subsystem Before After Impact
๐Ÿ”Š OSD volume/brightness bar thread usleep(100) busy-wait (~10,000 loops/s) usleep(16000) (~60 fps) ๐Ÿš€ idle CPU ~10 % โ†’ <1 % ๐Ÿ“
๐Ÿ–ผ๏ธ OSD overlay draw loop full-throttle spin for the overlay's duration msleep(2) per iteration + demoted logging overlay CPU burn capped ๐Ÿ“
๐Ÿ”Œ battery_isCharging() (HAS_AXP() โ€” MM+ and Flip) fork+exec of axp_test every call (~5โ€“10 ms) 2 s cached wrapper ๐Ÿš€ ~โˆ’99 % subprocess spawns ๐Ÿ“
๐Ÿ”‹ battery_hasChanged while charging OnionPlus used to overwrite the 500 charging sentinel from /tmp/percBat early-return like OnionUI/Onion:main (500 stays while plugged in) charging icon no longer drops after the first percBat tick ๐Ÿ›ก๏ธ
๐Ÿชซ getBatPercMMP() AXP percent axp_test garbage (e.g. 1735289191) and -1 written to /tmp/percBat last sane 0โ€“100 kept; out-of-range samples dropped GS/keymon never read a bogus percent ๐Ÿ›ก๏ธ
๐Ÿชซ batmon low-battery thread usleep(0x4000) (~16 ms) usleep(500000) (500 ms) ๐Ÿš€ ~โˆ’97 % wake-ups ๐Ÿ“
๐Ÿ’ก display_setBrightnessRaw sysfs write on every call cached, duplicate writes skipped โˆ’100 % duplicate PWM writes ๐Ÿ“
โฑ๏ธ batmon main loop config_get("battery/warnAt") every tick read only at check timeout โˆ’100 % hot-loop config reads ๐Ÿ“
๐Ÿ“ณ rumble() GPIO init export+direction sysfs writes on every pulse one-time init + retry if gpio48 missing, value-only writes after โˆ’2 sysfs writes/pulse ๐Ÿ“
๐ŸŽฎ GameSwitcher battery poll stat() on /tmp/percBat every loop (~1 kHz) checked once/second (matches batmon's write rate) ~99.9 % fewer stat calls ๐Ÿ“
๐Ÿ”† AdvanceMENU quick-switch (PWM) backlight PWM always re-enabled on exit re-enabled only when returning from a game (quick_switch) fewer redundant PWM writes ๐Ÿ“

โš™๏ธ 5 ยท Process & syscall diet

๐ŸŸง Every system() call forks a shell and the real binary โ€” two processes for one line of intent. These were replaced with direct syscalls or fork+exec.

Call site Before After Result
mkdirs() system("mkdir -p โ€ฆ") iterative mkdir() walk 2 โ†’ 0 processes
file_copy() system("cp -f โ€ฆ") open/read/write loop 2 โ†’ 0 processes, shell-injection surface closed
config.h _config_prepare system("mkdir -p โ€ฆ") direct mkdirs() 2 โ†’ 0 processes
GS overlay playActivity system("โ€ฆ &") double-fork + execl (async, no zombies) ๐Ÿš€ โˆ’80 % process overhead ๐Ÿ“
GS overlay RetroArch kill/poll killall / pidof shell-outs process_killall_signal / process_isRunning (all matching PIDs) โˆ’100 % shell, killall semantics restored
playActivity DB ops 2ร— open/close per operation 1ร— open/exec/close โˆ’50 % DB I/O ๐Ÿ“
Reset paths (tweaks/theme/RA overrides) rm -rf via system() nftw()-based file_remove_recursive() shell-free recursive delete
๐Ÿ•น๏ธ AdvanceMENU romscripts temp file written CWD-relative temp file next to advmenu.rc, PID-suffixed race condition + read-only-CWD failure fixed
๐Ÿ•น๏ธ AdvanceMENU launch.sh no reentrancy guard early exit if advmenu already running duplicate-instance guard

๐Ÿ“‰ Net result across the 25-file hardening core: system() call sites 3 โ†’ 1 (the one survivor, process_start(), is confirmed dead code with no live caller).


๐Ÿ›ก๏ธ 6 ยท Security & memory hardening

๐ŸŸฆ No performance claim attached to anything in this section โ€” pure correctness and memory-safety.

Category Before โ†’ After Count
๐Ÿ”ด Unbounded sprintf โ†’ bounded snprintf 23 โ†’ 0 โœ…
๐Ÿ”ด Unbounded strcpy + strcat โ†’ bounded copies / memcpy 37 โ†’ 0 โœ…
๐Ÿ”ด Non-reentrant strtok โ†’ strtok_r with owned save-pointer 4 โ†’ 0 โœ…
๐ŸŸข NULL-pointer / I/O guards added new if (!ptr) / return-value checks +57 (25-file set)
๐ŸŸข Leaked descriptors closed fclose/close on error paths +18
๐ŸŸข Division-by-zero guards added early return before % total_count +2

๐Ÿ•ต๏ธ Notable defects fixed (pre-existing, not ports)

  • ๐Ÿ”“ hash.h FNV1A load โ€” removed a 7-byte out-of-bounds read, an unaligned 64-bit load (traps on ARMv7), and an oversized shift (x << 64, UB). Hashes stay bit-identical โ€” verified against 264 reference vectors at 5 optimization levels.
  • ๐Ÿ•ณ๏ธ gs_popMenu.h save thread โ€” used to run with an uninitialised 4 KB stack buffer as a path when path construction failed; now returns early instead of polling a garbage path for up to 30 s.
  • ๐ŸŽฏ currentGame() NULL derefs โ€” 3 call sites now guard against an empty game list.
  • ๐Ÿงฎ Dead slot-bounds check โ€” the reject condition was selected_slot < 0 && selected_slot >= slot_count, which can never be true for a single value, so out-of-range slots were never rejected; changed to ||.
  • ๐Ÿ“– _isContentNameInInfo OOB read โ€” a match at offset 0 no longer reads one byte before the buffer.
  • ๐Ÿ”  includeCJK() UTF-8 validation โ€” all 3 continuation bytes checked, not just the first.
  • ๐Ÿ’พ File I/O consistency โ€” fsync() before rename on key-value writes; file_remove_recursive() errors are now logged instead of swallowed.
  • ๐Ÿงฉ const-correctness โ€” file_basename() no longer discards const via a cast (-Wcast-qual clean).
  • ๐Ÿ•น๏ธ AdvanceMENU biosset false positive โ€” indexing only //game[@name] so BIOS-set XML entries (which also carry a name attribute) no longer cause incompatible ROMs to be kept by mistake.
  • ๐Ÿ”‹ battery_hasChanged charging icon โ€” OnionPlus no longer lets /tmp/percBat overwrite the 500 sentinel while the cable is plugged in. Matches OnionUI/Onion:main early-return.
  • ๐Ÿ•น๏ธ AdvanceMENU advmenu.rc safety โ€” the rewrite script only overwrites the live config if both grep and echo succeeded; otherwise the partial temp file is removed and the original is left untouched.
  • ๐Ÿ” mp4_to_mng.ps1 โ€” restored the official HTTPS ffmpeg download permalink (was an insecure/unreliable HTTP mirror), forced TLS 1.2 for old PowerShell, and scoped the ffmpeg search to the extraction directory.
  • ๐ŸŽฒ randomGamePicker division-by-zero โ€” recents/favorites and single-system modes now bail out with ERROR_CODE_NO_GAME_FOUND instead of computing rand() % total_games_count when the list is empty.
  • ๐Ÿ–ผ๏ธ batteryMonitorUI missing assets & OOB graph write โ€” every blit is routed through a safeBlitSurface() helper that no-ops on a NULL surface (e.g. a failed IMG_Load), and compute_graph() now stops processing a record set if a corrupt duration would index outside the graphic[] array.
  • ๐ŸŽจ themeSwitcher NULL assets & theme-count overflow โ€” the same safeBlitSurface() pattern plus SURF_W/SURF_H macros guard every icon blit against a missing PNG, and loadThemeDirectory() now stops scanning once NUMBER_OF_THEMES is reached instead of overflowing the theme array.
  • ๐Ÿ“ฆ packageManager loading screen โ€” IMG_Load("res/loading.png") result is now NULL-checked before blitting/flipping/freeing.
  • ๐Ÿงต gs_romscreen.h format-string bug โ€” sprintf(currPicture, game->recentItem.imgpath) used the artwork path as a format string; changed to sprintf(currPicture, "%s", ...).
  • ๐Ÿ”ค List TTF cache dimming โ€” surfaceSetAlpha on a cached label mutated the pixels; restoring with alpha 255 is a no-op. Hidden rows now dim a SDL_ConvertSurface copy (_blit_cached_label, fbd26d06).
  • ๐Ÿชซ AXP percBat garbage โ€” getBatPercMMP() keeps the last sane 0โ€“100 instead of writing -1 or timestamps to /tmp/percBat (bf3deb8e).

๐Ÿ•น๏ธ 7 ยท AdvanceMENU frontend

๐Ÿ†• The newest optimization/hardening pass on the branch โ€” a fully self-contained batch covering fonts, power handling, script robustness, and tooling.

Area Change Kind
๐Ÿ”ค Fonts advmenu.rc now uses fonts bundled in BIOS/.advance instead of Onion core fonts ๐ŸŸจ UX/consistency
๐Ÿ”† Backlight PWM restored only on quick_switch return-from-game, not on every exit ๐Ÿ”‹ power
๐Ÿšฆ Single-instance launch.sh skips launch (with a log message) if AdvanceMENU is already running ๐Ÿ›ก๏ธ robustness
๐ŸŽ PS tooling move_Roms_Without_Preview.ps1 / move_incompatible_Roms.ps1 rewritten from per-item rescans to lookup tables โšก O(nยฒ)โ†’O(n)
๐Ÿ“ Romscripts Temp files moved next to advmenu.rc with a PID suffix; only committed if the rewrite fully succeeded ๐Ÿ›ก๏ธ atomicity
๐ŸŽฌ Media tooling mp4_to_mng.ps1 ffmpeg download hardened (HTTPS, TLS 1.2, scoped search, -Force) ๐Ÿ›ก๏ธ reliability

๐Ÿ“Œ This pass shipped in PR #210, with an explicit code-review follow-up round (a25abb81) that fixed the BIOS-set false positive and improved the launch-guard log message.


๐Ÿงช 8 ยท Testing โ€” the safety net

๐ŸŸฉ Zero host unit tests existed at the OnionPlus base commit. All of the following was added during this branch.

Metric Value
๐Ÿงช Active test suites 68
โœ… Tests 1,419
โœ… Assertions 71,410
โŒ Failures 0
โฑ๏ธ Suite runtime (prebuilt) ~2.5 s
๐Ÿ” Security-focused suites 10 suites ยท 219 tests ยท 960 assertions (15 % of all tests)
  • ๐Ÿ—๏ธ Runs entirely on the host โ€” no cross-toolchain, no SDL, no device โ€” via a single make unit-test target, making it usable as a fast CI gate.
  • ๐Ÿงฌ A separate neon-arm CI job cross-compiles the NEON assembly and runs it under qemu-user; a unit-test-san job runs a sanitizer subset (ASan/UBSan).
  • ๐Ÿงฏ test_hash alone grew from 12 tests/21 assertions to 15 tests / 350 assertions to lock in the hash bit-identity guarantee above.
  • ๐Ÿ“Ÿ test_device_model now covers MIYOO285 and the HAS_AXP() / HAS_WIFI() / IS_MIYOO_PLUS_OR_FLIP() macros (13 tests / 23 assertions, host-run green).
  • ๐Ÿ”ค test_alpha_scale includes scale_alpha_255_does_not_undo_dim (list-cache dimming).
  • ๐Ÿชซ test_battery clamp contract: axp_percent_keeps_valid / rejects_negative / rejects_garbage / first_failure_is_zero.

๐Ÿ—๏ธ 9 ยท Build, CI & release

Change Detail
๐Ÿ“ฆ Release flags -O2 -ffunction-sections -fdata-sections -Wl,--gc-sections โ†’ ๐Ÿš€ โˆ’5โ€“15 % binary size ๐Ÿ“
๐ŸŽฏ New build target make unit-test โ€” host-only, zero device dependency
๐Ÿ“Š Opt-in profiling src/common/utils/perf.h โ€” PERF_START/PERF_END compile to nothing unless -DPERF_ENABLED
๐Ÿท๏ธ Release naming OnionPlus V4.4.0-beta-YYYYMMDD, zip OnionPlus-vโ€ฆ-<sha>.zip โ€” real dated GitHub Releases, no more overwritten latest. Base remains 4.4.0-beta; Flip support is a port, not a rebase onto official v4.5-dev.
๐Ÿ“ก OTA ota_update.sh points at Amiga500/Onion, filters OnionPlus-v assets. Stable = /releases/latest. Beta installs only GitHub prereleases โ€” no fallback to releases[0] (finding D). Host CI (.github/workflows/test.yml) runs on push to onionplus-compact.
๐Ÿ“ฑ Mini Flip Device id 285, MainUI-285 binaries, lid-close Tweaks. Runtime probes AXP first (354 Mini+), then the hall-mh248 sysfs node (285 Flip). The installer probes hall first (Flip stays Flip if axp is not on PATH yet); axp / axp_test = Plus. /dev/input/event* is not a Flip signal. Installer preclears the framebuffer (fbmode if present, else dd + fbset 640x480/2) before check_device_model. Ported from OnionUI/Onion:v4.5-dev without merging that branch. Lid/Hall untested on a physical Flip.
๐Ÿ–ฅ๏ธ Boot FB Plus/Flip: a dmesg hint of 640x480 no longer skips the mi_fb0 poll (avoids locking a 752 panel at 640 for the boot). commit_mainui_fbmode() waits for the FB driver; on timeout it uses fbset, not fbmode with the driver still down.
๐Ÿงต Signal handling Shared signal_handler_quit() deduplicated across 6 apps; volatile sig_atomic_t used correctly for signal-shared state

๐Ÿ“Š 10 ยท Grand totals

Metric Value
๐Ÿ”ง Commits (07505ea5..HEAD) 20 (git rev-list --count on onionplus-compact after this number audit; 18 through last code bf3deb8e. The long OnionPlus branch was 97.)
๐Ÿ“ Files changed 182 (88 added, 94 modified, 0 deleted)
โž•โž– Lines +30,487 / โˆ’1,109
๐Ÿงฉ Production (src/ + static/ + CI/Makefile) 101 files ยท +4,572 / โˆ’1,080 (excludes .gitignore + SDL.h, 2 ยท +35 / โˆ’0)
๐Ÿงช Tests (test/) 75 files ยท +23,327 / โˆ’10
๐Ÿ“š Docs + README 4 files ยท +2,548 / โˆ’16
โšก NEON kernels 8 (7 asm + 1 intrinsics)
๐Ÿงช Test suites / tests / assertions 68 / 1,419 / 71,410 โ€” all green โœ…
๐Ÿ›ก๏ธ Unsafe sprintf/strcpy+strcat/strtok remaining (hardened set) 0 / 0 / 0
๐Ÿ›ก๏ธ NULL-guards / closed descriptors added +57 / +18 (25-file set)
๐Ÿ” Pre-existing upstream defects fixed 6
๐Ÿ•น๏ธ AdvanceMENU scripts hardened/optimized 7 files

๐Ÿ“Ž For per-commit line counts, file-level diff stats, and independently reproducible git commands, see OnionPlus-vs-base.md.


๐Ÿ”€ 11 ยท Commit timeline

A bird's-eye view of the branch's evolution, oldest first:

  1. ๐Ÿ–ผ๏ธ NEON foundation โ€” vector kernels vs OnionUI scalar pixel loops.
  2. ๐Ÿ›ก๏ธ Hardening wave โ€” crash/memory-safety port across the common layer.
  3. ๐Ÿงช Test harness โ€” 68-suite host unit-test scaffold added from scratch.
  4. ๐Ÿ“š Docs โ€” first optimization report published.
  5. ๐Ÿ”‹ Power/CPU batch โ€” OSD busy-wait, brightness cache, battery cache, batmon, SQLite, config, GS overlay fork+exec, infoPanel hardening.
  6. ๐Ÿ› Defect fixes โ€” hash over-read, save-state uninitialised buffer, const cast, plus two external PRs (#206, #207) merged in.
  7. ๐Ÿ”Ž Review pass 1 โ€” currentGame() NULL derefs, async playActivity restored, dead slot check, OSD overlay throttle.
  8. ๐Ÿ—๏ธ Release/OTA โ€” dated GitHub Releases, Amiga500/Onion OTA wiring, TARGET=OnionPlus.
  9. ๐ŸŽฏ GameSwitcher fixes โ€” framebuffer stride and romscreen stretch corrections.
  10. ๐Ÿ”Ž Review pass 2 โ€” rumble caching, infoPanel image cache, GS battery-poll throttle, playActivityUI page cache, randomGamePicker dedup.
  11. ๐Ÿ•น๏ธ AdvanceMENU pass โ€” fonts, PWM handling, script speedups, race-condition and false-positive fixes (PR #210).
  12. ๐Ÿ”Ž Review pass 3 โ€” randomGamePicker division-by-zero guard, batteryMonitorUI/themeSwitcher NULL-asset & bounds hardening, packageManager NULL guard, gs_romscreen format-string fix.
  13. ๐Ÿ“ฑ Mini Flip port โ€” surgical carry of Miyoo Mini Flip + MainUI-285 from upstream v4.5-dev (921155e8); OnionPlus battery cache / file_copy reset / settings bounds kept.
  14. ๐Ÿ”Ž OnionUI-parity review โ€” restore battery_hasChanged early-return while charging; process_killall for RetroArch; file_read("") parity; rumble GPIO retry; remaining sprintf bounds on GS/chargingState; TTF cache cleanup on exit.
  15. ๐Ÿฉน 2026-09-01 review (Aโ€“G) โ€” empty-file test contract; Flip suspend_exec lid-already-closed; AXP-then-hall detect; OTA beta without stable fallback; brightness write-through; infoPanel scale identity; theme TTF cleanup-before-free. On the long branch: duplicate tree (9ab47af / 2f90bbe); CI push trigger (fa5bb007). Compact CI is onionplus-compact (22004cce).
  16. ๐Ÿ“ฆ Compact history โ€” long OnionPlus (97 commits to fa5bb007) squashed onto onionplus-compact.
  17. ๐Ÿ”€ @robcodedev ports โ€” OnionUI/Onion PRs #1936โ€“#1946 (still open upstream) via Amiga500 #217 (c7a1a7e9 + 587c35ec + merge f87e7781): keymon SELECT refresh, lt.lang JSON, ThemeSwitcher on-demand previews, GameSwitcher favorites + crash fixes, fbmode framebuffer transitions, .forceKillRetroarch, romwinidx on SD, theme per SERIAL_NUMBER, recents cap 200, skip RA cfg patch, overlap launch.
  18. ๐Ÿ”ค List cache + installer Flip โ€” fbd26d06: dim a copy of cached TTF labels; installer hall-first (never event*); framebuffer preclear before device detect.
  19. ๐Ÿ–ฅ๏ธ Boot FB + AXP percent โ€” bf3deb8e: Plus/Flip keep polling mi_fb0 when dmesg says 640; commit_mainui_fbmode honors wait_for_fb_driver; getBatPercMMP never writes garbage to /tmp/percBat.

๐Ÿ” Full SHA-by-SHA detail lives in ยง1 of the deep-dive report.


โœ… Final word

onionplus-compact is 21 commits ahead of upstream OnionUI/Onion:main (07505ea5 โ†’ this number audit; last code bf3deb8e. The long OnionPlus branch was 97). Same tree: 8 vectorized NEON kernels, a dozen algorithmic O(nยฒ)โ†’O(n) rewrites, five distinct render/UI caches (list dimming no longer mutates the TTF cache), a power/battery batch (AXP percent clamped), a syscall diet that removed every avoidable system() call from the hardened core, six pre-existing upstream defects closed, a 68-suite / 1,419-test host test harness that did not exist before this branch, a full AdvanceMENU hardening pass, a Miyoo Mini Flip port from v4.5-dev that does not merge that branch, an OnionUI-parity review, the 2026-09-01 Aโ€“G fixes, the @robcodedev ports of OnionUI/Onion #1936โ€“#1946, and the 2026-09-09 installer / boot-FB fixes. Base remains 4.4.0-beta. OTA stays on Amiga500/Onion. Flip lid/Hall and on-device timings are still unconfirmed. See ONIONPLUS_OPTIMIZATION.md.


Repository: Amiga500/Onion ยท Branch: onionplus-compact ยท Base: 07505ea5 (OnionUI/Onion:main) โ†’ last code bf3deb8e (20 including this number audit, git rev-list --count) ยท Headline figures refreshed 2026-09-09 ยท Companion docs: ONIONPLUS_OPTIMIZATION.md ยท OnionPlus-vs-base.md

About

OS overhaul for Miyoo Mini and Mini+

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages