GithubHelp home page GithubHelp logo

Comments (12)

elishacloud avatar elishacloud commented on June 1, 2024

@wetcoder, I have had some problem getting the game to work on Windows 10 and so have not looked into the issue yet. Can you tell me how you got it working on Windows 10?

Also can you send me a copy of the log file?

from d3d8to9.

wetcoder avatar wetcoder commented on June 1, 2024

@elishacloud

bandicam 2018-02-27 22-42-02-847

TOCA Race Driver 2 v1.2 works on Windows 10 without any problems with NOCD
(works even without any compatibility modes)
The retail version has StarForce DRM that needs to be removed using NOCD

Here is my d3d8.log (d3d8to9 v1.7.0)

default

from d3d8to9.

elishacloud avatar elishacloud commented on June 1, 2024

Thanks, I was able to get the game to run once I patched it to version 1.2. :-)

I can reproduce the issue now.

from d3d8to9.

elishacloud avatar elishacloud commented on June 1, 2024

The reason v1.4.0 and v1.5.0 look different is because of an issue with the CreatePixelShader where the PixelShader failed to compile. The issue was introduced in v1.4.0 with check-in 5d3fb1a line 1756 and was fixed in v1.6.0 with check-in 26f482b line 1699-1700.

As far as the missing gloss on cars that has existed in all versions of d3d8to9 as far back as v1.3.0 (probably back to v1.0.0). More work needs to be done to figure out why the gloss is missing.

from d3d8to9.

elishacloud avatar elishacloud commented on June 1, 2024

The issue is with the very first PixelShader created. It looks like this:

    ps_1_1
    tex t0
    tex t1
    tex t2
    mul r0.xyz, v0, t1
  + mov_sat r0.w, c0.w
    mul r0.xyz, t0, r0
  + add_sat r1.w, t0.w, 1-c2.w /* this line has the issue */
    mul_x2 r1.xyz, t2, t0
  + mul_sat r1.w, r1.w, v0.w
    lrp r0.xyz, r0.w, r1, r0
  + mul r0.w, 1-t0.w, 1-r1.w
    lrp_x2 r0.xyz, r1.w, t2, r0
  + mov_sat t3.w, c0.z
    lrp r0.w, t3.w, 1-r0.w, t0.w

The problem is with the 8th line that says + add_sat r1.w, t0.w, 1-c2.w. In this line the constant c2 has the 1- modifier on it, which is not allowed in d3d9. In older versions (prior to v1.4.0) of d3d8to9 the modifier was simply dropped. In the latest version (v1.7.0) this shader is converted to ps_1_4 and the modifier remains. However in both cases the glossy finish is lost.

I am not sure why converting to ps_1_4 does not fix this. Below is the converted ps_1_4 code. If anyone sees an issue here let me know.

    ps_1_4 /* converted */
    def c1, 0, 0, 0, 0 /* added line */
    phase
    texld r2, t2
    texld r1, t1
    texld r0, t0
    mov r3, c2
    mul r1.xyz, v0, r1
  + mov_sat r4.w, c0.w
    mul r1.xyz, r0, r1
  + add_sat r5.w, r0.w, 1-r3.w
    mul_x2 r5.xyz, r2, r0
  + mul_sat r5.w, r5.w, v0.w
    lrp r1.xyz, r1.w, r5, r1
  + mul r1.w, 1-r0.w, 1-r5.w
    lrp_x2 r1.xyz, r5.w, r2, r1
  + mov_sat r3.w, c0.z
    lrp r1.w, r3.w, 1-r1.w, r0.w

I created a quick hack for Race Driver 2 by manually hard coding ps_1_1 PixelShaders that work. Below is the patch. However this only fixes the issue for this one game. I need to figure out a better generic solution.

Here is the patch for Race Driver 2: d3d8.zip

from d3d8to9.

wetcoder avatar wetcoder commented on June 1, 2024

