+ Reply to Thread
Page 1 of 4
1 2 3 ... LastLast
Results 1 to 10 of 36

Thread: Fast CPU / LOD patch

  1. Fast CPU / LOD patch

    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).

  2. Amazing! Looks like a final solution to this annoying problem is near! THANKS a LOT!

    However I'm probably in not good position to test this. Because my current computer CPU is bellow 2,1GHz - 1875MHz AXP to be exact Hence I did not noticed any difference and I do believe that there are still some crazy mipmaps misshaps, as the close textures are a bit blurry... but that is probably not fixable fault, but low texture resolution instead.

    Anyway, at least the patch did not screw things on lower that 2,1GHz CPUs.

    I made few screenshots, but two of them I made using PrtScr, and two using Alt - P in game screenshot to TGA format. These TGA files looks converted to 16 bit only!!! Lame.

    Before (PrtScr 32bit)
    [Link removed. Only Registered and Activated Users Can See Links.]

    After (16bit TGA by Alt - P)
    [Link removed. Only Registered and Activated Users Can See Links.]

    After (16bit TGA by Alt - P)
    [Link removed. Only Registered and Activated Users Can See Links.]

    After (PrtScr 32bit)
    [Link removed. Only Registered and Activated Users Can See Links.]


    PS. I still think that the limit was ALSO at 1GHz or so and that I still suffer from some mipmap problem, just check the right of the last pic, for example... But maybe I just imagining things


    PS2. using XVI32 for the patch, just use the values after "0x", so jump to the "0015609E" and change "08" to "06" ... and vice versa
    [COLOR=#333399]"It is dangerous to be right in matters on which the established authorities are wrong." - Voltaire[/COLOR]
    [COLOR=red]...just keep folding, just keep folding...[/COLOR] [Link removed. Only Registered and Activated Users Can See Links.]

  3. Good. I'm happy it works and doesn't crash the program - this procedure is executed several times during startup of NFS and before every race, so you would definitely notice if something went wrong.

    You can change the value 7F000000 to whatever you like (just remember Intel is big-endian). 7F000000 is around 2.13 GHz. I tried 30000000, which is around 800 MHz and the same textures were chosen. I don't think there are any better mipmaps available. If I have time I will check how it looks on my old PIII 850 with Voodoo 5500 and post images.

  4. Well, I won't be so quick there, we need to run it on few more machines first, but still not a problem there.

    Exchanged the 7F to 30 at the 001560A9 offset and not a thing changed, so, I would say that the LOD problem is gone for good Thanks a lot!

    I just wish the Alt - P screenshot was saved as 32 bit tga file, not converted to 16bit code, so we can compare easily and pixel-by-pixel - but hey, that call for a different thread
    [COLOR=#333399]"It is dangerous to be right in matters on which the established authorities are wrong." - Voltaire[/COLOR]
    [COLOR=red]...just keep folding, just keep folding...[/COLOR] [Link removed. Only Registered and Activated Users Can See Links.]

  5. Tested on friend AMD Opteron 148 @ 2,7Ghz - WORKS!

    [Link removed. Only Registered and Activated Users Can See Links.] - and - [Link removed. Only Registered and Activated Users Can See Links.]

    Amazing Congratulations, you solved the nasty NFS Porsche Unleashed problem with CPU speed, hoooray!
    [COLOR=#333399]"It is dangerous to be right in matters on which the established authorities are wrong." - Voltaire[/COLOR]
    [COLOR=red]...just keep folding, just keep folding...[/COLOR] [Link removed. Only Registered and Activated Users Can See Links.]

  6. Great work!

    Making this thread sticky
    [Link removed. Only Registered and Activated Users Can See Links.] aka [Link removed. Only Registered and Activated Users Can See Links.]
    [Link removed. Only Registered and Activated Users Can See Links.] webmaster ~ web programmer ~ IT journalist ~ amateur photographer

  7. Another testing on 1,5GHz Sempton (how the hell AMD come up with his marking as 2300+ ...) + 9600 ATI GFX and passed - no troubles whatsover

    However for this old slow CPU also no gain, while the gain on fast CPUs are very very big...! Still it looks no issues are happening with this patch

    Next - 16bit only TGA screenshots to be 32 bit?
    [COLOR=#333399]"It is dangerous to be right in matters on which the established authorities are wrong." - Voltaire[/COLOR]
    [COLOR=red]...just keep folding, just keep folding...[/COLOR] [Link removed. Only Registered and Activated Users Can See Links.]

  8. Thank god people are still working on this game, shows how much it is still appreciated by the real fans Thanks a bunch dude!
    Anyway this did fix the mipmapping problem for me, but strangely it has also brought back the CD-prompt that was removed by V3.5. It asks for a cd (I lost mine ages ago), but starts anyway even though there is no cd in there.

    Also, it did not seem to have fixed the model LOD problem for me. All cars still look really lowpoly, way more than I remember. The roof of each 356 only has 4 polygons in width. Am i imagining things or what's gives? My cpu is a 3.3Ghz Core 2 Quad, if it matters.

  9. The Insert-cd-prompt appears from time to time, usually when there's a CD in my drive - since it starts anyway I never investigated this issue. I still have to run the game on some old PC, to check how it looked like then, but I guess the car models are just lowpoly.

  10. If Game Ask for CD

    I have the NoCDcrack installed but for some reason when i change things from within the game to do some testing .... I will get a message to install CD in drive to start the game after hitting the message cancel button a few time it goes ahead and starts the game without the use of the CD but to fix the issue i go back to my main NFS PU directory and locate the NoCD crack.exe and run it again to solve the issue.

+ Reply to Thread
Page 1 of 4
1 2 3 ... LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  Counter