NFS: Porsche Unleashed

Rob Crittenden <[email protected]>
Newsgroups gmane.comp.emulators.winex.devel
Message-ID <[email protected]>
Hi, I'm working on NFS: Porsche Unleashed again. The problems I was having
before were related to the fact that I hadn't imported the registry properly.

Now I'm seeing more identifiable problems, specifically the app is calling
DirectDraw_CreateSurface without setting DDSD_PIXELFORMAT. This is causing
bpp to be 0 and was generating an assert() in ddraw/main.c:549. I removed
the assert and defaulted to bpp=16 in order to get the app running. I get
an EA intro screen and then a short video gets played fine (although
sometimes at hyper speed, but that's another story). It then goes to a
splash screen for a while, then crashes, I believe when the game main menu
is to be displayed.

I goofed around setting random bits in the structure but I'm really just
shooting in the dark.

I'm using a nearly up-to-date CVS pull (from yesterday).

I've attached a trace with +ddraw,+bitmap,+seh.

cheers

rob

BTW: I applied a few minor, goofball traces to get more info, the diff is:

Index: main.c
===================================================================
RCS file: /cvsroot/winex/dlls/ddraw/main.c,v
retrieving revision 1.25
diff -u -r1.25 main.c
--- main.c      25 Jul 2003 21:44:54 -0000      1.25
+++ main.c      29 Jan 2004 01:29:58 -0000
@@ -546,7 +546,12 @@
 {
     LONG pitch;
 
-    assert(bpp != 0); /* keeps happening... */
+    TRACE("(%08lx, %08lx)\n", width, bpp);
+    if (bpp == 0) {
+        WARN("bpp == 0, defaulting to 16\n");
+        bpp = 16;
+    }
+//    assert(bpp != 0); /* keeps happening... */
 
     if (bpp == 15) bpp = 16;
     pitch = width * (bpp / 8);
Index: ddraw/main.c
===================================================================
RCS file: /cvsroot/winex/dlls/ddraw/ddraw/main.c,v
retrieving revision 1.76
diff -u -r1.76 main.c
--- ddraw/main.c        4 Jan 2004 16:49:47 -0000       1.76
+++ ddraw/main.c        29 Jan 2004 01:30:02 -0000
@@ -680,6 +680,10 @@
        }
        if (pf->dwFlags & DDPF_ALPHAPIXELS)
            TRACE(" pf-ALPHA-BitMask: %08lx\n", pf->u5.dwRGBAlphaBitMask);
+    } else {
+       LPDDPIXELFORMAT pf = &pDDSD->u4.ddpfPixelFormat;
+        TRACE(" No bpp, defaulting to 16\n");
+        pf->u1.dwRGBBitCount = 16; // this is bad
     }
 
     if (pUnkOuter != NULL) {

_______________________________________________
winex-devel mailing list
[email protected]
http://lists.transgaming.org/cgi-bin/mailman/listinfo/winex-devel
nfs.out.bz2 (application/x-bzip2, 20.4 KB) - not displayed
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.