@elishacloud
Thank you so much!
The colors on the windshield and the body of the car differ slightly.
Such a feeling that there is not enough of a layer and because of this the color / reflection effect is slightly different (but this is a trifle)

rd2 2018-03-01 19-55-47-485
rd2 2018-03-01 19-55-47-486
rd2 2018-03-01 19-55-54-998
rd2 2018-03-01 19-56-32-015

Is it possible to somehow disable log file creation when using d3d8tะพ9.dll?

from d3d8to9.

CookiePLMonster avatar CookiePLMonster commented on June 1, 2024

Logs don't feel useful for end users at this point, I vote for them to be disabled by default IMO.

from d3d8to9.

wetcoder avatar wetcoder commented on June 1, 2024

Simply, I run games from compressed images (ISZ - UltraISO compressed ISO image format) in which the log file can not be written.
And when I start the game, I get the corresponding error about creating a log file

from d3d8to9.

CookiePLMonster avatar CookiePLMonster commented on June 1, 2024

Anyway, it is possible to opt-out of logging by defining D3D8TO9NOLOG in the code.

from d3d8to9.

elishacloud avatar elishacloud commented on June 1, 2024

I created a tool called dxwrapper and while it does not have the logs fully disabled it does log less data. Also it has a feature to automatically load the ISO when the game starts and automatically unload the ISO when the game ends. No need to use UltraISO!

  1. Unzip these 3 files to the Race Driver 2 folder where RD2.exe exists: d3d8.zip
  2. Copy the Race Driver 2 ISO file into this folder and rename it to rld-toc2.iso.
  3. Start the game and enjoy.

Note: this already has the glossy finish fix.

As far as the color issue, I don't believe that is related to this fix. The same issue happens with True Crime: New York City, see here. I suspect it has something to do with the D3DFORMAT being different in d3d9. I am planning to look into the color issue when I look into issue #42.

from d3d8to9.

wetcoder avatar wetcoder commented on June 1, 2024

@elishacloud
I meant that I store and run games directly from compressed iso files (ISZ) (to save space on the hard drive). Ie, I do not need original disks to run games - in my case, games do not have any DRM.
Approximately as disks with games for consoles, where games are started directly from disks.

I do not have installation iso with distributions - I have (ISZ) that I myself create from folders with already installed games in the UltraIso
I just mount the ISZ file with WinMount, it opens as a folder in the explorer (essentially a virtual disk) and then i just run the exe file of the game.
For example, Cuphead after installation takes 11 GB, but if you compress it into ISZ, it weighs only 2.29 GB
The point is that most games have gaming archives with little compression, and some even gaming archives without compression - both can be compressed even more and after compression (up to 10 times) weigh approximately as a repack version - well, in any case, less than the distribution with the game
And since the games are already installed and compressed (no need to store distributions and reinstall them, this is very convenient especially for old games), they can be run from any storage device and computer (in some cases it is required to add certain entries to the registry created after the installation of the game and which require some games)
This works with all games that do not save settings and save files to the game folder (with the exe file)

bandicam 2018-03-02 03-27-30-376

As an option I will use dxwrapper which does not create a log file
if you added support for ISZ files in dxwrapper (automatically load the ISZ when the game starts and automatically unload the ISZ when the game ends. No need to use UltraISO! OR ANY similar tool), I could definitely use it.
It would be cool

from d3d8to9.

elishacloud avatar elishacloud commented on June 1, 2024

You could try using the new LZX compression in Windows 10. It is not quite as good compression as compressed iso file (ISZ) but much easier to manage and no need for UltraISO.

if you added support for ISZ files in dxwrapper (automatically load the ISZ when the game starts and automatically unload the ISZ when the game ends. No need to use UltraISO! OR ANY similar tool), I could definitely use it.

DxWrapper can run any CLI. So if you have a CLI (or a batch file) that can load UltraISO and then unload it when done, this should work already.

from d3d8to9.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.