Menu

Grand Prix World

Veedub
2013-06-07
2023-03-01
1 2 3 .. 7 > >> (Page 1 of 7)
  • Veedub

    Veedub - 2013-06-07

    Hey there

    Im trying to get an old game called Grand Prix World working in windowed mode. I think the game was developed around 1999 using directx 6.1. It also requires Windows to be configured to 16-bit display before it will run. I've tried DxWnd but the game seems quite stubborn to only open in full screen mode (which is 800x600).

    Any tips on what options I should use in DxWnd? I havent been able to locate an indepth guide for DxWnd.

    The game works under Windows 98/XP/7, assuming the display has been set to 16-bit. If I could get it working in windowed mode with DxWnd and emulate the 16-bit display, that would be great!

    I think there is a torrent of the game available to download but there are a few tricks to get it working properly under WinXP/7 (DX audio related). I know the internal game files fairly well if you have any questions.

    Cheers

     
  • gho

    gho - 2013-06-07

    Setting "Windows" / "Simulate 16BPP desktop" gets rid of the statup dialog, but the game doesn't start because of a creation failure in one of the ddraw surfaces, no matter whether in emulation mode or not.
    It seems an interesting problem: I have to find what's wrong with the createsurface parameters and hope there's an easy way to fix them.
    Wait for news....

     
  • Veedub

    Veedub - 2013-06-08

    Thanks gho! From what I know, and can see on the screen, the start up order of the game goes like this:

    • check for 16bpp
    • launch 800x600 borderless window
    • switch to full screen
    • show gold FIA logo
    • play intro AVI movie
    • show game screen

    intro AVI movie can be turned off inside the game, in the game options screen, under 2D graphics, "Play animations". the game is mostly 2D graphics, and only renders 3D models (.x/.ppm) of cars over a 2D surface, so it may use DirectDraw heavily.

    edit: dont worry about the below issue - it may be a game/cd issue and theres an updated exe that i'm testing out

    as a side note, on WinXP/7 systems, if "Race Sound Effects" audio is switched on, the game crashes when watching the racing screens. we managed to get around this on WinXP by reducing WinXP's audio hardware acceleration to Low/Off but there is no such setting on Win7 anymore. any idea why this might be the case? again, i think it uses an early version of DirectSound. no problems if you dont know.

    thanks for taking a look into this :)

     

    Last edit: Veedub 2013-06-09
  • gho

    gho - 2013-06-17

    I made some slight progress.
    First of all I tried the game setting the desktop to 16BPP color depth: with Win7 that isn't as easy as it was in WinXP, but searching through the graphic card tools I found a way. When things will be finished, I may add a "switch to 16BPP" option to DxWnd.
    Then, there was an annoying control that caused the program to always terminate with an error dialog box. I got rid of that in a quick & dirty way: find attached a further-patched version of your gpwxp.exe file. I simply changed a conditional jump to unconditional.
    In this way, using the setting in the exported file, the game is almost working: movies are awful, probably because the video is supposed to be set in some weird way, and the mouse is doubled causing some odd blitting outside the window's area.
    But it's a beginning: what do you think?

     

    Last edit: gho 2013-06-17
  • Veedub

    Veedub - 2013-06-20

    Thanks Gho, that's more progress than anyone else has ever made! :)

    I managed to get it running in windowed mode on my system using your files. I have noticed some mouse cursor issues before under full screen on Windows 7, so that may more be OS related. But yeah, in windowed mode it functions pretty well considering. :)

    I think Alt-Tab crashes the game under Windows 7, so switching in/out of the window may prove troublesome.

    I appreciate your efforts. I'll keep checking in regularly. :)

     
    • gho

      gho - 2013-06-28

      A small update: finally I got a way to avoid the ddraw initial surface checks and activate the game in emulation mode.
      I hoped to eliminate the cursor glitches and have a more stable game, but with my surprise the game uses surface hardware acceleration features, so it blurs the whole screen with a red colored mess.... not much of an improvement, especially after so many attempts!
      But who knows: maybe there's a fix for this problem as well. Working by congeptures and assemly patches requires some time and a lot of patience.....

       
  • Veedub

    Veedub - 2013-06-29

    Thanks for the update Gho, I hope its an interesting challenge! I'm in the process of making my second editor for the game (meddling with IDA Pro while I go along), so I have plenty of that much needed patience, just a lack of skill. :)

     
  • gho

    gho - 2013-06-29

    Some further improvement: I had to do a couple of things....

    1) fix DxWnd to handle the ddraw surface capabilities: the game checks for DDSCAPS_3DDEVICE capability that is stripped in emulation mode, so I had to add it. The operation has to be investigated a little, but for this game works fine.

    2) fix DxWnd to take proper account that (surprisingly!) after you release the backbuffer surface this is still present and usable. It's odd, but, again, it works!

    3) fix the game exe to eliminate an "offendig" code section that war responsible to copy the cursor region directly to screen. The game cursor works perfectly also without it, anc crashes no more!

    4) modify the DxWnd game configuration, because the game still accesses to physical resources, so it MUST run in 16BPP desktop resolution and 655 color schema.

    So, if you want to try it, do the following:

    a) download the latest v2_02_24f1 DxWnd fix

    b) import the attached game configuration file (this is not necessary, but just in case...)

    c) copy in the game dir the new patched exe

    Ah, before I forget: there's no way to see the game movies, so far. Maybe later on....

    Enjoy and have a goood time with your game editors!

     

    Last edit: gho 2013-06-29
  • Veedub

    Veedub - 2013-07-01

    fantastic! i gave the new file a go and all appears to work well :)

    one final question (hopefully) - is it possible to keep the game running when the window doesnt have focus? for example, the races can take a long time to watch, so people may want to browse the internet, take strategy notes etc. while the game continues in the out-of-focus window. or is this something that is limited by the game/graphics code?

    but otherwise:
    - game speed is normal/good
    - cursor is smooth, no trailing cursors, even team coloured cursors still work
    - screenshots work, switching apps works, clicking outside dxwnd works etc.
    - not too worried about the avi files - you can still hear the audio, and it doesnt crash the game, so not an issue. i think most players turn the tacky movies off anyway.

     
  • Veedub

    Veedub - 2013-07-01

    in addition to the post above - i just noticed that in the race screen, the game freezes/stutters with mouse cursor movement. so in other words, the cars stop moving when you move the cursor in a constant circle, and when you stop moving the mouse, the cars move again. hopefully not a difficult issue to resolve, but otherwise i'm very impressed by the work you have done. thank you

     
    • gho

      gho - 2013-07-01

      Some news and infos:

      1) Running the game without focus - that requires the "intercept Alt-F4 key" flag set, but I checked and saw that the game seems to detect the event of lost focus and freezes itself. If you want it to continue, I'll have to investigate and see what I can do.

      2) Avi files: curiously, today I noticed that on my XP laptop movies were perfectly rendered with the new v2.02.25 release. Then, I tried again at home on my Win7 PC, and movies were visible, but scrambled. Maybe thad depends on the OS, maybe on the graphic card. In any case, I wish you good luck and I suggest you to try the just uploaded new release. The game setting shoud be left unchanged. If things don't turn for better, stick to the previous release.

      3) game freezing/stuttering: I noticed that, but without associating the fact to the mouse movements. I'll investigate that as well. It may depend on some bad surface locking when the game draws the cursor directly on the screen surface.

      4) timing issues: if you're concerned about the simulation time, why don't you check the "Time stretch" flag and play a little with the Time Slider form or the Alt-F5/F6 command keys? It seems to work pretty well with this game...

      Well, I'm just too sorry I don't have much time to dedicate to this hacking fun, but unfortunately I'm a business man with little spare time and a family to feed. I'm proud and happy to have fixed some of your issues. Thank you for appreciating it.

      GHO

       

      Last edit: gho 2013-07-01
  • Veedub

    Veedub - 2013-07-02

    Thanks again Gho, no worries. Take a break, you have done enough on this game for now. I'm sure through future releases there may be improvements that solve the issues. :)

    For your information and for others that read this thread in the future. I tested out the suggestions above but didnt have much luck:
    1) No difference using intercept Alt-F4 key.
    2) No difference with Avi files (sound only) with 2.02.25 release (on my Windows 7 Lenovo T42 laptop)
    3) Confirmed the first patched exe at the top of this thread didnt have the same problem with stuttering due to mouse movement as in the second patched exe. So like you say it may be due to surface locking etc. with the cursor fix.
    4) I couldnt get time stretch flag to work, or the frame rate overlay. Not sure why the time stretch flag didnt work, as people have used SpeedUp in the past (with various results).

    I'll go off and announce the news to the GPW community. Thank you for your help! :)

     
  • Veedub

    Veedub - 2013-11-10

    Hi Gho, thanks for your help earlier on this game! Its helped hugely with debugging :)

    Earlier quote from me: "as a side note, on WinXP/7 systems, if "Race Sound Effects" audio is switched on, the game crashes when watching the racing screens"

    Good news, I managed to fix this - I had to NOP out two memsets in the code that randomly received addresses outside the program's memory area - crashing the game on XP/7 but not on 98. Not pretty but it works.

    Now that our game community has a solution to the sound problem, we can now revert to the best executable that was ever released for the game (as below) - gpw.exe v1.01 has all the official bug fixes, that unfortunately did not make it into the gpwxp.exe version.

    Grand Prix World Patch 1.01 - 27th July 2000:
    http://www.edwardgrabowski.com/downloads.htm

    I hope its not a big ask, but can you please reapply the changes you made to the gpwxp.exe file to the gpw.exe file in the link above? Perhaps this will be a slightly easier task with the DxWnd version changes that have occured since?

    gpw.exe 1.01 will become the new base that we will use for the game and future enhancements. But without DxWnd support, I cant debug and further to that, your changes also helped people who were getting flickering issues (at full screen) with NVidia gfx cards. So we would be ever so grateful! Actually, let us know if you have a donation box. :)

    Cheers
    Veedub

    P.S. to get around the game CD check, add a folder to the game dir called "xox" and add a file inside that folder called "house.dat" (a blank txt file). It takes a different route through the code (not necessarily better) but will get you in. This version has no safedisc protection either, so is fine to work with in its current state.

     
    • gho

      gho - 2013-11-10

      I'll try to do my best.
      I just saw that with DxWnd and the same settings the patched gpwxp was working while gpw release 1.01 did not.
      I do hope it won't take long....

      UPDATE:
      Having to patch the game is an annoying thing indeed! I hope this debug dxwnd release fixes the problem: with it you should be able to run the original gpw.exe (I tried the one in http://www.edwardgrabowski.com/downloads.htm). At least, it worked fine on my computer. Before making it into an official release I'll have to check for the correct behaviour in all possible conditions, but so far and for gpw that should be it!
      Let me know if there is more I can do before I get the official release out.
      And about the donation box, I have none, but I'm starting to think it should not be a bad idea....
      Find the dxwnd and gpw import file in attach.

       

      Last edit: gho 2013-11-12
  • Veedub

    Veedub - 2013-11-14

    Hi Gho, thanks for your quick turn around. No luck for me I'm afraid.

    Tested on two systems (both Windows 7, 32 bit OS).

    Downloaded the attachment
    Launched DxWnd
    Imported DXW file
    Updated path to game exe (gpw.exe 1.01 file)
    Click run but fails to launch the game (no window appears and no task starts it seems)
    With DxWnd trace logging turned on, no log is created either

    As we typically set Compatibility Mode on the file itself to Windows 98/Me (as is required for the game to launch), I tried turning this off. DxWnd now runs/launches the game but I get a white screen after the gold FIA logo (with Not Responding in the title bar), no sounds.

    If I point DxWnd to use the gpwxp.exe file (with no Compatibility mode set), same thing but the window remains black and I can hear the sounds playing. Same goes for the earlier DxWnd patched gpwxp.exe from earlier in thread (with all the changes you had made to it).

    So in other words, the official gpw.exe launches but appears to freeze on a white screen and the official gpwxp.exe runs but shows no graphics (even after the invisible AVI movie of course).

    FWIW, gpw.exe 1.01 was compiled with VC++4 and gpwxp.exe with VC++5. If you have problems reversing gpw.exe (e.g. Idapro), I do have a version that has revised switch idioms/jump tables so that it can be decompiled fully. I'm sure that's not the issue here but if you need to get inside and alter the start up code and gfx init, you will probably need my version to get a successful decompilation. I can upload this if needs be.

    However, it sounds like your making some great progress with DxWnd in general! The breakthrough will come one way or another. :)

     
    • gho

      gho - 2013-11-14

      Have you tried to launch DxWnd with administrator's pribviliges? That is required to start games with compatibility modes set. I didn't suggest it before because the game seems to be working pretty well on my pc without any compatibility mode, but you never know....

       
  • gho

    gho - 2013-11-16

    Veedub, I think I made some sort of progress ans I am about to publish a new dxwnd release, but something strange happened:
    after so many attempts, now the gpw.exe game shows the splash screen (the one before the intro movie) and freezes, no matter whether I laung it with or without dxwnd.
    The crazy thing is the game worked before, and now it is not working anymore, either with olter versions of dxwnd and after uninstalling and installing it.
    Is it a somehow known problem and what could I do to fix it?
    btw, the other exe gpwxp.exe is working file, now even without my patch.

     
  • Veedub

    Veedub - 2013-11-17

    Hi Gho, sorry for the delay in getting back to you. Thanks, running DxWnd with admin rights did fix the launching problem with the game, even with compatibility modes turned off on the exe itself.

    But unfortunately no luck with both original exes. They launch successfully, and you can hear the AVI finish and then hear the game menu 'music' but the window is just black the whole way through, so no gfx. I've had another guy test and he had the same issue. But no worries, we can test again once you have a new versoin up and running.

    If the splash screen you refer to is the gold FIA logo, then the game is known to freeze on that screen if compatibility mode is not set to Windows98/Me on the exe. Set it, and try again and it should work. Maybe a recent change you made broke it again. :)

    Thanks again for taking time out to get this working for us, and no rush from my side of things. Cheers

     
    • gho

      gho - 2013-11-17

      About the black screen, I had a horrible suspicion: I introduced some debug features that prevent certain blitting operation to complete. Would you mind to do the following?

      1) start dxwnd with the /debug option (i.e. typing "dxwnd /debug" at the command prompt, or adding "/debug" to a dxwnd shortcut
      2) update the game configuration and in the debug tab (visible only in this way) uncheck all flags (mainly the three Suppress ones)
      3) run the game: if it works, save the configuration!

      I don't know if this is the case, but for sure next dxwnd release is going to disable all debug stuff when not wanted!

       
  • Veedub

    Veedub - 2013-11-18

    Awesome, I got it working! :) Nope, it wasnt the debug flags, they were all off already. It was actually because my screen color depth was set to 16 bit in Windows 7. Once I changed it to 32 bit it worked perfectly! Strange but true...

    I see the time stretch feature and the AVI files are also working now. Very cool!

    Here's a few issues I noticed, and I know some of them are by design, so its more a FYI as the issues may affect other games too. These issues came up with rough testing with two/three versions of the game I have.

    • Windows 7 screen resolution must be 32 bit when running the game from DxWnd. When in 16 or 24 bit, no graphics show in windowed mode.
    • However the good news is that DxWnd correctly fools the game into thinking that the screen is in 16 bit (i.e. the in-game prompt asking for 16 bit is not triggered).
    • DxWnd needs to be launched with admin rights to be able to launch a exe with compatibility mode set on the file. GPW by nature requires compatibility mode set to Windows 98/Me to prevent the game freezing at the Gold FIA logo splash screen.
    • Using compatibility mode options on DxWnd tab does not appear to provide a workaround/resolve this issue.
    • Mouse cursor flickers when moving the cursor.
    • Race graphics/engine and AVI graphics freeze momentarily while/when moving the cursor.
    • Unable to exit the game from within the game cleanly, game just freezes - have to kill task using DxWnd option.

    ^^ All minor issues in the grand scheme of things, although there may be people out there without 32 bit screen support. More good news, debugging works! So I can keep on fixing bugs/making game enhancements.

    I echo the thoughts of someone who mentioned a faux full screen mode, as DxWnd resolves a lot of game issues on its own, that would be useful to use in full screen. No major tho!

    And yes that donation box will help you pay for the coffees/beers that you need! Your work is nothing short of fantastic. :)

    Cheers on behalf of all the guys at gpracegames.com

     
    • gho

      gho - 2013-11-19

      Some quick answers:

      When in 16 or 24 bit, no graphics show in windowed mode

      weird! I'll have a look

      Using compatibility mode options on DxWnd tab does not appear to provide a workaround ...

      Sure. Windows compatibility mode does more than just faking the OS release... On my PC I'm having troubles on running the game with compatibility modes set, so I'm interested to know what Window does on the game in Win95/98 compat mode to replicate it in DxWnd. Does anyone know?

      Mouse cursor flickers when moving the cursor

      I noticed that the effect seems to be much greater when desktop is in AERO mode. Does that hold for you too?

      Unable to exit the game from within the game cleanly

      It's jus a silly workaround, but setting Intercept Alt-F4 key flag and typing Alf-F4 provides a handy workaround, of course at the price of a possible tragic mistake when typed mistakenly in the middle of a season!

       

      Last edit: gho 2013-11-19
  • aqrit

    aqrit - 2013-11-22

    That last link is very interesting! Thanks for sharing.
    I wonder if it possible to pass that in the environment block when calling CreateProcess()

     
  • Veedub

    Veedub - 2013-11-23

    I wouldnt see why not, the KB article may help:
    http://support.microsoft.com/kb/286705

    I'm new to this area but I take it the environment block would be able to contain the required 'set' commands you'd need.

     
  • gho

    gho - 2013-11-23

    It would be pretty easy to add this trick to dxwnd when it starts the process (mind you: that's not always true. It could hook a process right after it is started!), but I tried the suggested example from the Win7 command prompt (the "cmd" exe) addinf a switch to 256 color, but nothing happens. Same thing holds for gpw.exe adding Win98 compatibility: the game keeps freezing after the splash screen, both with and without dxwnd.
    I wonder if the trick is still supported on Win7 and later....

     
1 2 3 .. 7 > >> (Page 1 of 7)

Log in to post a comment.