Smeltrix - Development Record

Smeltrix - Development Record
Smeltrix - 개발 기록

Languages: [EN] English | [KO] 한국어

Overview

소개

Development Record

개발 기록

version - 0.0.6.0-prototype

버전 - 0.0.6.0-prototype

  • Added: Loop Task Scheduler for periodic sensor/monitoring updates
  • Added/Changed: Introduced a Pipeline Abstraction Layer between modules and UI to achieve decoupling
  • Changed: UI-related function calls -> converted to function pointers
  • Changed: Global/scattered variables -> consolidated into app context
  • Changed: Configuration handling structure from if-else -> lambda + map 1:1 mapping
  • Changed: Switched from individual asynchronous threads to a single shared worker thread system
  • Changed: Cache-line aligned, false-sharing-aware runtime state architecture
  • Changed: Project Name Ayo Control -> Smeltrix(Smelt + Matrix)
  • 추가: 센서/모니터링 주기 작업을 위한 루프용 작업 스케줄러
  • 추가/변경: 모듈, UI 사이에 파이프라인 계층 추가로 결합도 제거
  • 변경: UI 관련 함수 호출 -> 함수 포인터로 변경
  • 변경: 전역/산재 변수 -> 앱 컨텍스트로 통합
  • 변경: 설정값 처리 구조 if-else -> 람다+맵 1:1 매핑
  • 변경: 개별 비동기 스레드에서 시스템 공용 워커 스레드 기반 구조로 전환
  • 변경: 캐시 라인 기반, false sharing 을 고려한 런타임 상태 메모리 구조 적용
  • 변경: 프로젝트명 Ayo Control -> Smeltrix(Smelt + Matrix)

Note

개발 및 분석 노트

Reasons for Redesign

  • Most core features have reached the completion stage
  • Adding the remaining features under the current structure would make future maintenance and development direction unsustainable, therefore a full architectural redesign was required

Effects of Function Pointer Optimization (Partial)

  • Rendering function calls based on conditional branching → replaced with function pointer dispatch
  • While the impact is difficult to perceive at 60Hz, a clearly noticeable improvement in responsiveness was observed on a 240Hz monitor
  • Frame time formula: T = 1000ms (1 second) / f (refresh rate)
    • 60Hz: 16.6ms
    • 240Hz: 4.16ms
  • Change: Converted if-else and switch-based branching inside the rendering loop into function pointer dispatch in order to minimize CPU decision overhead
  • Result Analysis: Unlike 60Hz where timing margins are generous, in a 240Hz environment with extremely short frame times, this reduction in even minor latency is immediately perceived as smoother responsiveness.

Project Name Change

  • The initial development goal was a front-end app for simple TDP management and hotkey functions, for which the name "Ayo Control (v0.0.1)" was sufficient as it already achieved its purpose.
  • However, as additional features were integrated and the logic for low-level hardware control and data optimization deepened, the project evolved well beyond the scope of a simple control utility.
  • Consequently, the project has been rebranded to reflect its new identity as a System Engine (SE) and an integrated platform that directly governs hardware, moving past its origins as a mere utility.

재설계 이유

  • 핵심 기능 대부분 완성 단계
  • 남은 기능을 추가할 경우 현 구조가 추후 유지보수와 개발 방향에 적합하지 않아 전면 재설계

함수 포인터 변경 효과(일부)

  • 분기 제어에 의한 랜더링 함수 호출 -> 함수 포인터 교체
  • 60Hz 에서는 체감이 어려웠지만 240Hz 모니터에서는 확실히 체감 가능한 반응 속도를 확인
  • 프레임 타임 공식: T=1000ms(1초)/f (주사율)
    • 60Hz: 16.6ms
    • 240Hz: 4.16ms
  • 변경 사항: 렌더링 루프 내의 if-else, switch 분기 제어를 함수 포인터 방식으로 전환하여 CPU 판단 오버헤드를 최소화
  • 결과 분석: 가용 시간이 넉넉한 60Hz와 달리, 프레임 타임이 극도로 짧은 240Hz 환경에서는 이 미세한 지연 시간(Latency) 단축이 매끄러운 반응 속도로 즉각 체감.

프로젝트명 변경

  • 최초 개발 목적은 간단한 TDP 관리와 단축키 기능을 제공하는 프론트엔드 앱이였으며 목적은 이미 달성(0.0.1), Ayo Control 이라는 이름으로 충분
  • 추가 기능을 덧붙이며 하드웨어 로우레벨 제어와 데이터 최적화 로직이 점점 깊어지면서, 단순한 컨트롤 앱의 범위를 훨씬 넘어서는 규모로 발전
  • 이에 따라, 단순 유틸리티를 넘어 하드웨어를 직접 제어하는 시스템 엔진(System Engine)이자 통합 플랫폼으로서의 성격을 반영하여, 명칭을 변경

