Skip to content

Latest commit

ย 

History

8 Commits

Folders and files

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

Repository files navigation

Corelock: Game Priority & Thread Isolation Optimizer

C++20 Platform DirectX 11 Anti-Cheat Safe License

Download Corelock

A low-level, modular Windows systems performance framework that optimizes CPU core affinity, thread scheduling priority, and dynamic power states for target games.
Operates completely out-of-process with zero risk of triggering anti-cheat systems (BattlEye, EasyAntiCheat, Vanguard, Ricochet, VAC).


โšก Overview & Architecture

flowchart TD
    subgraph Windows_Kernel ["Windows Kernel & Hardware"]
        IRQ["Hardware IRQs & Network DPCs"] -->|Queued by Default| CPU0["Logical CPU 0"]
        PWR["Windows Power Subsystem"]
        MMCSS_SVC["Multimedia Class Scheduler Service"]
    end

    subgraph Corelock_App ["Corelock Optimizer Engine (Out-of-Process)"]
        Tracker["Async Process Lifecycle Tracker"]
        StateSnap["Fault-Tolerant State Machine"]
        GUI["DirectX 11 & ImGui Dashboard"]
    end

    subgraph Target_Game ["Target Game Process (e.g. CS2 / Valorant)"]
        GameThreads["Game Render & Physics Threads"]
    end

    Tracker -->|OpenProcess with Least Privilege| Target_Game
    StateSnap -->|1. Capture Baseline Snapshot| Target_Game
    Corelock_App -->|2. Offload away from CPU 0| GameThreads
    GameThreads -->|Assigned Dedicated Execution| CPU_Rest["Logical Cores 1 .. N-1"]
    Corelock_App -->|3. Elevate Priority| Target_Game
    Corelock_App -->|4. Activate GUID_MIN_POWER_SAVINGS| PWR
    Corelock_App -->|5. Register MMCSS 'Games' Profile| MMCSS_SVC
    Tracker -->|WaitForMultipleObjects: 0% Idle CPU| Target_Game
    Target_Game -->|On Exit: Immediate Rollback| StateSnap
Loading

๐ŸŽจ Graphical User Interface (DirectX 11 + Dear ImGui)

Corelock includes a desktop dashboard crafted with a Cyberpunk / Titanium Gamer Aesthetic:

  • Hardware CPU Topology Visualizer: An interactive, clickable grid displaying all system logical cores (C0, C1, C2, ...). Highlights Core 0 in radiant amber (ROLE: OS DPC & Hardware Interrupts Only) when isolated, and active game simulation cores in neon emerald. Click any tile to customize core assignment!
  • One-Click Process Scanner & Executable File Browser: Live snapshot enumeration (CreateToolhelp32Snapshot) with instant text filtering plus native Windows file browser dialog (Browse (.exe)...).
  • Dynamic Optimization Controls:
    • Isolate Logical CPU 0: Reserve CPU 0 for OS DPCs, audio buffers, and network card interrupts.
    • Isolate Physical Core 0: SMT/HyperThreading-aware detection via GetLogicalProcessorInformationEx.
    • Isolate E-Cores (Intel P-Cores Only): Automatic hybrid processor topology detection to restrict gaming to Performance Cores.
    • Custom Affinity Grid Map: Click individual core tiles to compose arbitrary core affinity masks with one-click presets (All Cores, Isolate C0, P-Cores, Invert).
    • 1ms High-Resolution Scheduler Timer: Out-of-process timeBeginPeriod(1) to minimize Windows thread scheduling jitter.
    • HIGH_PRIORITY_CLASS: Boost Windows thread dispatching without realtime locks.
    • Dynamic Power Scheme: Automatically engages High Performance (GUID_MIN_POWER_SAVINGS) during gameplay and reverts upon exit.
    • MMCSS Integration: Registers with Multimedia Class Scheduler Service (L"Games" profile).
    • Persistent Configuration: Automatically saves and reloads user target games and policies in corelock.ini.
  • Diagnostics Event Console: Live scrollable event feed capturing timestamps, error codes, and state transitions with one-click log clearing and auto-scroll toggle.
  • Live Real-Time Telemetry Hub: Real-time inspection of target game CPU % utilization, memory working set (RAM in MB), active thread count, session duration, PID, power GUIDs, and anti-cheat compliance.

๐Ÿ›ก๏ธ Anti-Cheat Safety Guarantee

