I made a patch to resolve the problem of NFS using textures with worst Level of Detail when running on a machine with a CPU over 2.1 GHz.
The results:
[Link removed. Only Registered and Activated Users Can See Links.]
[Link removed. Only Registered and Activated Users Can See Links.]
Since I didn't had time to write a patching software, you have to use a hex editor to apply it (I'm using the freeware [Link removed. Only Registered and Activated Users Can See Links.]). I use the 3.5 version .exe (size: 2.129.965 bytes), but you can probably find the place to patch in other versions. Here are the offsets, expected values and values to set:
Code:
offset | exp | to
-------------------------
0x0015609E | 0x08 | 0x06
0x001560A5 | 0x8B | 0xB8
0x001560A6 | 0xC1 | 0x00
0x001560A7 | 0x8D | 0x00
0x001560A8 | 0x04 | 0x00
0x001560A9 | 0x80 | 0x7F
The explanation of the change:
Before:
Code:
0055609D |. 75 08 JNZ SHORT Porsche_.005560A7
0055609F |. 8B4D F8 MOV ECX, [LOCAL.2]
005560A2 |. 894D FC MOV [LOCAL.1], ECX
005560A5 |. 8BC1 MOV EAX, ECX
005560A7 |> 8D0480 LEA EAX, DWORD PTR DS:[EAX+EAX*4]
005560AA |. 8BE5 MOV ESP, EBP
005560AC |. 5D POP EBP
005560AD \. C3 RETN
After:
Code:
0055609D |. 75 06 JNZ SHORT Porsche.005560A5
0055609F |. 8B4D F8 MOV ECX, [LOCAL.2]
005560A2 |. 894D FC MOV [LOCAL.1], ECX
005560A5 |> B8 0000007F MOV EAX, 7F000000
005560AA |. 8BE5 MOV ESP, EBP
005560AC |. 5D POP EBP
005560AD \. C3 RETN
The original procedure checked the CPU frequency. If it was over 2.1 GHz it returned garbage (it returned a signed int and about 2.1 bilion is the maximum value for this type). I dumbed the procedure down, to always report 2.1 GHz. (I had to patch also the jump @0055609D).
Bookmarks