diff --git a/OpenRGB.pro b/OpenRGB.pro index 1701c9a6..651aab56 100644 --- a/OpenRGB.pro +++ b/OpenRGB.pro @@ -976,7 +976,7 @@ FORMS += win32:INCLUDEPATH += \ dependencies/display-library/include \ dependencies/hidapi \ - dependencies/inpout32_1501/Win32/ \ + dependencies/winring0/include \ dependencies/libusb-1.0.22/include \ dependencies/mbedtls-2.24.0/include \ dependencies/NVFC \ @@ -1092,7 +1092,7 @@ win32:HEADERS += dependencies/display-library/include/adl_defines.h \ dependencies/display-library/include/adl_sdk.h \ dependencies/display-library/include/adl_structures.h \ - dependencies/inpout32_1501/Win32/inpout32.h \ + dependencies/winring0/include/OlsApi.h \ dependencies/NVFC/nvapi.h \ i2c_smbus/i2c_smbus_i801.h \ i2c_smbus/i2c_smbus_nct6775.h \ @@ -1108,7 +1108,7 @@ win32:HEADERS += win32:contains(QMAKE_TARGET.arch, x86_64) { LIBS += \ -lws2_32 \ - -L"$$PWD/dependencies/inpout32_1501/x64/" -linpoutx64 \ + -L"$$PWD/dependencies/winring0/x64/" -lWinRing0x64 \ -L"$$PWD/dependencies/libusb-1.0.22/MS64/dll" -llibusb-1.0 \ -L"$$PWD/dependencies/hidapi-win/x64/" -lhidapi \ } @@ -1116,7 +1116,7 @@ win32:contains(QMAKE_TARGET.arch, x86_64) { win32:contains(QMAKE_TARGET.arch, x86) { LIBS += \ -lws2_32 \ - -L"$$PWD/dependencies/inpout32_1501/Win32/" -linpout32 \ + -L"$$PWD/dependencies/winring0/Win32/" -lWinRing0 \ -L"$$PWD/dependencies/libusb-1.0.22/MS32/dll" -llibusb-1.0 \ -L"$$PWD/dependencies/hidapi-win/x86/" -lhidapi \ } @@ -1157,7 +1157,8 @@ win32:UI_DIR = _intermediate_$$DESTDIR/.ui win32:contains(QMAKE_TARGET.arch, x86_64) { copydata.commands = $(COPY_FILE) \"$$shell_path($$PWD/dependencies/openrazer-win32/OpenRazer64.dll )\" \"$$shell_path($$DESTDIR)\" $$escape_expand(\n\t) - copydata.commands += $(COPY_FILE) \"$$shell_path($$PWD/dependencies/inpout32_1501/x64/inpoutx64.dll )\" \"$$shell_path($$DESTDIR)\" $$escape_expand(\n\t) + copydata.commands += $(COPY_FILE) \"$$shell_path($$PWD/dependencies/winring0/x64/WinRing0x64.dll )\" \"$$shell_path($$DESTDIR)\" $$escape_expand(\n\t) + copydata.commands += $(COPY_FILE) \"$$shell_path($$PWD/dependencies/winring0/x64/WinRing0x64.sys )\" \"$$shell_path($$DESTDIR)\" $$escape_expand(\n\t) copydata.commands += $(COPY_FILE) \"$$shell_path($$PWD/dependencies/libusb-1.0.22/MS64/dll/libusb-1.0.dll)\" \"$$shell_path($$DESTDIR)\" $$escape_expand(\n\t) copydata.commands += $(COPY_FILE) \"$$shell_path($$PWD/dependencies/hidapi-win/x64/hidapi.dll )\" \"$$shell_path($$DESTDIR)\" $$escape_expand(\n\t) first.depends = $(first) copydata @@ -1168,7 +1169,9 @@ win32:contains(QMAKE_TARGET.arch, x86_64) { win32:contains(QMAKE_TARGET.arch, x86) { copydata.commands = $(COPY_FILE) \"$$shell_path($$PWD/dependencies/openrazer-win32/OpenRazer.dll )\" \"$$shell_path($$DESTDIR)\" $$escape_expand(\n\t) - copydata.commands += $(COPY_FILE) \"$$shell_path($$PWD/dependencies/inpout32_1501/Win32/inpout32.dll )\" \"$$shell_path($$DESTDIR)\" $$escape_expand(\n\t) + copydata.commands += $(COPY_FILE) \"$$shell_path($$PWD/dependencies/winring0/Win32/WinRing0.dll )\" \"$$shell_path($$DESTDIR)\" $$escape_expand(\n\t) + copydata.commands += $(COPY_FILE) \"$$shell_path($$PWD/dependencies/winring0/Win32/WinRing0.sys )\" \"$$shell_path($$DESTDIR)\" $$escape_expand(\n\t) + copydata.commands += $(COPY_FILE) \"$$shell_path($$PWD/dependencies/winring0/x64/WinRing0x64.sys )\" \"$$shell_path($$DESTDIR)\" $$escape_expand(\n\t) copydata.commands += $(COPY_FILE) \"$$shell_path($$PWD/dependencies/libusb-1.0.22/MS32/dll/libusb-1.0.dll)\" \"$$shell_path($$DESTDIR)\" $$escape_expand(\n\t) copydata.commands += $(COPY_FILE) \"$$shell_path($$PWD/dependencies/hidapi-win/x86/hidapi.dll )\" \"$$shell_path($$DESTDIR)\" $$escape_expand(\n\t) diff --git a/README.md b/README.md index 4f78b65a..e1bcfaa3 100644 --- a/README.md +++ b/README.md @@ -46,7 +46,9 @@ There have been two instances of hardware damage in OpenRGB's development and we 2. Open the OpenRGB.pro project in Qt Creator. 3. Use the MSVC compiler kit, either 32- or 64-bit, to build the application. 4. Run the project from Qt Creator. If you want to use your custom build standalone, download the latest matching Release package and replace the OpenRGB.exe in it with your new build. - * **You must run the application as Administrator the first time to allow InpOut32 to set up. It can be run as a normal user afterwards** +### SMBus Access + * **You must run the application as Administrator the first time to allow WinRing0 to set up. It can be run as a normal user afterwards** + * Early versions of OpenRGB used InpOut32. This is no longer needed and should be removed to avoid warnings by some anti-cheat software. You can uninstall Inpout32 by following the instructions [here](https://gitlab.com/CalcProgrammer1/OpenRGB/-/issues/669#note_461054255). ### USB Access @@ -202,7 +204,7 @@ There have been two instances of hardware damage in OpenRGB's development and we ## Projects Used - * InpOutx64: https://www.highrez.co.uk/downloads/inpout32/ + * WinRing0: https://openlibsys.org/ * libusb: https://github.com/libusb/libusb * hidapi: https://github.com/libusb/hidapi * libe131: https://github.com/hhromic/libe131 diff --git a/ResourceManager.cpp b/ResourceManager.cpp index 0856d029..87f36824 100644 --- a/ResourceManager.cpp +++ b/ResourceManager.cpp @@ -1188,8 +1188,8 @@ void ResourceManager::DetectDevicesThreadFunction() "
One or more I2C/SMBus interfaces failed to initialize.
" "RGB DRAM modules and some motherboards' onboard RGB lighting will not be available without I2C/SMBus.
" #ifdef _WIN32 - "On Windows, this is usually caused by a failure to load the inpout32 driver. " - "You must run OpenRGB as administrator at least once to allow inpout32 to set up.
" + "On Windows, this is usually caused by a failure to load the WinRing0 driver. " + "You must run OpenRGB as administrator at least once to allow WinRing0 to set up.
" #endif #ifdef __linux__ "On Linux, this is usually because the i2c-dev module is not loaded. "
diff --git a/dependencies/inpout32_1501/Win32/inpout32.dll b/dependencies/inpout32_1501/Win32/inpout32.dll
deleted file mode 100644
index 88892800..00000000
Binary files a/dependencies/inpout32_1501/Win32/inpout32.dll and /dev/null differ
diff --git a/dependencies/inpout32_1501/Win32/inpout32.h b/dependencies/inpout32_1501/Win32/inpout32.h
deleted file mode 100644
index 65df0969..00000000
--- a/dependencies/inpout32_1501/Win32/inpout32.h
+++ /dev/null
@@ -1,32 +0,0 @@
-#pragma once
-
-//Functions exported from DLL.
-//For easy inclusion is user projects.
-//Original InpOut32 function support
-void _stdcall Out32(short PortAddress, short data);
-short _stdcall Inp32(short PortAddress);
-
-//My extra functions for making life easy
-BOOL _stdcall IsInpOutDriverOpen(); //Returns TRUE if the InpOut driver was opened successfully
-BOOL _stdcall IsXP64Bit(); //Returns TRUE if the OS is 64bit (x64) Windows.
-
-//DLLPortIO function support
-UCHAR _stdcall DlPortReadPortUchar (USHORT port);
-void _stdcall DlPortWritePortUchar(USHORT port, UCHAR Value);
-
-USHORT _stdcall DlPortReadPortUshort (USHORT port);
-void _stdcall DlPortWritePortUshort(USHORT port, USHORT Value);
-
-ULONG _stdcall DlPortReadPortUlong(ULONG port);
-void _stdcall DlPortWritePortUlong(ULONG port, ULONG Value);
-
-//WinIO function support (Untested and probably does NOT work - esp. on x64!)
-PBYTE _stdcall MapPhysToLin(PBYTE pbPhysAddr, DWORD dwPhysSize, HANDLE *pPhysicalMemoryHandle);
-BOOL _stdcall UnmapPhysicalMemory(HANDLE PhysicalMemoryHandle, PBYTE pbLinAddr);
-BOOL _stdcall GetPhysLong(PBYTE pbPhysAddr, PDWORD pdwPhysVal);
-BOOL _stdcall SetPhysLong(PBYTE pbPhysAddr, DWORD dwPhysVal);
-
-
-
-
-
diff --git a/dependencies/inpout32_1501/Win32/inpout32.lib b/dependencies/inpout32_1501/Win32/inpout32.lib
deleted file mode 100644
index 25b70560..00000000
Binary files a/dependencies/inpout32_1501/Win32/inpout32.lib and /dev/null differ
diff --git a/dependencies/inpout32_1501/x64/inpout32.h b/dependencies/inpout32_1501/x64/inpout32.h
deleted file mode 100644
index 65df0969..00000000
--- a/dependencies/inpout32_1501/x64/inpout32.h
+++ /dev/null
@@ -1,32 +0,0 @@
-#pragma once
-
-//Functions exported from DLL.
-//For easy inclusion is user projects.
-//Original InpOut32 function support
-void _stdcall Out32(short PortAddress, short data);
-short _stdcall Inp32(short PortAddress);
-
-//My extra functions for making life easy
-BOOL _stdcall IsInpOutDriverOpen(); //Returns TRUE if the InpOut driver was opened successfully
-BOOL _stdcall IsXP64Bit(); //Returns TRUE if the OS is 64bit (x64) Windows.
-
-//DLLPortIO function support
-UCHAR _stdcall DlPortReadPortUchar (USHORT port);
-void _stdcall DlPortWritePortUchar(USHORT port, UCHAR Value);
-
-USHORT _stdcall DlPortReadPortUshort (USHORT port);
-void _stdcall DlPortWritePortUshort(USHORT port, USHORT Value);
-
-ULONG _stdcall DlPortReadPortUlong(ULONG port);
-void _stdcall DlPortWritePortUlong(ULONG port, ULONG Value);
-
-//WinIO function support (Untested and probably does NOT work - esp. on x64!)
-PBYTE _stdcall MapPhysToLin(PBYTE pbPhysAddr, DWORD dwPhysSize, HANDLE *pPhysicalMemoryHandle);
-BOOL _stdcall UnmapPhysicalMemory(HANDLE PhysicalMemoryHandle, PBYTE pbLinAddr);
-BOOL _stdcall GetPhysLong(PBYTE pbPhysAddr, PDWORD pdwPhysVal);
-BOOL _stdcall SetPhysLong(PBYTE pbPhysAddr, DWORD dwPhysVal);
-
-
-
-
-
diff --git a/dependencies/inpout32_1501/x64/inpoutx64.dll b/dependencies/inpout32_1501/x64/inpoutx64.dll
deleted file mode 100644
index 82c343fe..00000000
Binary files a/dependencies/inpout32_1501/x64/inpoutx64.dll and /dev/null differ
diff --git a/dependencies/inpout32_1501/x64/inpoutx64.lib b/dependencies/inpout32_1501/x64/inpoutx64.lib
deleted file mode 100644
index b3d0dbb7..00000000
Binary files a/dependencies/inpout32_1501/x64/inpoutx64.lib and /dev/null differ
diff --git a/dependencies/winring0/Win32/WinRing0.dll b/dependencies/winring0/Win32/WinRing0.dll
new file mode 100644
index 00000000..1cd219a8
Binary files /dev/null and b/dependencies/winring0/Win32/WinRing0.dll differ
diff --git a/dependencies/winring0/Win32/WinRing0.lib b/dependencies/winring0/Win32/WinRing0.lib
new file mode 100644
index 00000000..e7adf350
Binary files /dev/null and b/dependencies/winring0/Win32/WinRing0.lib differ
diff --git a/dependencies/winring0/Win32/WinRing0.sys b/dependencies/winring0/Win32/WinRing0.sys
new file mode 100644
index 00000000..feaea414
Binary files /dev/null and b/dependencies/winring0/Win32/WinRing0.sys differ
diff --git a/dependencies/winring0/include/OlsApi.h b/dependencies/winring0/include/OlsApi.h
new file mode 100644
index 00000000..9f11e6aa
--- /dev/null
+++ b/dependencies/winring0/include/OlsApi.h
@@ -0,0 +1,580 @@
+//-----------------------------------------------------------------------------
+// Author : hiyohiyo
+// Mail : hiyohiyo@crystalmark.info
+// Web : http://openlibsys.org/
+// License : The modified BSD license
+//
+// Copyright 2007-2009 OpenLibSys.org. All rights reserved.
+//-----------------------------------------------------------------------------
+// for WinRing0 1.3.x
+
+#pragma once
+
+/******************************************************************************
+**
+** DLL Information
+**
+******************************************************************************/
+
+//-----------------------------------------------------------------------------
+// GetDllStatus
+//-----------------------------------------------------------------------------
+DWORD // DLL Status, defined OLS_DLL_****
+WINAPI GetDllStatus();
+
+//-----------------------------------------------------------------------------
+// GetDllVersion
+//-----------------------------------------------------------------------------
+DWORD // DLL Version, defined OLS_VERSION
+WINAPI GetDllVersion(
+ PBYTE major, // major version
+ PBYTE minor, // minor version
+ PBYTE revision, // revision
+ PBYTE release // release/build
+);
+
+//-----------------------------------------------------------------------------
+// GetDriverVersion
+//-----------------------------------------------------------------------------
+DWORD // Device Driver Version, defined OLS_DRIVER_VERSION
+WINAPI GetDriverVersion(
+ PBYTE major, // major version
+ PBYTE minor, // minor version
+ PBYTE revision, // revision
+ PBYTE release // release/build
+);
+
+//-----------------------------------------------------------------------------
+// GetDriverType
+//-----------------------------------------------------------------------------
+DWORD // Device Driver Type, defined OLS_DRIVER_TYPE_****
+WINAPI GetDriverType();
+
+//-----------------------------------------------------------------------------
+// InitializeOls
+//-----------------------------------------------------------------------------
+BOOL // TRUE: success, FALSE: failure
+WINAPI InitializeOls();
+
+//-----------------------------------------------------------------------------
+// DeinitializeOls
+//-----------------------------------------------------------------------------
+VOID WINAPI DeinitializeOls();
+
+/******************************************************************************
+**
+** CPU
+**
+******************************************************************************/
+
+//-----------------------------------------------------------------------------
+// IsCpuid
+//-----------------------------------------------------------------------------
+BOOL // TRUE: support CPUID instruction, FALSE: not support CPUID instruction
+WINAPI IsCpuid();
+
+//-----------------------------------------------------------------------------
+// IsMsr
+//-----------------------------------------------------------------------------
+BOOL // TRUE: support MSR(Model-Specific Register), FALSE: not support MSR
+WINAPI IsMsr();
+
+//-----------------------------------------------------------------------------
+// IsTsc
+//-----------------------------------------------------------------------------
+BOOL // TRUE: support TSC(Time Stamp Counter), FALSE: not support TSC
+WINAPI IsTsc();
+
+//-----------------------------------------------------------------------------
+// Rdmsr
+//-----------------------------------------------------------------------------
+BOOL // TRUE: success, FALSE: failure
+WINAPI Rdmsr(
+ DWORD index, // MSR index
+ PDWORD eax, // bit 0-31
+ PDWORD edx // bit 32-63
+);
+
+//-----------------------------------------------------------------------------
+// RdmsrTx
+//-----------------------------------------------------------------------------
+BOOL // TRUE: success, FALSE: failure
+WINAPI RdmsrTx(
+ DWORD index, // MSR index
+ PDWORD eax, // bit 0-31
+ PDWORD edx, // bit 32-63
+ DWORD_PTR threadAffinityMask
+);
+
+//-----------------------------------------------------------------------------
+// RdmsrPx
+//-----------------------------------------------------------------------------
+BOOL // TRUE: success, FALSE: failure
+WINAPI RdmsrPx(
+ DWORD index, // MSR index
+ PDWORD eax, // bit 0-31
+ PDWORD edx, // bit 32-63
+ DWORD_PTR processAffinityMask
+);
+
+//-----------------------------------------------------------------------------
+// Wrmsr
+//-----------------------------------------------------------------------------
+BOOL // TRUE: success, FALSE: failure
+WINAPI Wrmsr(
+ DWORD index, // MSR index
+ DWORD eax, // bit 0-31
+ DWORD edx // bit 32-63
+);
+
+//-----------------------------------------------------------------------------
+// WrmsrTx
+//-----------------------------------------------------------------------------
+BOOL // TRUE: success, FALSE: failure
+WINAPI WrmsrTx(
+ DWORD index, // MSR index
+ DWORD eax, // bit 0-31
+ DWORD edx, // bit 32-63
+ DWORD_PTR threadAffinityMask
+);
+
+//-----------------------------------------------------------------------------
+// WrmsrPx
+//-----------------------------------------------------------------------------
+BOOL // TRUE: success, FALSE: failure
+WINAPI WrmsrPx(
+ DWORD index, // MSR index
+ DWORD eax, // bit 0-31
+ DWORD edx, // bit 32-63
+ DWORD_PTR processAffinityMask
+);
+
+//-----------------------------------------------------------------------------
+// Rdpmc
+//-----------------------------------------------------------------------------
+BOOL // TRUE: success, FALSE: failure
+WINAPI Rdpmc(
+ DWORD index, // PMC index
+ PDWORD eax, // bit 0-31
+ PDWORD edx // bit 32-63
+);
+
+//-----------------------------------------------------------------------------
+// RdmsrTx
+//-----------------------------------------------------------------------------
+BOOL // TRUE: success, FALSE: failure
+WINAPI RdpmcTx(
+ DWORD index, // PMC index
+ PDWORD eax, // bit 0-31
+ PDWORD edx, // bit 32-63
+ DWORD_PTR threadAffinityMask
+);
+
+//-----------------------------------------------------------------------------
+// RdmsrPx
+//-----------------------------------------------------------------------------
+BOOL // TRUE: success, FALSE: failure
+WINAPI RdpmcPx(
+ DWORD index, // PMC index
+ PDWORD eax, // bit 0-31
+ PDWORD edx, // bit 32-63
+ DWORD_PTR processAffinityMask
+);
+
+//-----------------------------------------------------------------------------
+// Cpuid
+//-----------------------------------------------------------------------------
+BOOL // TRUE: success, FALSE: failure
+WINAPI Cpuid(
+ DWORD index, // CPUID index
+ PDWORD eax,
+ PDWORD ebx,
+ PDWORD ecx,
+ PDWORD edx
+);
+
+//-----------------------------------------------------------------------------
+// CpuidTx
+//-----------------------------------------------------------------------------
+BOOL // TRUE: success, FALSE: failure
+WINAPI CpuidTx(
+ DWORD index, // CPUID index
+ PDWORD eax,
+ PDWORD ebx,
+ PDWORD ecx,
+ PDWORD edx,
+ DWORD_PTR threadAffinityMask
+);
+
+//-----------------------------------------------------------------------------
+// CpuidPx
+//-----------------------------------------------------------------------------
+BOOL // TRUE: success, FALSE: failure
+WINAPI CpuidPx(
+ DWORD index, // CPUID index
+ PDWORD eax,
+ PDWORD ebx,
+ PDWORD ecx,
+ PDWORD edx,
+ DWORD_PTR processAffinityMask
+);
+
+//-----------------------------------------------------------------------------
+// Rdtsc
+//-----------------------------------------------------------------------------
+BOOL // TRUE: success, FALSE: failure
+WINAPI Rdtsc(
+ PDWORD eax, // bit 0-31
+ PDWORD edx // bit 32-63
+);
+
+//-----------------------------------------------------------------------------
+// RdmsrTx
+//-----------------------------------------------------------------------------
+BOOL // TRUE: success, FALSE: failure
+WINAPI RdtscTx(
+ PDWORD eax, // bit 0-31
+ PDWORD edx, // bit 32-63
+ DWORD_PTR threadAffinityMask
+);
+
+//-----------------------------------------------------------------------------
+// RdmsrPx
+//-----------------------------------------------------------------------------
+BOOL // TRUE: success, FALSE: failure
+WINAPI RdtscPx(
+ PDWORD eax, // bit 0-31
+ PDWORD edx, // bit 32-63
+ DWORD_PTR processAffinityMask
+);
+
+//-----------------------------------------------------------------------------
+// Hlt
+//-----------------------------------------------------------------------------
+BOOL // TRUE: success, FALSE: failure
+WINAPI Hlt();
+
+//-----------------------------------------------------------------------------
+// HltTx
+//-----------------------------------------------------------------------------
+BOOL // TRUE: success, FALSE: failure
+WINAPI HltTx(
+ DWORD_PTR threadAffinityMask
+);
+
+//-----------------------------------------------------------------------------
+// HltPx
+//-----------------------------------------------------------------------------
+BOOL // TRUE: success, FALSE: failure
+WINAPI HltTx(
+ DWORD_PTR processAffinityMask
+);
+
+/******************************************************************************
+**
+** I/O
+**
+******************************************************************************/
+
+//-----------------------------------------------------------------------------
+// ReadIoPortByte
+//-----------------------------------------------------------------------------
+BYTE // Read Value
+WINAPI ReadIoPortByte(
+ WORD port // I/O port address
+);
+
+//-----------------------------------------------------------------------------
+// ReadIoPortWord
+//-----------------------------------------------------------------------------
+WORD // Read Value
+WINAPI ReadIoPortWord(
+ WORD port // I/O port address
+);
+
+//-----------------------------------------------------------------------------
+// ReadIoPortDword
+//-----------------------------------------------------------------------------
+DWORD // Read Value
+WINAPI ReadIoPortDword(
+ WORD port // I/O port address
+);
+
+//-----------------------------------------------------------------------------
+// ReadIoPortByteEx
+//-----------------------------------------------------------------------------
+BOOL // TRUE: success, FALSE: failure
+WINAPI ReadIoPortByteEx(
+ WORD port, // I/O port address
+ PBYTE value // Read Value
+);
+//-----------------------------------------------------------------------------
+// ReadIoPortWordEx
+//-----------------------------------------------------------------------------
+BOOL // TRUE: success, FALSE: failure
+WINAPI ReadIoPortWordEx(
+ WORD port, // I/O port address
+ PWORD value // Read Value
+);
+//-----------------------------------------------------------------------------
+// ReadIoPortDwordEx
+//-----------------------------------------------------------------------------
+BOOL // TRUE: success, FALSE: failure
+WINAPI ReadIoPortDwordEx(
+ WORD port, // I/O port address
+ PDWORD value // Read Value
+);
+
+//-----------------------------------------------------------------------------
+// WriteIoPortByte
+//-----------------------------------------------------------------------------
+VOID
+WINAPI WriteIoPortByte(
+ WORD port, // I/O port address
+ BYTE value // Write Value
+);
+
+//-----------------------------------------------------------------------------
+// WriteIoPortDword
+//-----------------------------------------------------------------------------
+VOID
+WINAPI WriteIoPortDword(
+ WORD port, // I/O port address
+ DWORD value // Write Value
+);
+
+
+//-----------------------------------------------------------------------------
+// WriteIoPortWord
+//-----------------------------------------------------------------------------
+VOID
+WINAPI WriteIoPortWord(
+ WORD port, // I/O port address
+ WORD value // Write Value
+);
+
+//-----------------------------------------------------------------------------
+// WriteIoPortByteEx
+//-----------------------------------------------------------------------------
+BOOL // TRUE: success, FALSE: failure
+WINAPI WriteIoPortByteEx(
+ WORD port, // I/O port address
+ BYTE value // Write Value
+);
+
+//-----------------------------------------------------------------------------
+// WriteIoPortWordEx
+//-----------------------------------------------------------------------------
+BOOL // TRUE: success, FALSE: failure
+WINAPI WriteIoPortWordEx(
+ WORD port, // I/O port address
+ WORD value // Write Value
+);
+
+
+//-----------------------------------------------------------------------------
+// WriteIoPortDwordEx
+//-----------------------------------------------------------------------------
+BOOL // TRUE: success, FALSE: failure
+WINAPI WriteIoPortDwordEx(
+ WORD port, // I/O port address
+ DWORD value // Write Value
+);
+
+/******************************************************************************
+**
+** PCI
+**
+******************************************************************************/
+// pciAddress
+// 0- 2: Function Number
+// 3- 7: Device Number
+// 8-15: PCI Bus Number
+// 16-31: Reserved
+// 0xFFFFFFFF : Error
+
+//-----------------------------------------------------------------------------
+// SetPciMaxBusNo
+//-----------------------------------------------------------------------------
+VOID
+WINAPI SetPciMaxBusIndex(
+ BYTE max // Max PCI Bus to Scan
+);
+
+//-----------------------------------------------------------------------------
+// ReadPciConfigByte
+//-----------------------------------------------------------------------------
+BYTE // Read Value
+WINAPI ReadPciConfigByte(
+ DWORD pciAddress, // PCI Device Address
+ BYTE regAddress // Configuration Address 0-255
+);
+
+//-----------------------------------------------------------------------------
+// ReadPciConfigWord
+//-----------------------------------------------------------------------------
+WORD // Read Value
+WINAPI ReadPciConfigWord(
+ DWORD pciAddress, // PCI Device Address
+ BYTE regAddress // Configuration Address 0-255
+);
+
+//-----------------------------------------------------------------------------
+// ReadPciConfigDword
+//-----------------------------------------------------------------------------
+DWORD // Read Value
+WINAPI ReadPciConfigDword(
+ DWORD pciAddress, // PCI Device Address
+ BYTE regAddress // Configuration Address 0-255
+);
+
+//-----------------------------------------------------------------------------
+// ReadPciConfigByteEx
+//-----------------------------------------------------------------------------
+BOOL // TRUE: success, FALSE: failure
+WINAPI ReadPciConfigByteEx(
+ DWORD pciAddress, // PCI Device Address
+ DWORD regAddress, // Configuration Address 0-whatever
+ PBYTE value // Read Value
+);
+
+//-----------------------------------------------------------------------------
+// ReadPciConfigWordEx
+//-----------------------------------------------------------------------------
+BOOL // TRUE: success, FALSE: failure
+WINAPI ReadPciConfigWordEx(
+ DWORD pciAddress, // PCI Device Address
+ DWORD regAddress, // Configuration Address 0-whatever
+ PWORD value // Read Value
+);
+
+//-----------------------------------------------------------------------------
+// ReadPciConfigDwordEx
+//-----------------------------------------------------------------------------
+BOOL // TRUE: success, FALSE: failure
+WINAPI ReadPciConfigDwordEx(
+ DWORD pciAddress, // PCI Device Address
+ DWORD regAddress, // Configuration Address 0-whatever
+ PDWORD value // Read Value
+);
+
+//-----------------------------------------------------------------------------
+// WritePciConfigByte
+//-----------------------------------------------------------------------------
+VOID
+WINAPI WritePciConfigByte(
+ DWORD pciAddress, // PCI Device Address
+ BYTE regAddress, // Configuration Address 0-255
+ BYTE value // Write Value
+);
+
+//-----------------------------------------------------------------------------
+// WritePciConfigWord
+//-----------------------------------------------------------------------------
+VOID
+WINAPI WritePciConfigWord(
+ DWORD pciAddress, // PCI Device Address
+ BYTE regAddress, // Configuration Address 0-255
+ WORD value // Write Value
+);
+
+//-----------------------------------------------------------------------------
+// WritePciConfigDword
+//-----------------------------------------------------------------------------
+VOID
+WINAPI WritePciConfigDword(
+ DWORD pciAddress, // PCI Device Address
+ BYTE regAddress, // Configuration Address 0-255
+ DWORD value // Write Value
+);
+
+//-----------------------------------------------------------------------------
+// WritePciConfigByteEx
+//-----------------------------------------------------------------------------
+BOOL // TRUE: success, FALSE: failure
+WINAPI WritePciConfigByteEx(
+ DWORD pciAddress, // PCI Device Address
+ DWORD regAddress, // Configuration Address 0-whatever
+ BYTE value // Write Value
+);
+
+//-----------------------------------------------------------------------------
+// WritePciConfigWordEx
+//-----------------------------------------------------------------------------
+BOOL // TRUE: success, FALSE: failure
+WINAPI WritePciConfigWordEx(
+ DWORD pciAddress, // PCI Device Address
+ DWORD regAddress, // Configuration Address 0-whatever
+ WORD value // Write Value
+);
+
+//-----------------------------------------------------------------------------
+// WritePciConfigDwordEx
+//-----------------------------------------------------------------------------
+BOOL // TRUE: success, FALSE: failure
+WINAPI WritePciConfigDwordEx(
+ DWORD pciAddress, // PCI Device Address
+ DWORD regAddress, // Configuration Address 0-whatever
+ DWORD value // Write Value
+);
+
+//-----------------------------------------------------------------------------
+// FindPciDeviceById
+//-----------------------------------------------------------------------------
+DWORD // pciAddress, 0xFFFFFFFF: failure
+WINAPI FindPciDeviceById(
+ WORD vendorId, // Vendor ID
+ WORD deviceId, // Device ID
+ BYTE index // Index
+);
+
+//-----------------------------------------------------------------------------
+// FindPciDeviceByClass
+//-----------------------------------------------------------------------------
+DWORD // pciAddress, 0xFFFFFFFF: failure
+WINAPI FindPciDeviceByClass(
+ BYTE baseClass, // Base Class
+ BYTE subClass, // Sub Class
+ BYTE programIf, // Program Interface
+ BYTE index // Index
+);
+
+/******************************************************************************
+**
+** Memory (Special API)
+**
+******************************************************************************/
+
+#ifdef _PHYSICAL_MEMORY_SUPPORT
+//-----------------------------------------------------------------------------
+// ReadDmiMemory
+//-----------------------------------------------------------------------------
+DWORD // Read size(byte), 0: failure
+WINAPI ReadDmiMemory(
+ PBYTE buffer, // Buffer
+ DWORD count, // Count
+ DWORD unitSize // Unit Size (BYTE, WORD, DWORD)
+);
+
+//-----------------------------------------------------------------------------
+// ReadPhysicalMemory
+//-----------------------------------------------------------------------------
+DWORD // Read size(byte), 0: failure
+WINAPI ReadPhysicalMemory(
+ DWORD_PTR address, // Physical Memory Address
+ PBYTE buffer, // Buffer
+ DWORD count, // Count
+ DWORD unitSize // Unit Size (BYTE, WORD, DWORD)
+);
+
+//-----------------------------------------------------------------------------
+// WritePhysicalMemory
+//-----------------------------------------------------------------------------
+DWORD // Write size(byte), 0: failure
+WINAPI WritePhysicalMemory(
+ DWORD_PTR address, // Physical Memory Address
+ PBYTE buffer, // Buffer
+ DWORD count, // Count
+ DWORD unitSize // Unit Size (BYTE, WORD, DWORD)
+);
+#endif
\ No newline at end of file
diff --git a/dependencies/winring0/x64/WinRing0x64.dll b/dependencies/winring0/x64/WinRing0x64.dll
new file mode 100644
index 00000000..4a48c7a1
Binary files /dev/null and b/dependencies/winring0/x64/WinRing0x64.dll differ
diff --git a/dependencies/winring0/x64/WinRing0x64.lib b/dependencies/winring0/x64/WinRing0x64.lib
new file mode 100644
index 00000000..0f169771
Binary files /dev/null and b/dependencies/winring0/x64/WinRing0x64.lib differ
diff --git a/dependencies/winring0/x64/WinRing0x64.sys b/dependencies/winring0/x64/WinRing0x64.sys
new file mode 100644
index 00000000..197c255a
Binary files /dev/null and b/dependencies/winring0/x64/WinRing0x64.sys differ
diff --git a/i2c_smbus/i2c_smbus_i801.cpp b/i2c_smbus/i2c_smbus_i801.cpp
index cd9c9cc1..05b702f5 100644
--- a/i2c_smbus/i2c_smbus_i801.cpp
+++ b/i2c_smbus/i2c_smbus_i801.cpp
@@ -10,7 +10,7 @@
#include "i2c_smbus_i801.h"
#include