Anti-Cheat Check Corelock Implementation Safety Status
DLL Injection Does not inject code or load external DLLs into target games โœ… 100% Safe
Memory Access Never calls ReadProcessMemory or WriteProcessMemory โœ… 100% Safe
API Hooking Zero tampering with game binaries or DirectX/Vulkan trampolines โœ… 100% Safe
Kernel Drivers Zero third-party unsigned kernel drivers loaded โœ… 100% Safe
Win32 Privileges Minimum required mask (PROCESS_SET_INFORMATION | PROCESS_QUERY_LIMITED_INFORMATION | SYNCHRONIZE) โœ… 100% Safe

Compatible with BattlEye, EasyAntiCheat (EAC), Riot Vanguard, Call of Duty Ricochet, and Valve Anti-Cheat (VAC).


๐Ÿ”ฌ Engineering Deep-Dive: Why Isolate CPU 0?

On modern Windows systems, hardware interrupt requests (IRQs) for network interface cards (NICs), storage controllers (NVMe/SATA), GPU drivers, and Deferred Procedure Calls (DPCs) are overwhelmingly handled by CPU 0.

When a competitive game's main simulation or render thread executes on CPU 0:

  1. Incoming high-frequency network packets or GPU driver interrupts preempt the game thread at the hardware level.
  2. The game loop stalls momentarily waiting for the DPC queue to drain.
  3. This creates 1% low and 0.1% low frametime spikes (micro-stutters), even when average FPS appears high.

Corelock's Solution: By masking out Core 0 (or all logical threads belonging to Physical Core 0 on SMT/HyperThreading CPUs), the game runs uninhibited across all remaining cores while the OS handles hardware interrupts seamlessly on Core 0.


๐Ÿ“ Repository Structure

Corelock/
โ”œโ”€โ”€ .github/
โ”‚   โ”œโ”€โ”€ workflows/build.yml     # Automated GitHub Actions CI for Windows x64
โ”‚   โ””โ”€โ”€ ISSUE_TEMPLATE/         # Bug report & feature request templates
โ”œโ”€โ”€ third_party/
โ”‚   โ””โ”€โ”€ imgui/                  # Dear ImGui with Win32 & DirectX 11 backends
โ”œโ”€โ”€ OptimizerCore.hpp           # RAII wrappers, configuration, snapshots, GameOptimizer
โ”œโ”€โ”€ OptimizerCore.cpp           # Toolhelp32 tracker, zero-CPU async waits, power & affinity logic
โ”œโ”€โ”€ GuiApp.hpp                  # DirectX 11 + Dear ImGui desktop application header
โ”œโ”€โ”€ GuiApp.cpp                  # Cyberpunk UI implementation, core visualizer grid, event loop
โ”œโ”€โ”€ main.cpp                    # Unified entry point (GUI default, headless CLI via --cli)
โ”œโ”€โ”€ CMakeLists.txt              # CMake C++20 build script linking D3D11, DXGI, Avrt, Powrprof
โ”œโ”€โ”€ .gitignore                  # Comprehensive gitignore for C++, MSVC, and CMake
โ”œโ”€โ”€ LICENSE                     # MIT License
โ”œโ”€โ”€ CONTRIBUTING.md             # Contribution guidelines and coding standards
โ”œโ”€โ”€ SECURITY.md                 # Anti-cheat compliance and security model
โ””โ”€โ”€ README.md                   # Repository documentation

๐Ÿ› ๏ธ Build Instructions

Prerequisites

  • Operating System: Windows 10 (Build 1903+) or Windows 11
  • Compiler: MSVC v142 / v143 (Visual Studio 2019 or 2022) with C++20 support
  • Build System: CMake 3.20+ or Visual Studio IDE

Building with CMake

# 1. Clone repository
git clone https://github.com/phaticusthiccy/Corelock.git
cd Corelock

# 2. Configure with CMake
cmake -B build -DCMAKE_BUILD_TYPE=Release

# 3. Build executable
cmake --build build --config Release

The compiled executable will be located in build/Release/Corelock.exe.


๐ŸŽฎ Launch Options

1. Launch DirectX 11 GUI (Default)

Double-click Corelock.exe in Windows Explorer or run:

.\Corelock.exe

Pre-load target game:

.\Corelock.exe cs2.exe

2. Headless CLI Mode (Automation / Low-Spec)

Run with the --cli flag:

.\Corelock.exe --cli cs2.exe

Test immediately with any running desktop app:

.\Corelock.exe --cli notepad.exe

๐Ÿ“„ License

This project is licensed under the MIT License.

About

Low-level, out-of-process Windows C++20 framework & DirectX 11 ImGui dashboard that optimizes game thread scheduling, CPU 0 IRQ/DPC isolation, and dynamic power states with 0% anti-cheat risk.

Topics

Resources

Contributing

Security policy

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages