Skip to content

Commit

Permalink
Improved build support
Browse files Browse the repository at this point in the history
  • Loading branch information
Kaldaien committed Apr 24, 2021
1 parent eafb938 commit 3465c18
Show file tree
Hide file tree
Showing 8 changed files with 417 additions and 84 deletions.
22 changes: 21 additions & 1 deletion CHANGELOG.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,24 @@
21.04.19
21.04.24
========
+ Improvements for mouse cursor BS in NieR Sqrt 1.5
+ Improved Sleepless Window Thread for Sqrt 1.5
+ Default most settings to optimal for Sqrt 1.5
( Delete your config file for best results )

==> Still no word on WTF is wrong with the engine's texture memory,
it's giving wrong data to D3D11 at upload time, and D3D11 does not
crash, however, I cannot intercept and extract any of the data.

* Square-Enix is.... nope, I'm at a loss for words.

21.04.23
========
+ Fixed incorrect EDID display names on latest gen (360 Hz) G-Sync displays
+ Fixed incorrect EDID luminance levels reported by DXGI on some DELL displays
+ Added PresentMon capabilities to the framepacing widget to distinguish the
myriad of different modes all calling themselves Flip Model :)

21.04.19
========
+ Fixed D3D12 API hooks not activating if users disable D3D11 API hooking
+ Reduced the number of required blacklisted executables significantly
Expand Down
1 change: 1 addition & 0 deletions buildx64.bat
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
"C:\Program Files (x86)\Steam\steamapps\common\Special K\SKIF.exe" Stop Quit
msbuild SpecialK.sln -t:Rebuild -p:Configuration=Release -p:Platform=x64
1 change: 1 addition & 0 deletions buildx86.bat
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
"C:\Program Files (x86)\Steam\steamapps\common\Special K\SKIF.exe" Stop Quit
msbuild SpecialK.sln -t:Rebuild -p:Configuration=Release -p:Platform=Win32
2 changes: 1 addition & 1 deletion include/SpecialK/DLL_VERSION.H
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

#define SK_MAJOR 21
#define SK_MINOR 04
#define SK_BUILD 19
#define SK_BUILD 23
#define SK_REV_N 0
#define SK_REV 0

Expand Down
1 change: 1 addition & 0 deletions include/SpecialK/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -968,6 +968,7 @@ enum class SK_GAME_ID
HuniePop2, // HuniePop 2 - Double Date.exe
GalGunReturns, // GalGun Returns/game.exe
Persona5Strikers, // P5S/game.exe
NieR_Sqrt_1_5, // NieR Replicant ver.1.22474487139.exe
UNKNOWN_GAME = 0xffff
};

Expand Down
183 changes: 153 additions & 30 deletions include/SpecialK/diagnostics/debug_utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,48 +55,171 @@ typedef struct _UNICODE_STRING_SK {
} UNICODE_STRING_SK;
#endif

typedef struct _LDR_DATA_TABLE_ENTRY__SK
typedef enum _LDR_DDAG_STATE
{
LdrModulesMerged = -5,
LdrModulesInitError = -4,
LdrModulesSnapError = -3,
LdrModulesUnloaded = -2,
LdrModulesUnloading = -1,
LdrModulesPlaceHolder = 0,
LdrModulesMapping = 1,
LdrModulesMapped = 2,
LdrModulesWaitingForDependencies = 3,
LdrModulesSnapping = 4,
LdrModulesSnapped = 5,
LdrModulesCondensed = 6,
LdrModulesReadyToInit = 7,
LdrModulesInitializing = 8,
LdrModulesReadyToRun = 9
} LDR_DDAG_STATE;

typedef enum _LDR_DLL_LOAD_REASON
{
LoadReasonStaticDependency,
LoadReasonStaticForwarderDependency,
LoadReasonDynamicForwarderDependency,
LoadReasonDelayloadDependency,
LoadReasonDynamicLoad,
LoadReasonAsImageLoad,
LoadReasonAsDataLoad,
LoadReasonEnclavePrimary, // REDSTONE3
LoadReasonEnclaveDependency,
LoadReasonUnknown = -1
} LDR_DLL_LOAD_REASON,
*PLDR_DLL_LOAD_REASON;

typedef struct _RTL_BALANCED_NODE
{
LIST_ENTRY InLoadOrderLinks;
LIST_ENTRY InMemoryOrderLinks;
LIST_ENTRY InInitializationOrderLinks;
PVOID DllBase;
PVOID EntryPoint;
ULONG SizeOfImage;
UNICODE_STRING_SK FullDllName;
UNICODE_STRING_SK BaseDllName;
ULONG Flags;
WORD LoadCount;
WORD TlsIndex;

union _A
union
{
LIST_ENTRY HashLinks;
struct _B
struct _RTL_BALANCED_NODE *Children [2];
struct
{
PVOID SectionPointer;
ULONG CheckSum;
struct _RTL_BALANCED_NODE *Left;
struct _RTL_BALANCED_NODE *Right;
};
};

union _C
union
{
UCHAR Red : 1;
UCHAR Balance : 2;
ULONG_PTR ParentValue;
};
} RTL_BALANCED_NODE,
*PRTL_BALANCED_NODE;

typedef struct _LDR_SERVICE_TAG_RECORD
{
_LDR_SERVICE_TAG_RECORD *Next;
ULONG ServiceTag;
} LDR_SERVICE_TAG_RECORD,
*PLDR_SERVICE_TAG_RECORD;

