7032 Commits

Author SHA1 Message Date
Douglas Teles 859bab2c0e Add support for GamePark GP32 emulator and update GPU driver installation path 2026-05-25 18:07:12 -03:00
Douglas Teles f40d235197 Add support for micro-gamepad compatibility in archr-joypad driver 2026-05-14 13:32:40 -03:00
Douglas Teles f3260292d2 Fix joypad compatibility for Y3506 (soysauce) boards to use single-ADC driver 2026-05-14 12:03:31 -03:00
Douglas Teles ca46470f31 Refactor autostart script to run common start scripts in two phases for improved boot efficiency 2026-05-11 19:32:01 -03:00
Douglas Teles d230c4243e Enhance boot performance by adjusting service dependencies and loading quirks in parallel 2026-05-11 19:29:07 -03:00
Douglas Teles 424a286755 Fix rumble motor enable pin behavior for R36S revisions and adjust automount script for internal storage handling 2026-05-11 19:02:46 -03:00
Douglas Teles 57a57855b4 Add support for ROCKNIX overlays by binding to "rocknix,generic-dsi" compatible 2026-05-11 18:27:23 -03:00
Douglas Teles 926cca9cd4 Update media player configurations and enhance InputPlumber service for HID device management 2026-05-11 18:14:35 -03:00
Douglas Teles 47f33dd448 Add compatibility libraries and update package dependencies for PortMaster
- Introduced portmaster-compat-libs package to aggregate compatibility libraries.
- Added compat-codec2, compat-x264, and compat-x265 packages for multimedia support.
- Updated package.mk files to include new dependencies and improve installation scripts.
- Enhanced start_portmaster.sh to handle mod_ArchR.txt for modular support.
- Adjusted ffmpeg configuration to enable ffmpeg and ffprobe without ffplay.
2026-04-29 17:24:55 -03:00
Douglas Teles 272217362d Update Mesa to version 26.0.5 and adjust related dependencies
- Bump Mesa version from 26.0.3 to 26.0.5 with updated SHA256 checksum.
- Modify RK3326 device tree to increase regulator max voltage for ARM.
- Update OPP settings in RK3326 DTS patch for improved performance.
- Add Python3 and xz to PortMaster dependencies.
- Enhance PortMaster startup script for better directory handling and cleanup.
- Implement HDMI resolution check with timeout in autostart script.
- Add turbo mode configuration to system settings.
- Refactor CPU frequency functions to utilize available frequencies more effectively.
- Update Dolphin emulator scripts to improve gptokeyb process handling.
- Introduce new systemd configuration for timesyncd to optimize polling intervals.
- Set uinput permissions in udev rules for better controller input handling.
- Adjust emulator package.mk to optimize performance for RK3326.
- Modify mkimage script to ensure proper FAT32 formatting and filesystem checks.
- Enhance benchmark script to auto-detect device-specific paths and improve logging.
2026-04-28 23:07:44 -03:00
Douglas Teles 918471e03d Refactor and optimize emulator configurations and GPU driver handling
- Enhanced `runemu.sh` to conditionally enable debug logging based on system log level, improving performance and debugging capabilities.
- Introduced functions to pause and resume background services during gameplay to optimize resource usage.
- Updated `retroarch.cfg` to disable frame delay and set video context driver to default, improving compatibility.
- Changed DuckStation's GPU renderer from OpenGL to Software for better performance on RK3326.
- Adjusted Flycast settings to lower resolution and optimize rendering settings for smoother gameplay.
- Modified MelonDS script to correctly handle internal resolution and screen orientation settings.
- Updated PPSSPP configuration to improve frame skipping behavior and adjusted CPU speed settings for better performance.
- Refined GPU driver scripts to handle panfrost availability and ensure proper driver binding, preventing graphical issues.
- Removed obsolete panfrost quirk file and migrated relevant settings to a new profile.d script for better management.
- Added service condition checks for various network daemons to ensure they only start if their configuration files exist.
- Adjusted systemd service configurations for network daemons to improve reliability and resource management.
- Updated sysctl settings to optimize memory management and reduce unnecessary RAM usage.
- Disabled debug shell service by default to enhance security and resource efficiency.
- Created necessary directories for mesa shader cache to ensure persistent shader caching across reboots.
- Added a new squashfs package for weston to support graphical environments.
2026-04-28 16:02:27 -03:00
Douglas Teles 7a1042e620 Update commander to ROCKNIX modern fork (dark-theme + paths + build-fix baked in)
The ROCKNIX fork includes all 3 patches we maintained separately:
- 000-dark-theme.patch
- 001-default-paths.patch
- 002-build-fix.patch

Switching to the fork removes the maintenance burden of patch rebasing.

Adapted from ROCKNIX dd10d27a84 to projects/ArchR/ path.
2026-04-27 19:25:20 -03:00
spycat88 a81015aa3e portmaster: bump package 2026-04-27 19:19:52 -03:00
Philippe Simons bcc7698953 duckstation: bump to 0.1-10998 2026-04-27 19:19:52 -03:00
spycat88 29394245fb libxkbcommon: fix deps 2026-04-27 19:19:52 -03:00
Douglas Teles afd7ce30ee Restore DEBUG_FS=y for development/bench phase
DEBUG_FS provides instrumentation needed by TODO items 1 and 6:
- /sys/kernel/debug/dri/*/name — GPU performance counters
- /sys/kernel/debug/cma/* — per-region CMA page accounting
- /sys/kernel/debug/block/* — I/O scheduler stats (BLK_DEBUG_FS)
- Detailed thermal zone introspection

Trade-off acknowledged: small runtime overhead from debugfs mount,
but the instrumentation granularity is essential while we're actively
benchmarking and tuning. Switch to DEBUG_FS=n or DISALLOW_MOUNT
for release-final builds once FASE 1-2 benchmarks are complete.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-18 15:33:55 -03:00
Douglas Teles ca8c91f589 Fix Flycast and sysctl after deep research validation
Flycast-SA:
- Restore -Ofast sed (was incorrectly replaced with CMAKE_BUILD_TYPE=Release)
- -Ofast = -O3 + -ffast-math is INTENTIONAL for Flycast: the Dreamcast SH4
  FPU doesn't use strict IEEE 754, and the hardware itself flushes denormals
- Validated by JELOS/AmberELEC/ROCKNIX upstream for years without issues
- On weak Cortex-A35, the extra optimization from -ffast-math is meaningful

Sysctl:
- vm.dirty_writeback_centisecs: 500→1500 (match ROCKNIX, reduce I/O wakeups
  during gaming — read-heavy workload needs fewer writeback checks)
- vm.vfs_cache_pressure: 50→100 (restore kernel default — during gameplay
  the same few files are reread (ROM, save, shader cache), so a large
  inode/dentry cache provides no benefit on 1GB RAM. 50 is a desktop tuning
  that favors metadata cache for build/compile workloads, not gaming.
  Note: 200+ is what aggressively reclaims metadata; 100 is the neutral
  kernel default, not an override.)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-18 15:32:03 -03:00
Douglas Teles b0d73b4c1e Revert FRAME_POINTER and ZRAM zstd after deep research
FRAME_POINTER:
- ARM64 Kconfig unconditionally selects FRAME_POINTER (arch/arm64/Kconfig:136)
- Cannot be disabled regardless of defconfig value
- Overhead <1-2% on ARM64 (x29 designated as FP by ABI, STP saves FP+LR
  in single store queue slot)
- Restored to y to match kernel reality

ZRAM compression lzo-rle (reverted from zstd):
- zstd is 3-4x slower than lzo-rle on in-order Cortex-A35
- Estimated: lzo-rle ~350 MB/s vs zstd ~100 MB/s compress on A35
- Each 4KB page swap: 11us (lzo-rle) vs 40us (zstd)
- Under memory pressure during gaming, zstd causes frame stutters
- ROCKNIX deliberately uses lzo-rle on ALL in-order cores (A35/A53/A55)
  and only enables zstd on out-of-order big cores (A73/A76)
- The extra ~500MB virtual capacity from zstd's ratio is not worth the
  latency penalty for latency-sensitive gaming workloads

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-18 15:19:36 -03:00
Douglas Teles a7334ee3fb Double-check fixes: BRIDGE_NETFILTER, BLK_DEBUG_FS, Flycast build type
Kernel:
- BRIDGE_NETFILTER=n (was still =m after BRIDGE was disabled)
- BLK_DEBUG_FS=n (depends on DEBUG_FS which is off, explicit disable)

Flycast:
- Replace sed -Ofast hack with proper CMAKE_BUILD_TYPE=Release
  (CMake Release mode applies -O3 with proper LTO support)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-18 15:13:18 -03:00
Douglas Teles ff1d3962ec FASE 1: Switch ZRAM to zstd, disable zswap
- ZRAM compression: lzo-rle → zstd (better 1:3 ratio vs 1:2.5, saves
  ~50MB more RAM on 512MB ZRAM at cost of slightly more CPU)
- Add zswap.enabled=0 to kernel cmdline (zswap intercepts before ZRAM,
  preventing efficient compressed swap)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-18 14:34:00 -03:00
Douglas Teles 85325f88a3 FASE 0+1+2: Production build audit fixes and infrastructure
Kernel config hardening:
- FRAME_POINTER=n: Saves 3-5% CPU overhead on ARM64 (wastes registers)
- DEBUG_FS=n: Remove debugfs mount (memory + attack surface)
- IKCONFIG=n: Save 100-300KB (kernel config in /proc not needed in production)

Mesa/Panfrost:
- Add persistent shader cache (MESA_SHADER_CACHE_DIR + 128MB max)
  Avoids shader recompilation on every emulator launch

I/O scheduler:
- Enhanced BFQ udev rule: low_latency=1, read_ahead=2048KB, nr_requests=128
  Reduces ROM loading stutter on microSD

Sysctl:
- Add vm.dirty_expire_centisecs=3000 (dirty pages expire after 30s)
- Add vm.page-cluster=0 (single-page swap for ZRAM, instant swap-in)

Infrastructure:
- Create tools/audit-build.sh: comprehensive production build audit script
  Checks kernel debug flags, Mesa env vars, binary stripping, emulator
  build types, system state, active services

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-18 14:29:06 -03:00
Douglas Teles 70f42b992c Optimize ALL emulators: align with dArkOS performance settings
Flycast (Dreamcast):
- AutoSkipFrame: 1→2 (skip up to 2 frames when behind, matches dArkOS)
- Audio backend: pulse→auto (better compatibility)

Mupen64Plus (N64):
- Resolution: 427x320→480x320 (better aspect ratio for 640x480 screens)
- PRIMARY_BUFFER_SIZE: 8192→16384 (more stable audio, matches dArkOS)
- SECONDARY_BUFFER_SIZE: 2048→1024 (lower SDL latency, matches dArkOS)

PPSSPP (PSP):
- ForceMaxEmulatedFPS: 30→0 (remove artificial cap that limited 60fps games)

GZDoom:
- Add +gl_es 1 +vid_preferbackend 3 +cl_capfps 0 flags (matches dArkOS)
  Forces OpenGL ES mode with preferred backend, uncapped FPS

RetroArch core options:
- mame2003-plus skip_warnings: disabled→enabled (faster arcade startup)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-18 13:35:14 -03:00
Douglas Teles 7ff8f5bbd7 Optimize DraStic for RK3326: match dArkOS performance settings
- frameskip_value: 3→1 (skip fewer frames = smoother, dArkOS uses 1)
  Higher skip values cause visual stuttering without improving actual FPS
  because DraStic already renders efficiently
- screen_orientation: 1→2 (match dArkOS layout, optimized rendering path)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-18 13:28:48 -03:00
Douglas Teles 25abe265b8 Maximize melonDS performance on RK3326
Config:
- ShowOSD=0: Disable on-screen display (saves rendering cycles)
- MouseHide=1: Hide cursor immediately

Launch script:
- Force JIT, software 3D, ScreenUseGL=0 at every launch (prevent
  user/ES settings from accidentally enabling heavy GPU features)
- Set CPU governor to performance before launch
- QT_QPA_NO_SIGNAL_SPY=1: Disable Qt signal debugging
- QSG_RENDER_LOOP=basic: Simpler Qt render loop (less overhead)
- QT_ENABLE_HIGHDPI_SCALING=0: Skip HiDPI calculations
- AudioInterp=0, AudioBitrate=0: No audio interpolation overhead

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-18 13:20:10 -03:00
Douglas Teles b0c5eb982e Optimize melonDS config for RK3326 performance
- ScreenUseGL=0: Skip GPU-accelerated display compositing. On Mali-G31
  with Panfrost, the overhead of uploading software-rendered frames to
  GPU for display is slower than direct software blit.
- ScreenFilter=0: Disable bilinear filtering (saves GPU cycles)
- JIT remains enabled (critical for Cortex-A35 performance)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-18 13:08:32 -03:00