1 * Add the support for A770 RGB
3 [ok] Add parameters "--install-service" and "--uninstall-service", see: https://github.com/mullvad/windows-service-rs/blob/main/examples/install_service.rs
4 [ok] Add a parameter (using clap) "--no-service" to run it without the service system
5 [ok] Create the service and test it
6 [ok] * Implement RGB for RAM:
7 * Use the same approach of OpenRGB by using https://github.com/GermanAizek/WinRing0
8 [ok] How to read temperature of GPU + CPU ? : https://github.com/GermanAizek/WinRing0 (Replace managing a ring0 driver and calling 'DeviceIoControl' manually)
11 * MB: "ASUS ROG STRIX B650E-I GAMING WIFI", Location:
14 * RAM : "Corsair Dominator Platinum"?
15 [ok] Define how GPU + CPU temperature are combined
16 [ok] Define update/polling rate (1s ?)
17 [ok] Define filtering function (moving average) 10s kernel size?
18 [ok] Set the exe as service or start it at startup
21 Temp = (CPU + GPU) / 2
23 Cold: [0, 255, 40]: (55 + 44) / 2 = 50°C
24 Hot: [255, 0, 0]: (75 + 85) / 2 = 80°C
27 Get-WmiObject -query "SELECT * FROM Win32_PnPSignedDriver" > output_PnPSignedDriver.txt
28 Get-WmiObject -query "SELECT * FROM Win32_PnPAllocatedResource" > output_PnPAllocatedResource.txt
31 Intel(R) NF I2C Host Controller
34 \\?\C:\Users\gburri\Projects\temp2RGB\target\debug\WinRing0x64.sys
37 "\\\\?\\PCI#VEN_8086&DEV_56A0&SUBSYS_38881025&REV_08#6&1cb01252&0&00080009#{1ca05180-a699-450a-9a0c-de4fbe3ddd89}"
40 [return: MarshalAs(UnmanagedType.U1)]
41 internal static unsafe bool CVGAAdaptor\u002ESetLEDColor(
42 [In] CVGAAdaptor* obj0,
48 \u0024ArrayType\u0024\u0024\u0024BY08E arrayTypeBy08E;
49 // ISSUE: cast to a reference type
50 // ISSUE: explicit reference operation
51 ^(sbyte&) ref arrayTypeBy08E = (sbyte) 7;
52 // ISSUE: cast to a reference type
53 // ISSUE: explicit reference operation
54 ^(sbyte&) ((IntPtr) &arrayTypeBy08E + 1) = (sbyte) 7;
55 // ISSUE: cast to a reference type
56 // ISSUE: explicit reference operation
57 ^(sbyte&) ((IntPtr) &arrayTypeBy08E + 2) = (sbyte) nArea;
58 // ISSUE: cast to a reference type
59 // ISSUE: explicit reference operation
60 ^(sbyte&) ((IntPtr) &arrayTypeBy08E + 3) = (sbyte) r;
61 // ISSUE: cast to a reference type
62 // ISSUE: explicit reference operation
63 ^(sbyte&) ((IntPtr) &arrayTypeBy08E + 4) = (sbyte) g;
64 // ISSUE: cast to a reference type
65 // ISSUE: explicit reference operation
66 ^(sbyte&) ((IntPtr) &arrayTypeBy08E + 5) = (sbyte) b;
67 // ISSUE: cast to a reference type
68 // ISSUE: explicit reference operation
69 ^(sbyte&) ((IntPtr) &arrayTypeBy08E + 6) = (sbyte) 0;
70 // ISSUE: cast to a reference type
71 // ISSUE: explicit reference operation
72 ^(sbyte&) ((IntPtr) &arrayTypeBy08E + 7) = (sbyte) 0;
73 // ISSUE: cast to a reference type
74 // ISSUE: explicit reference operation
75 ^(sbyte&) ((IntPtr) &arrayTypeBy08E + 8) = (sbyte) 0;
77 \u0024ArrayType\u0024\u0024\u0024BY08E* arrayTypeBy08EPtr1 = &\u003CModule\u003E.\u003FA0x171ed149\u002E\u003FprevData\u0040\u003F1\u003F\u003FSetLEDColor\u0040CVGAAdaptor\u0040\u0040UEAA_NEEEE\u0040Z\u00404PAEA;
78 \u0024ArrayType\u0024\u0024\u0024BY08E* arrayTypeBy08EPtr2 = &arrayTypeBy08E;
80 // ISSUE: cast to a reference type
81 // ISSUE: explicit reference operation
82 byte num3 = ^(byte&) ref \u003CModule\u003E.\u003FA0x171ed149\u002E\u003FprevData\u0040\u003F1\u003F\u003FSetLEDColor\u0040CVGAAdaptor\u0040\u0040UEAA_NEEEE\u0040Z\u00404PAEA;
83 // ISSUE: cast to a reference type
84 // ISSUE: explicit reference operation
85 if ((byte) 7 >= ^(byte&) ref \u003CModule\u003E.\u003FA0x171ed149\u002E\u003FprevData\u0040\u003F1\u003F\u003FSetLEDColor\u0040CVGAAdaptor\u0040\u0040UEAA_NEEEE\u0040Z\u00404PAEA)
87 while ((uint) num2 <= (uint) num3)
94 num2 = *(byte*) arrayTypeBy08EPtr2;
95 num3 = *(byte*) arrayTypeBy08EPtr1;
96 if ((uint) num2 < (uint) num3)
100 \u003CModule\u003E.\u003FA0x171ed149\u002E\u003FprevData\u0040\u003F1\u003F\u003FSetLEDColor\u0040CVGAAdaptor\u0040\u0040UEAA_NEEEE\u0040Z\u00404PAEA = arrayTypeBy08E;
101 \u003CModule\u003E.CVGAAdaptor\u002ELogData(obj0, (sbyte*) &\u003CModule\u003E.\u003F\u003F_C\u0040_0BB\u0040MOBGKECJ\u0040Fake\u003F5I2C_Write\u003F3\u003F5\u0040, (byte*) &arrayTypeBy08E, 9);
105 [return: MarshalAs(UnmanagedType.U1)]
106 internal static unsafe bool CVGAAdaptorIntel\u002EI2C_Write(
107 [In] CVGAAdaptorIntel* obj0,
111 [MarshalAs(UnmanagedType.U1)] bool bOutputDebug)
113 if (*(long*) ((IntPtr) obj0 + 1256L) == -1L && !\u003CModule\u003E.CVGAAdaptorIntel\u002EI2C_OpenDevice(obj0))
115 \u0024ArrayType\u0024\u0024\u0024BY0IA\u0040D arrayTypeBy0IaD;
116 if (!\u003CModule\u003E.CVGAAdaptorIntel\u002EI2C_OpenTarget(obj0))
118 \u003CModule\u003E.sprintf_s((sbyte*) &arrayTypeBy0IaD, 128UL, (sbyte*) &\u003CModule\u003E.\u003F\u003F_C\u0040_0CO\u0040GJJFMHGA\u0040DeviceIoControl\u003F\u0024CI\u003F\u0024CJ\u003F5to\u003F5devcie\u003F5FAI\u0040, __arglist ((int) \u003CModule\u003E.GetLastError()));
119 \u003CModule\u003E.OutputDebugStringA((sbyte*) &arrayTypeBy0IaD);
122 \u003CModule\u003E.CVGAAdaptor\u002ELogData((CVGAAdaptor*) obj0, (sbyte*) &\u003CModule\u003E.\u003F\u003F_C\u0040_0M\u0040DGLNBELN\u0040I2C_Write\u003F3\u003F5\u0040, pData, nDataSize);
123 int num = \u003CModule\u003E.CVGAAdaptorIntel\u002EI2C_WriteTarget(obj0, pData, nDataSize) ? 1 : 0;
126 \u003CModule\u003E.sprintf_s((sbyte*) &arrayTypeBy0IaD, 128UL, (sbyte*) &\u003CModule\u003E.\u003F\u003F_C\u0040_0CI\u0040FFLBFBLK\u0040WriteFile\u003F\u0024CI\u003F\u0024CJ\u003F5to\u003F5devcie\u003F5FAILED\u003F4\u003F5h\u0040, __arglist ((int) \u003CModule\u003E.GetLastError()));
127 \u003CModule\u003E.OutputDebugStringA((sbyte*) &arrayTypeBy0IaD);
129 \u003CModule\u003E.CVGAAdaptorIntel\u002EI2C_CloseTarget(obj0);
136 __CLASS : Win32_PnPSignedDriver
137 __SUPERCLASS : CIM_Service
138 __DYNASTY : CIM_ManagedSystemElement
140 __PROPERTY_COUNT : 28
141 __DERIVATION : {CIM_Service, CIM_LogicalElement, CIM_ManagedSystemElement}
142 __SERVER : SMOL-WHITE
143 __NAMESPACE : root\cimv2
146 ClassGuid : {4d36e97d-e325-11ce-bfc1-08002be10318}
149 Description : Intel(R) NF I2C Host Controller
151 DeviceID : DISPLAY\INTC_I2C\7&3255D98A&0&UID26040
152 DeviceName : Intel(R) NF I2C Host Controller
154 DriverDate : 20220203000000.******+***
156 DriverProviderName : Intel Corporation
157 DriverVersion : 31.100.2210.1
159 HardWareID : VIDEO\VEN_8086&DEV_56A0&SUBSYS_38881025&REV_08&INTC_I2C
164 Manufacturer : Intel Corporation
166 PDO : \Device\00000078
167 Signer : Microsoft Windows Hardware Compatibility Publisher
171 SystemCreationClassName :
173 PSComputerName : SMOL-WHITE