version - 0.0.5.0-prototype / 14,477 LOC

버전 - 0.0.5.0-prototype / 14,447 LOC

  • Added: Controller Hooking
  • Added: Virtual Controller
  • Added: GPU clock limit feature, enable option, and UI checkbox – SMU table entry 213
  • Added: CPU clock limit enable feature and UI checkbox
  • Added: Forced initialization before policy change in Performance Mode to prevent power policy conflicts
  • Added: Controller Mapping UI
  • Added: Simplified Chinese support
  • Changed: UI improvements
    • Added split button
    • Removed hardcoded values for all UI elements
    • dynamic resizing support to handle window width changes
    • Reorganized settings UI into table layout for consistent alignment
    • Separate theme information, manage it using JSON files
  • Changed: Hotkey handling switched from Low-Level Key Hook to WM_INPUT
  • 추가: 컨트롤러 후킹
  • 추가: 가상 컨트롤러
  • 추가: GPU 클럭 제한, 허용 기능 및 UI 체크박스 (SMU 테이블의 213번 엔트리)
  • 추가: CPU 클럭 제한 허용 기능 및 UI 체크박스
  • 추가: 전원 정책 충돌 방지를 위해 성능 모드에서 정책 변경 전 강제 초기화 기능
  • 추가: 컨트롤러 매핑 설정 UI
  • 추가: 중국어(간체) 지원
  • 변경: UI 개선
    • 분할 버튼 추가
    • 하드코딩된 UI 각 요소 삭제
    • 창 너비 변경에 대응하는 동적 크기 조정 지원
    • 일관된 정렬을 위해 설정 UI를 테이블 레이아웃으로 재구성
    • 테마 정보 분리, 테마 정보는 JSON 파일로 관리
    • 외부 폰트 추가 - Nato Sans
  • 변경: 단축키 처리 LowLevel Key hook -> WM_INPUT 기반으로 전환

Note

개발 및 분석 노트

GPU Clock Control

  • Attempt via ADLX API: Tried accessing using the GetManualGFXTuning API, but the call failed.
  • Forced Override Result: Manual override caused system freezing on UMPC devices. Function appears to be supported only on desktop-class products.
  • Solution: Replaced with forced GPU clock control using RyzenAdj.

Rear-side Button Mapping Analysis

  • Operation Verified: Tested mapping for A, B, X, Y, and D-Pad (Up/Down/Left/Right).
  • No Official Support: No official API or SDK is provided for this functionality.
  • Reflection Timing: Settings are not applied immediately and take effect only after internal state transitions.
  • Unstable Behavior Characteristics:
    • Behavior varies depending on initialization sequence, timing, and repetition count.
    • Even with identical input data, the device may ignore commands or perform a reset (opposite action), making it tricky to handle.

GPU 클럭 제어

  • ADLX API 시도: GetManualGFXTuning API로 접근했으나 호출 실패.
  • 강제 오버라이드 결과: 수동 Override 시 UMPC 시스템 프리징 발생. 데스크탑급 제품에서만 지원되는 기능으로 판단됨.
  • 해결책: RyzenAdj를 활용한 GPU 강제 클럭 조절 방식으로 대체.

후면 키(Rear-side buttons) 매핑 분석

  • 작동 확인: A, B, X, Y 및 D-Pad(상/하/좌/우) 매핑 테스트 완료.
  • 공식 지원 부재: 해당 기능에 대한 공식 API나 SDK가 전혀 제공되지 않음.
  • 반영 타이밍: 설정값이 즉시 반영되지 않고, 내부 상태 전환이 이루어진 이후에만 적용되는 특성이 있음.
  • 불안정한 동작 특성:
    • 초기화 순서, 타이밍, 반복 횟수에 따라 동작 결과가 매번 달라짐.
    • 동일한 입력 데이터라도 장치 상태에 따라 무시되거나 리셋(반대 동작)으로 처리되는 경우가 있어 까다로움.

version - 0.0.4.0-prototype / 11,157 LOC