typedef struct _LDRP_CSLIST
{
PSINGLE_LIST_ENTRY Tail;
} LDRP_CSLIST,
*PLDRP_CSLIST;

typedef struct _LDR_DDAG_NODE
{
LIST_ENTRY Modules;
PLDR_SERVICE_TAG_RECORD ServiceTagList;
ULONG LoadCount;
ULONG ReferenceCount;
ULONG DependencyCount;
union
{
LDRP_CSLIST Dependencies;
SINGLE_LIST_ENTRY RemovalLink;
};
LDRP_CSLIST IncomingDependencies;
LDR_DDAG_STATE State;
SINGLE_LIST_ENTRY CondenseLink;
ULONG PreorderNumber;
ULONG LowestLink;
} LDR_DDAG_NODE,
*PLDR_DDAG_NODE;

typedef struct _LDR_DATA_TABLE_ENTRY__SK
{
LIST_ENTRY InLoadOrderLinks;
LIST_ENTRY InMemoryOrderLinks;
union
{
LIST_ENTRY InInitializationOrderLinks;
LIST_ENTRY InProgressLinks;
};
PVOID DllBase;
PVOID EntryPoint;
ULONG SizeOfImage;
UNICODE_STRING_SK FullDllName;
UNICODE_STRING_SK BaseDllName;
union
{
ULONG TimeDateStamp;
PVOID LoadedImports;
UCHAR FlagGroup [4];
ULONG Flags;
struct
{
ULONG PackagedBinary : 1;
ULONG MarkedForRemoval : 1;
ULONG ImageDll : 1;
ULONG LoadNotificationsSent : 1;
ULONG TelemetryEntryProcessed : 1;
ULONG ProcessStaticImport : 1;
ULONG InLegacyLists : 1;
ULONG InIndexes : 1;
ULONG ShimDll : 1;
ULONG InExceptionTable : 1;
ULONG ReservedFlags1 : 2;
ULONG LoadInProgress : 1;
ULONG LoadConfigProcessed : 1;
ULONG EntryProcessed : 1;
ULONG ProtectDelayLoad : 1;
ULONG ReservedFlags3 : 2;
ULONG DontCallForThreads : 1;
ULONG ProcessAttachCalled : 1;
ULONG ProcessAttachFailed : 1;
ULONG CorDeferredValidate : 1;
ULONG CorImage : 1;
ULONG DontRelocate : 1;
ULONG CorILOnly : 1;
ULONG ReservedFlags5 : 3;
ULONG Redirected : 1;
ULONG ReservedFlags6 : 2;
ULONG CompatDatabaseProcessed : 1;
};
};

_ACTIVATION_CONTEXT
*EntryPointActivationContext;
PVOID PatchInformation;
LIST_ENTRY ForwarderLinks;
LIST_ENTRY ServiceTagLinks;
LIST_ENTRY StaticLinks;
USHORT ObsoleteLoadCount;
USHORT TlsIndex;
LIST_ENTRY HashLinks;
ULONG TimeDateStamp;
struct
_ACTIVATION_CONTEXT *EntryPointActivationContext;
PVOID Lock;
PLDR_DDAG_NODE DdagNode;
LIST_ENTRY NodeModuleLink;
struct
_LDRP_LOAD_CONTEXT *LoadContext;
PVOID ParentDllBase;
PVOID SwitchBackContext;
RTL_BALANCED_NODE BaseAddressIndexNode;
RTL_BALANCED_NODE MappingInfoIndexNode;
ULONG_PTR OriginalBase;
LARGE_INTEGER LoadTime;
ULONG BaseNameHashValue;
LDR_DLL_LOAD_REASON LoadReason;
ULONG ImplicitPathOptions;
ULONG ReferenceCount;
ULONG DependentLoadFlags;
UCHAR SigningLevel; // since REDSTONE2
} LDR_DATA_TABLE_ENTRY__SK,
*PLDR_DATA_TABLE_ENTRY__SK;

typedef NTSTATUS (NTAPI *LdrFindEntryForAddress_pfn)
( HMODULE hMod,
LDR_DATA_TABLE_ENTRY__SK **ppLdrDat );
using LdrFindEntryForAddress_pfn = NTSTATUS (NTAPI *)(HMODULE,PLDR_DATA_TABLE_ENTRY__SK*);
#pragma pack (pop)

// Returns true if the host executable is Large Address Aware
Expand Down
8 changes: 5 additions & 3 deletions include/SpecialK/injection/blacklist.h
Original file line number Diff line number Diff line change
Expand Up @@ -198,10 +198,12 @@ static constexpr UNICODE_STRING __bluelist [] = {
SK_MakeUnicode (L"setup.exe"),
SK_MakeUnicode (L"gamebarft.exe"),
SK_MakeUnicode (L"gamebarftserver.exe"),
SK_MakeUnicode (L"jusched.exe"),
SK_MakeUnicode (L"perfwatson2.exe"),
SK_MakeUnicode (L"runtimebroker.exe"),
SK_MakeUnicode (L"vrserver.exe"),
SK_MakeUnicode (L"svchost.exe"),
//SK_MakeUnicode (L"jusched.exe"),
SK_MakeUnicode (L"systemsettings.exe"),
SK_MakeUnicode (L"nvcplui.exe"),
//SK_MakeUnicode (L"perfwatson2.exe"),
SK_MakeUnicode (L"oalinst.exe"),
SK_MakeUnicode (L"dxsetup.exe"),
SK_MakeUnicode (L"uninstall.exe"),
Expand Down
Loading

0 comments on commit 3465c18

Please sign in to comment.