helifax wrote:
I was referring to the game engine.. It seems the engine threats it as a unsigned 8 bit value even. which would be a max of 65025, but for some reason anything above 4096 gives the D3 renderer error. So I suspect they hardcoded or something to a max resolution of 4096...
They tried to be smart....
They bitshift and mask a 32bit unsigned integer, the resolution is stored in the following format:
RRRRRRRR YYYYYYYYYYYY XXXXXXXXXXXX
(8 bits) (12 bits) (12 bits)
Refresh Rate - Height - Width
eg for 5760 x 1080 @ 60hz - you're going to end up with 0x3C439680 which because of the overflow (12bit) becomes 1664x1081 @ 60hz, note the 9 in the 5th position, this should be 438 but because 5760 == 0x1680, the 8 becomes a 9 - when the engine comes to validate the settings they no longer match the requested resolution. 5760 != 1664 nor does 1920 == 1081
12 bit's gives a maximum representation of 0 - 4096
an unsigned 8 bit value will only ever represent 0 - 255, this is governed by
basic binary principals, eg. 128 64 32 16 8 4 2 1 (add) = 255, all on = 255, all off = 0, 128+64+32=224
The resolution validation can be bypassed at 0x005213A1
tru.exe+121398 - C1 EA 18 - shr edx,18
tru.exe+12139B - 3B F1 - cmp esi,ecx
tru.exe+12139D - 89 6C 24 14 - mov [esp+14],ebp
tru.exe+1213A1 - 74 38 - je tru.exe+1213DB <<------ change this line to jmp 005213E4 (0xEB, 0x41)
tru.exe+1213A3 - 8D 5E 0C - lea ebx,[esi+0C]
tru.exe+1213A6 - 0FB7 06 - movzx eax,word ptr [esi]
tru.exe+1213A9 - 3B C5 - cmp eax,ebp
You're basically looking to have the al register = 1
That still won't solve the problem however because the rest of the engine is likely performing a similar operation on that messed up 32bit unsigned int, which is likely also fixable, but have not gotten that far yet as I type this.
_________________
Resident Jester -
Flawless Widescreen -
Widescreen gaming the way it should be.
[
Steam Profile]
Want to keep Flawless Widescreen alive?
Donate Here