버전 - 0.0.4.0-prototype / 11,157 LOC

  • Added: CPU usage display using PDH sampling
  • Added: Vibration when mouse mode is toggled on/off
  • Added: RGB random color settings
  • Added: Profile
  • Added: In mouse mode, LT/RT trigger depth determines which function is executed
  • Added: User-configurable Fan speed by temperature range
  • Added: Show/Hide notification messages (Windows Notification Center)
  • Added: Gyro Sensor - WinRT
  • Add/Changed: Complete separation of Gyro UDP Server and Communication with sensor via Shared memory
  • Changed: Integrated TDP preset and power policy
  • Changed: Replace battery information with WMI-based data, display charge/discharge power
  • 추가: PDH 샘플링으로 CPU 사용율 표시
  • 추가: 마우스 모드 on/off 시 진동
  • 추가: RGB 무작위 색상 설정
  • 추가: 프로파일
  • 추가: 마우스 모드 시 LT/RT 트리거 깊이에 따라 각 기능 실행
  • 추가: 온도 구간별 팬 속도 사용자 설정
  • 추가: 안내 메시지 표시/끄기 (윈도우 알림센터)
  • 추가: 자이로 센서 - WinRT
  • 추가/변경: 자이로 UDP 서버 완전 분리 및 센서와 공유 메모리 통신
  • 변경: TDP프리셋, 전원 정책 통합
  • 변경: 배터리 정보를 WMI기반으로 교체, 충전/방전 전력 표시

Note

노트

Integrated the gyro feature into the main program for testing, but because implementing the Cemu UDP protocol required additional network permissions and initialization of the network stack, the feature was removed and separated into a standalone program.

자이로 기능을 본 프로그램에 통합해 테스트했지만, cemu UDP 프로토콜 구현을 위해 필요한 네트워크 권한 확대와 네트워크 스택 추가를 원하지 않아 해당 기능을 제거하고 별도 프로그램으로 분리

version - 0.0.3.0-prototype / 6,204 LOC 버전 - 0.0.3.0-prototype / 6,204 LOC

  • Added: Auto-start at Windows startup
  • Added: Automatic UI hide
  • Added: Multi-language support
  • Added: Korean support
  • Added: Theme functionality
  • Added: RGB control
  • Added: FAN control
  • Added: XBox Controller support(Xinput)
  • Added: Gamepad Mouse Mode
  • Added: RTSS support
  • Add: Long-press actions for Dedicated keys LC3, RC3, T, CB, CS, and mouse mode on/off
  • Removed: UI color setting feature
  • Changed: Removed audio volume saving feature -> Synchronize with Windows volume
  • Changed: Abstracted EC-related functions through partial refactoring
  • Changed: Battery management was previously handled with Windows events and timers, now replaced with a background monitoring service object by abstracting the entire battery functionality
  • Changed: Separated device information from the code and reworked it to allow adding information for other devices
  • Theme functionality is already structured and can be added by reading from a file, so it is planned for future addition
  • 추가: 윈도우 시작시 자동 실행
  • 추가: UI 자동 숨김
  • 추가: 다국어 지원
  • 추가: 한국어 지원
  • 추가: 테마
  • 추가: RGB 제어
  • 추가: FAN 제어
  • 추가: 엑스박스 패드 지원(Xinput)
  • 추가: 패드 마우스 모드
  • 추가: RTSS 지원
  • 추가: 전용키 LC3,RC3,T,CB,CS 에 대한 길게 누름 액션, 마우스 모드 on/off
  • 삭제: UI 색상 설정
  • 변경: 오디오 볼륨 저장 기능 삭제->윈도우 볼륨과 동기화
  • 변경: 일부 리펙토링을 통한 EC관련 기능을 추상화
  • 변경: 배터리 관리는 윈도우 이벤트와 timer 로 처리 하던 기능 전체를 추상화, 백그라운드 감시 서비스 객체로 교체
  • 변경:기기 정보를 코드에서 분리, 다른 기기 정보 추가 재작업
  • 테마 정보는 구조체 형식, 외부 추가 가능, 추후 예정

version - 0.0.2.0-prototype 2,421 LOC

버전 - 0.0.2.0-prototype / 2,421 LOC

  • Added: Wallpaper setting feature
  • Added: User interface improvements
  • Added: Slide mouse wheel operation
  • Added: Volume control and mute setting
  • Added: External monitor brightness adjustment feature
  • Added: Prevent window from escaping the Windows display area
  • Added: Ability to move to another monitor when using an external display
  • 추가: 배경화면 설정 기능
  • 추가: 사용자 인터페이스 개선
  • 추가: 슬라이드 마우스 휠 조작 추가
  • 추가: 볼륨 조절 및 무음 설정
  • 추가: 외부 모니터 밝기 조절 기능
  • 추가: 창이 윈도우 영역에서 탈출 불가능 하게 추가
  • 추가: 외부 모니터 사용시 다른 모니터로 이동 가능

version - 0.0.1.0-prototype / 1,771 LOC

버전 - 0.0.1.0-prototype / 1,771 LOC

  • Added the exact TDP control
  • Added shortcut key functionality
  • Added charging limit feature
  • 추가: TDP 관리 기능
  • 추가: 단축키 설정 기능
  • 추가: 충전 제한 기능

Comments