Re: [d3d9/device.c] IDirect3DDevice9Impl_GetDepthStencilSurface problem

2005-02-04 Thread Carlos Lozano

Hello Again,

Adding "if (*pStream != NULL)" the game works flawless :)

HRESULT  WINAPI  IDirect3DDevice8Impl_GetStreamSource(LPDIRECT3DDEVICE8 iface, 
UINT StreamNumber,IDirect3DVertexBuffer8** pStream,UINT* pStride) { 
 IDirect3DDevice8Impl *This = (IDirect3DDevice8Impl *)iface;
 TRACE("(%p) : StreamNo: %d, Stream (%p), Stride %d\n", This, StreamNumber, 
This->StateBlock->stream_source[StreamNumber], 
This->StateBlock->stream_stride[StreamNumber]);
 *pStream = This->StateBlock->stream_source[StreamNumber];
 *pStride = This->StateBlock->stream_stride[StreamNumber];
 if (*pStream != NULL) 
IDirect3DVertexBuffer8Impl_AddRef((LPDIRECT3DVERTEXBUFFER8) *pStream);
 return D3D_OK;
}

Regards,
Carlos.

-- 
 ___ _  \  |  /  Consulting
| . |._ _  _| | ___  ___  ___http://www.andago.com
|   || ' |/ . |<_> |/ . |/ . \__ GNU/Linux
|_|_||_|_|\___|<___|\_. |\___/ _ \  __|\ \  /
 Carlos A. Lozano   <___'/ | \ -_) __/\__ \ >  <  -_)
 [ [EMAIL PROTECTED] ]\___|_|  / _/\_\___|
 [ [EMAIL PROTECTED]   ]  http://www.ePSXe.com



Re: [d3d9/device.c] IDirect3DDevice9Impl_GetDepthStencilSurface problem

2005-02-04 Thread Carlos Lozano
El vie, 04 de feb de 2005, a las 18:14, Carlos Lozano escribio:
> 
> Hello,
> 
> El mar, 01 de feb de 2005, a las 07:05, Oliver Stieber escribio:
> > 
> > The big patch won't be CVS worthy but it will have
> > things like non-power-2 textures if anyone wants to do
> > some testing since I've only tested against an ATI
> > 9600. 
> 
> I have "pasted" your non-power-2 textures support to d3d8 code, and
> now i can see the intro in tony hawks 4 demo :) (i have a Geforce 2 GTS,
> so your code works in NVIDIA cards :).
> 
> Now it crashes after of press start with:
> 
> wine: Unhandled exception (thread 0009), starting debugger...
> WineDbg starting on pid 0x8
> Unhandled exception: page fault on write access to 0x0004 in 32-bit code 
> (0x409fe785).
> In 32 bit mode.

And removing this call:
//IDirect3DVertexBuffer8Impl_AddRef((LPDIRECT3DVERTEXBUFFER8) *pStream);

in:

HRESULT  WINAPI  IDirect3DDevice8Impl_GetStreamSource(LPDIRECT3DDEVICE8 iface, 
UINT StreamNumber,IDirect3DVertexBuffer8** pStream,UINT* pStride) { 
IDirect3DDevice8Impl *This = (IDirect3DDevice8Impl *)iface;
TRACE("(%p) : StreamNo: %d, Stream (%p), Stride %d\n", This, StreamNumber, 
This->StateBlock->stream_source[StreamNumber], 
This->StateBlock->stream_stride[StreamNumber]);
*pStream = This->StateBlock->stream_source[StreamNumber];
*pStride = This->StateBlock->stream_stride[StreamNumber];
//IDirect3DVertexBuffer8Impl_AddRef((LPDIRECT3DVERTEXBUFFER8) *pStream);
return D3D_OK;
}

The game (really it is a demo), is playable :)

Regards,
Carlos.

-- 
 ___ _  \  |  /  Consulting
| . |._ _  _| | ___  ___  ___http://www.andago.com
|   || ' |/ . |<_> |/ . |/ . \__ GNU/Linux
|_|_||_|_|\___|<___|\_. |\___/ _ \  __|\ \  /
 Carlos A. Lozano   <___'/ | \ -_) __/\__ \ >  <  -_)
 [ [EMAIL PROTECTED] ]\___|_|  / _/\_\___|
 [ [EMAIL PROTECTED]   ]  http://www.ePSXe.com



Re: [d3d9/device.c] IDirect3DDevice9Impl_GetDepthStencilSurface problem

2005-02-04 Thread Carlos Lozano

Hello,

El mar, 01 de feb de 2005, a las 07:05, Oliver Stieber escribio:
> 
> The big patch won't be CVS worthy but it will have
> things like non-power-2 textures if anyone wants to do
> some testing since I've only tested against an ATI
> 9600. 

I have "pasted" your non-power-2 textures support to d3d8 code, and
now i can see the intro in tony hawks 4 demo :) (i have a Geforce 2 GTS,
so your code works in NVIDIA cards :).

Now it crashes after of press start with:

wine: Unhandled exception (thread 0009), starting debugger...
WineDbg starting on pid 0x8
Unhandled exception: page fault on write access to 0x0004 in 32-bit code 
(0x409fe785).
In 32 bit mode.
Register dump:
 CS:0023 SS:002b DS:002b ES:002b FS:1007 GS:0007
 EIP:409fe785 ESP:406cf968 EBP:406cf98c EFLAGS:00210212(   - 00  - RIA1)
 EAX:0004 EBX:40a16520 ECX: EDX:0001
 ESI: EDI:4039e480
Stack dump:
0x406cf968:  401ee3c0 406cf9a0 401b3fd0 4034001c
0x406cf978:  48f16240 48f16248 40a16520 
0x406cf988:  4039e480 406cf9c0 409d2bec 
0x406cf998:   48f16248 406cf9cc 409dc13c
0x406cf9a8:  4034 0002 48f16248 
0x406cf9b8:  422ae310  422abab0 0042c28e
0200: sel=1007 base=40018000 limit=1f97 32-bit rw-
Backtrace:
=>1 0x409fe785 IDirect3DVertexBuffer8Impl_AddRef(iface=0x0) 
[/mnt4/calb/wine/wine/dlls/d3d8/../../include/winbase.h:2076] in d3d8 
(0x406cf98c)
  2 0x409d2bec IDirect3DDevice8Impl_GetStreamSource(iface=0x4039e480, 
StreamNumber=0x0, pStream=0x406cf9e4, pStride=0x406cf9e8) 
[/mnt4/calb/wine/wine/dlls/d3d8/device.c:4442] in d3d8 (0x406cf9c0)
  3 0x0042c28e in skate4demo (+0x2c28e) (0x422abab0)
  4 0x65646f6d (0x0052d718)
  5 0x00457ac0 in skate4demo (+0x57ac0) (0x00456320)
0x409fe785 IDirect3DVertexBuffer8Impl_AddRef+0x25 
[/mnt4/calb/wine/wine/dlls/d3d8/../../include/winbase.h:2076] in d3d8: lock 
xaddl %edx,0x0(%eax)
2076__asm__ __volatile__( "lock; xaddl %0,(%1)"

Regards,
Carlos.

-- 
 ___ _  \  |  /  Consulting
| . |._ _  _| | ___  ___  ___http://www.andago.com
|   || ' |/ . |<_> |/ . |/ . \__ GNU/Linux
|_|_||_|_|\___|<___|\_. |\___/ _ \  __|\ \  /
 Carlos A. Lozano   <___'/ | \ -_) __/\__ \ >  <  -_)
 [ [EMAIL PROTECTED] ]\___|_|  / _/\_\___|
 [ [EMAIL PROTECTED]   ]  http://www.ePSXe.com



Re: [d3d9/device.c] IDirect3DDevice9Impl_GetDepthStencilSurface problem

2005-02-03 Thread Paul van Schayck
On Thu, 3 Feb 2005 14:45:43 -0700, Jesse Allen <[EMAIL PROTECTED]> wrote:
> On Thu, 3 Feb 2005 22:01:39 +0100, Paul van Schayck <[EMAIL PROTECTED]> wrote:
> I think he needs to update configure.ac in the top level directory.

Yeah figured it. Changed confgure.ac and configure and the Makefile was created.

Warcraft 3 works in d3d mode (I believe it didn't before). And World
of Warcraft seems to get a bit further aswell. WoW doesn't work in
opengl mode (problem with the minimap).

Paul



Re: [d3d9/device.c] IDirect3DDevice9Impl_GetDepthStencilSurface problem

2005-02-03 Thread Jesse Allen
On Thu, 3 Feb 2005 22:01:39 +0100, Paul van Schayck <[EMAIL PROTECTED]> wrote:
> Hey Oliver,
> 
> 
> Might just be me and my lack of knowledge about the wine build
> process. But I applied your patch and your Makefile.in in dlls/d3dx9/
> doesn't get turned into a Makefile.
> Did you forget to diff something or is it me?
> 
> Thanks,
> Paul
> 
> 


I think he needs to update configure.ac in the top level directory.



Re: [d3d9/device.c] IDirect3DDevice9Impl_GetDepthStencilSurface problem

2005-02-03 Thread Holly Bostick
Oliver Stieber wrote:
 --- Jesse Allen <[EMAIL PROTECTED]> wrote: 
Now here's a bit of news:  Star Wars: Battlefront
works now!  Well it
loads to the menu and a thead crashes (ie music is
still playing, but
the menu is stuck).  I'll investigate later.  I
think you fixed it
with your volume fixes.
binkw32.dll (bink video) is crash happy, that's used
for the intro and cutscenes. It may be possibly to
make a simple linux version because you can get bink
for linux. (or a version that displays the text 'thank
you for disabling bink'. 

Just FYI, in case it's helpful, there is a native application that 
allows bink video to be played within a native game--

nwmovies lets you use the BinkPlayer for Linux to play the unconverted 
Neverwinter Nights movies in-game (it also allows you to play them via 
mplayer and possibly plaympeg, after conversion).

According to the readme:
What little bit of this that is copyrightable is copywritten by David 
Holland [EMAIL PROTECTED] You may do what you wish with this code 
so long as some credit is given to me, and the copyright is maintained.

So you might want to drop by the website at 
http://home.woh.rr.com/nwmovies/nwmovies/ or contact the author to see 
if there's anything you can use, as it does work.

HTH,
Holly


Re: [d3d9/device.c] IDirect3DDevice9Impl_GetDepthStencilSurface problem

2005-02-03 Thread Paul van Schayck
Hey Oliver,

On Thu, 3 Feb 2005 14:07:51 + (GMT), Oliver Stieber
<[EMAIL PROTECTED]> wrote:
> I've just put up a small website that you can get a
> diff of my wine as of today from
> http://www.oliverthered.f2s.com/projects/wine/ with
> the diff you should be able to run Pirates and Axis
> and Allies 2 okish, I haven't checked half life 2 or
> far cry yet.
> 
> The diff still has some 'alpha' work in it that I'm
> cleaning up at the moment (well as soon as I've run a
> spell checker on my website!).

Might just be me and my lack of knowledge about the wine build
process. But I applied your patch and your Makefile.in in dlls/d3dx9/
doesn't get turned into a Makefile.
Did you forget to diff something or is it me?

Thanks,
Paul



Re: [d3d9/device.c] IDirect3DDevice9Impl_GetDepthStencilSurface problem

2005-02-03 Thread Oliver Stieber
 --- Jesse Allen <[EMAIL PROTECTED]> wrote: 
> On Thu, 3 Feb 2005 14:07:51 + (GMT), Oliver
> Stieber
> <[EMAIL PROTECTED]> wrote:
> > I've just put up a small website that you can get
> a
> > diff of my wine as of today from
> > http://www.oliverthered.f2s.com/projects/wine/
> with
> > the diff you should be able to run Pirates and
> Axis
> > and Allies 2 okish, I haven't checked half life 2
> or
> > far cry yet.
> > 
> 
> Yeah, I have tried it out.  Anyways, the problem
> before wasn't
> numlock, but that Pirates would get stuck in the
> transition before
> loading the ocean screen.  You can hear the
> seagulls, that's it.  But
> you patch fixes that.  I can also enter town without
> crashing now. 
> However there are other crashes in mss32 now -- in
> _AIL_3D_distance_factor and in another case
> AIL_debug_printf.  The
> first one happened when I hit 5 to attack a ship.
> 
> Now here's a bit of news:  Star Wars: Battlefront
> works now!  Well it
> loads to the menu and a thead crashes (ie music is
> still playing, but
> the menu is stuck).  I'll investigate later.  I
> think you fixed it
> with your volume fixes.
> 
binkw32.dll (bink video) is crash happy, that's used
for the intro and cutscenes. It may be possibly to
make a simple linux version because you can get bink
for linux. (or a version that displays the text 'thank
you for disabling bink'. 


I'm using these dll overrides.. &co... 
(well they change from time to time!).

[Version]
;"Windows" = "winxp"
"Windows" = "win98"
;Windows" = "nt40"
;"Windows" = "winme"
[DllOverrides]
"rpcrt4"   = "builtin, native"
"oleaut32" = "builtin, native"
"ole32"= "builtin, native"
"commdlg"  = "builtin, native"
"comdlg32" = "builtin, native"
"ver"  = "builtin, native"
"version"  = "builtin, native"
"shell"= "builtin, native"
"shell32"  = "builtin, native"
"shfolder" = "builtin, native"
"shlwapi"  = "builtin, native"
"shdocvw"  = "builtin, native"
"lzexpand" = "builtin, native"
"lz32" = "builtin, native"
"comctl32" = "builtin, native"
"commctrl" = "builtin, native"
"advapi32" = "builtin, native"
"crtdll"   = "builtin, native"
"mpr"  = "builtin, native"
"winspool.drv" = "builtin, native"
"ddraw"= "builtin, native"
"dinput"   = "builtin, native"
"dsound"   = "builtin, native"
"opengl32" = "builtin, native"
"msvcrt"   = "native, builtin"
"msvideo"  = "builtin, native"
"msvfw32"  = "builtin, native"
"mcicda.drv"   = "builtin, native"
"mciseq.drv"   = "builtin, native"
"mciwave.drv"  = "builtin, native"
"mciavi.drv"   = "native, builtin"
"mcianim.drv"  = "native, builtin"
"msacm.drv"= "builtin, native"
"msacm"= "builtin, native"
"msacm32"  = "builtin, native"
"midimap.drv"  = "builtin, native"
"msi"  = "native, builtin"
"msiexec.exe"  = "native, builtin"
"d3dxoff.dll" = "native, builtin"
"dinput8" ="builtin, native"
"d3dxoff" = "native, builtin"
"d3dxof" = "native,builtin"
"d3dxof.dll" = "native, builtin"
"d3d9" = "builtin, native"
; you can specify applications too
"notepad.exe"  = "native, builtin"
; default for all other dlls
"*" = " builtin, native"

--snip --

[x11drv]
; Number of colors to allocate from the system palette
"AllocSystemColors" = "100"
; Use a private color map
"PrivateColorMap" = "N"
; Favor correctness over speed in some graphics
operations
"PerfectGraphics" = "N"
; Color depth to use on multi-depth screens
;;"ScreenDepth" = "16"
; Name of X11 display to use
;;"Display" = ":0.0"
; Allow the window manager to manage created windows
"Managed" = "Y"
; Use a desktop window of 640x480 for Wine
"Desktop" = "1024x768"
; Use XFree86 DGA exten


Turn on pixel shaders using regedit.

wine regedit 

[local_machine] software/wine/Direct3D PixelShaderMode
 enabled


and my .wine/windows/system32 looks like this...
===
ASYCFILT.DLL  IR41_QC.dll  QuickTime.qts  
atl.dll   dmusic.dllmsimsg.dll   
msxml3a.dll   regsvr32.so   stdole32.tlb
ATPartners.dllIR41_QCX.dll
QuickTimeCheck.ocx  bridge.dlldrivers  
msisip.dllmsxml3r.dll   riched20.dll 
unregister.exe
AcsProxy.dll  ImgConv.dll 
QuickTimeFavorites.qtr  cabinet.dll   ezines.dat   
msls31.dllmsxmlr.dllsaie.exe 
user32.dll
AcsProxy.lib  Indeo4.qtx   QuickTimeVR.qtx
chat.dat  foo   mspatcha.dll 
ole32.dll saie.log  usp10.dll
Ati Dogs.scr  MSVCP60.DLL  SIntf16.dll
comctl32.dll  home.dat  msvbvm60.dll 
oleacc.dllsaie_kyf.dat  videos.dat
COMCAT.DLLMSVCP71D.DLL SIntf32.dll
comdlg32.oca  imagehlp.dll  msvcirt.dll  
oleaut32.dll  saieau.datwinebrowserlink
CmdLineExt03.dll  MSVCR71D.DLL SIntfNT.dll
comdlg32.ocx  jao.dll   msvcp71.dll  
olepoosdbapi.dllwinebrowserlink.

Re: [d3d9/device.c] IDirect3DDevice9Impl_GetDepthStencilSurface problem

2005-02-03 Thread Jesse Allen
On Thu, 3 Feb 2005 14:07:51 + (GMT), Oliver Stieber
<[EMAIL PROTECTED]> wrote:
> I've just put up a small website that you can get a
> diff of my wine as of today from
> http://www.oliverthered.f2s.com/projects/wine/ with
> the diff you should be able to run Pirates and Axis
> and Allies 2 okish, I haven't checked half life 2 or
> far cry yet.
> 

Yeah, I have tried it out.  Anyways, the problem before wasn't
numlock, but that Pirates would get stuck in the transition before
loading the ocean screen.  You can hear the seagulls, that's it.  But
you patch fixes that.  I can also enter town without crashing now. 
However there are other crashes in mss32 now -- in
_AIL_3D_distance_factor and in another case AIL_debug_printf.  The
first one happened when I hit 5 to attack a ship.

Now here's a bit of news:  Star Wars: Battlefront works now!  Well it
loads to the menu and a thead crashes (ie music is still playing, but
the menu is stuck).  I'll investigate later.  I think you fixed it
with your volume fixes.

Jesse



Re: [d3d9/device.c] IDirect3DDevice9Impl_GetDepthStencilSurface problem

2005-02-03 Thread Oliver Stieber
> 
> When I did a "> 0x1" instead of "!= NULL" at the
> check before it
> crashed, I bypassed the crash.  It ended crashing at
> a similar point
> and I did it again.  Then I was able to actually run
> the game to the
> point of controlling the ship, as long as it didn't
> crash first.  I
> did like getting that far, but it was horribly
> unstable.  I spent a
> while trying to trace a source of the 1 but found
> nothing.
> 
I've just put up a small website that you can get a
diff of my wine as of today from 
http://www.oliverthered.f2s.com/projects/wine/ with
the diff you should be able to run Pirates and Axis
and Allies 2 okish, I haven't checked half life 2 or
far cry yet.

The diff still has some 'alpha' work in it that I'm
cleaning up at the moment (well as soon as I've run a
spell checker on my website!).

Oliver.

> Thanks, 
> Jesse
> 
>  





___ 
ALL-NEW Yahoo! Messenger - all new features - even more fun! 
http://uk.messenger.yahoo.com



Re: [d3d9/device.c] IDirect3DDevice9Impl_GetDepthStencilSurface problem

2005-02-02 Thread Jesse Allen
On Tue, 1 Feb 2005 07:05:12 + (GMT), Oliver Stieber
<[EMAIL PROTECTED]> wrote:
> 
> In wined3d_private.h search for anything that
> allocates  and array HIGHEST_RENDER_STATE in size and
> change it to HIGHEST_RENDER_STATE + 1 since were
> addressing 1 based not 0 based.
> 
> Do the same with HIGHEST_TRANSFORMSTATE,
> HIGHEST_TEXTURE_STATE and HIGHEST_SAMPLER_STATE.
> 


Yes, that does make a difference.  If I do that, the crashes go away. 
However I cannot get to the point of controlling the ship.  Can't find
HIGHEST_SAMPLER_STATE either.

When I did a "> 0x1" instead of "!= NULL" at the check before it
crashed, I bypassed the crash.  It ended crashing at a similar point
and I did it again.  Then I was able to actually run the game to the
point of controlling the ship, as long as it didn't crash first.  I
did like getting that far, but it was horribly unstable.  I spent a
while trying to trace a source of the 1 but found nothing.

Thanks, 
Jesse



Re: [d3d9/device.c] IDirect3DDevice9Impl_GetDepthStencilSurface problem

2005-01-31 Thread Oliver Stieber

> 
> Maybe.  I got pirates partially to work.  The intro
> at loading plays,
> after the Atari logo, it then crashes:
> 
>
fixme:d3d:IDirect3DDevice9Impl_CreateDepthStencilSurface
> (0x403ac0f0) : stub
>
fixme:d3d:IDirect3DDevice9Impl_CreateDepthStencilSurface
> (0x403ac0f0) : stub
> wine: Unhandled exception (thread 0009), starting
> debugger...
> WineDbg starting on pid 0x8
> Unhandled exception: page fault on read access to
> 0x0001 in 32-bit
> code (0x4a1a5b30).
> In 32 bit mode.
> Register dump:
>  CS:0073 SS:007b DS:007b ES:007b FS:0033 GS:
>  EIP:4a1a5b30 ESP:4068fc40 EBP:4068fd1c
> EFLAGS:00010202(   - 00  - -RI1)
>  EAX:4042c688 EBX:4a1cc32c ECX:403abe40 EDX:0001
>  ESI:403ec588 EDI:
> Stack dump:
> 0x4068fc40:  0001 7eac 0002 
> 0x4068fc50:  7a7d2ba0 000c 0002 
> 0x4068fc60:     
> 0x4068fc70:     
> 0x4068fc80:     
> 0x4068fc90:     
> Backtrace:
> =>1 0x4a1a5b30 drawPrimitive+0x230(iface=0x403ec588,
> PrimitiveType=0x6, NumPrimitives=0x2,
> StartVertexIndex=0x0,
> StartIdx=0x, idxSize=0x0, idxData=0x0,
> minIndex=0x0)
> [drawprim.c:1582] in wined3d (0x4068fd1c)
>   2 0x4a19dc57
>
IWineD3DDeviceImpl_DrawPrimitive+0x47(iface=0x403ec588,
> PrimitiveType=0x6, StartVertex=0x0,
> PrimitiveCount=0x2)
> [/home/jesse/wine-printf/dlls/wined3d/device.c:3504]
> in wined3d
> (0x4068fd50)
>   3 0x4a0244ee
>
IDirect3DDevice9Impl_DrawPrimitive+0x1e(iface=0x403ac0f0,
> PrimitiveType=0x6, StartVertex=0x0,
> PrimitiveCount=0x2)
> [/home/jesse/wine-printf/dlls/d3d9/device.c:579] in
> d3d9 (0x4068fd68)
>   4 0x005c1ac0 in pirates! (+0x1c1ac0) (0x)
> 0x4a1a5b30 drawPrimitive+0x230 [drawprim.c:1582] in
> wined3d: movl 
>  0x0(%edx),%eax
> Unable to open file drawprim.c
> Wine-dbg>
> 
> Since I had to hack wine to get it to run to this
> degree, here are the
> patches I tried out:
> 
> d3d9_device.diff
> printf.diff
> printf_compare_warn.diff
> wined3d_vb_begin.diff
> 
> By Oliver:
> wined3d_guids_01_os.diff
> wined3d_guids__newfiles_01_os.diff  (slight fix to
> get this to compile)
> 
> I'm not sure if I need an older patch of his.
> 
> I also hacked dlls/wined3d/surface.c 
> IWineD3DSurfaceImpl_UnlockRect() here:
> 
> break;
> case D3DFMT_A8R8G8B8:
> case D3DFMT_X8R8G8B8:
> {
> 
> The game calls the function with D3DFMT_X8R8G8B8.  I
> think it could
> work like case D3DFMT_A8R8G8B8 since it's padded the
> same =) -- just
> without alpha -- and seemed to thus far.  It allowed
> me to see the
> intro.
> 
> Jesse
> 

I tried that and it seems to be fine, but the intro's
crash a lot more now :(


In wined3d_private.h search for anything that
allocates  and array HIGHEST_RENDER_STATE in size and
change it to HIGHEST_RENDER_STATE + 1 since were
addressing 1 based not 0 based.

Do the same with HIGHEST_TRANSFORMSTATE,
HIGHEST_TEXTURE_STATE and HIGHEST_SAMPLER_STATE.


I've done a tone of debugging and to be honest the
first patch was a lot buggier than I thought, but then
I had been doing a 18hrs 7days a week on it, so it's
not supprsing.

Anyhow, I've more or less put in the other 80% of the
effort and a lot more apps are running without any
crash bugs things there's still a few issues that need
to sorted out before patches can go into CVS, mainly
where to put GUIDS.

I'm putting a new big patch up against head as soon as
I've done a cvs update, ./configure etc... and some
regression.

The big patch won't be CVS worthy but it will have
things like non-power-2 textures if anyone wants to do
some testing since I've only tested against an ATI
9600. 

>  





___ 
ALL-NEW Yahoo! Messenger - all new features - even more fun! 
http://uk.messenger.yahoo.com



Re: [d3d9/device.c] IDirect3DDevice9Impl_GetDepthStencilSurface problem

2005-01-31 Thread Jesse Allen
On Mon, 31 Jan 2005 21:47:44 -, Ann and Jason Edmeades
<[EMAIL PROTECTED]> wrote:
> Well yes and no. The 'problem' is most of this code isn't implemented yet...
> 
> Try Olivers large patch and see if things are any better, or wait a while
> while a whole load of code gets into cvs. Basically d3d9 shouldn't have any
> of the code relating to the stencil buffers - that will be in wine3d. I am
> pretty certain Olivers patch did that, and he is working on splitting it up
> to get cvs in sync with his local tree.
> 


Maybe.  I got pirates partially to work.  The intro at loading plays,
after the Atari logo, it then crashes:

fixme:d3d:IDirect3DDevice9Impl_CreateDepthStencilSurface (0x403ac0f0) : stub
fixme:d3d:IDirect3DDevice9Impl_CreateDepthStencilSurface (0x403ac0f0) : stub
wine: Unhandled exception (thread 0009), starting debugger...
WineDbg starting on pid 0x8
Unhandled exception: page fault on read access to 0x0001 in 32-bit
code (0x4a1a5b30).
In 32 bit mode.
Register dump:
 CS:0073 SS:007b DS:007b ES:007b FS:0033 GS:
 EIP:4a1a5b30 ESP:4068fc40 EBP:4068fd1c EFLAGS:00010202(   - 00  - -RI1)
 EAX:4042c688 EBX:4a1cc32c ECX:403abe40 EDX:0001
 ESI:403ec588 EDI:
Stack dump:
0x4068fc40:  0001 7eac 0002 
0x4068fc50:  7a7d2ba0 000c 0002 
0x4068fc60:     
0x4068fc70:     
0x4068fc80:     
0x4068fc90:     
Backtrace:
=>1 0x4a1a5b30 drawPrimitive+0x230(iface=0x403ec588,
PrimitiveType=0x6, NumPrimitives=0x2, StartVertexIndex=0x0,
StartIdx=0x, idxSize=0x0, idxData=0x0, minIndex=0x0)
[drawprim.c:1582] in wined3d (0x4068fd1c)
  2 0x4a19dc57 IWineD3DDeviceImpl_DrawPrimitive+0x47(iface=0x403ec588,
PrimitiveType=0x6, StartVertex=0x0, PrimitiveCount=0x2)
[/home/jesse/wine-printf/dlls/wined3d/device.c:3504] in wined3d
(0x4068fd50)
  3 0x4a0244ee IDirect3DDevice9Impl_DrawPrimitive+0x1e(iface=0x403ac0f0,
PrimitiveType=0x6, StartVertex=0x0, PrimitiveCount=0x2)
[/home/jesse/wine-printf/dlls/d3d9/device.c:579] in d3d9 (0x4068fd68)
  4 0x005c1ac0 in pirates! (+0x1c1ac0) (0x)
0x4a1a5b30 drawPrimitive+0x230 [drawprim.c:1582] in wined3d: movl 
 0x0(%edx),%eax
Unable to open file drawprim.c
Wine-dbg>

Since I had to hack wine to get it to run to this degree, here are the
patches I tried out:

d3d9_device.diff
printf.diff
printf_compare_warn.diff
wined3d_vb_begin.diff

By Oliver:
wined3d_guids_01_os.diff
wined3d_guids__newfiles_01_os.diff  (slight fix to get this to compile)

I'm not sure if I need an older patch of his.

I also hacked dlls/wined3d/surface.c  IWineD3DSurfaceImpl_UnlockRect() here:

break;
case D3DFMT_A8R8G8B8:
case D3DFMT_X8R8G8B8:
{

The game calls the function with D3DFMT_X8R8G8B8.  I think it could
work like case D3DFMT_A8R8G8B8 since it's padded the same =) -- just
without alpha -- and seemed to thus far.  It allowed me to see the
intro.

Jesse



Re: [d3d9/device.c] IDirect3DDevice9Impl_GetDepthStencilSurface problem

2005-01-31 Thread Ann and Jason Edmeades
Well yes and no. The 'problem' is most of this code isn't implemented yet...

Try Olivers large patch and see if things are any better, or wait a while
while a whole load of code gets into cvs. Basically d3d9 shouldn't have any
of the code relating to the stencil buffers - that will be in wine3d. I am
pretty certain Olivers patch did that, and he is working on splitting it up
to get cvs in sync with his local tree.

Jason




[d3d9/device.c] IDirect3DDevice9Impl_GetDepthStencilSurface problem

2005-01-31 Thread Paul Vriens
Hi,

while trying to run a demo-app, I had a 'crash'

I have the following (part of a) trace:

trace:d3d:IDirect3DDevice9Impl_GetDepthStencilSurface
(0x77e3d028)->returning ((nil)) default is stencilbuffer=((nil))
trace:seh:EXC_RtlRaiseException code=c005 flags=0 addr=0x499db0cd
trace:seh:EXC_RtlRaiseException  info[0]=0001
trace:seh:EXC_RtlRaiseException  info[1]=0004
trace:seh:EXC_RtlRaiseException  eax=0004 ebx=499e232c ecx=
edx=0001 esi=77e3d028 edi=77ec8318
trace:seh:EXC_RtlRaiseException  ebp=70ecf5ac esp=70ecf5a0 cs=0073
ds=007b es=007b fs=003b gs=0033 flags=00210202

This is because IDirect3DSurface9Impl_AddRef is called with a NULL
parameter. In d3d8/device.c this is checked in d3d9/device.c it isn't.

The demo-app get's a bit further with this patch/hack, but I don't know
if it's correct (or if it is correct in d3d8).

Comments ?

Cheers,

Paul.

Index: dlls/d3d9/device.c
===
RCS file: /home/wine/wine/dlls/d3d9/device.c,v
retrieving revision 1.20
diff -u -r1.20 device.c
--- dlls/d3d9/device.c	28 Jan 2005 14:03:32 -	1.20
+++ dlls/d3d9/device.c	31 Jan 2005 19:26:23 -
@@ -359,7 +359,7 @@
 IDirect3DDevice9Impl *This = (IDirect3DDevice9Impl *)iface;
 TRACE("(%p)->returning (%p) default is stencilbuffer=(%p)\n", This, This->stencilBufferTarget, This->depthStencilBuffer);
 *ppZStencilSurface = (LPDIRECT3DSURFACE9) This->stencilBufferTarget;
-IDirect3DSurface9Impl_AddRef((LPDIRECT3DSURFACE9) *ppZStencilSurface);
+if (NULL != *ppZStencilSurface) IDirect3DSurface9Impl_AddRef((LPDIRECT3DSURFACE9) *ppZStencilSurface);
 return D3D_OK;
 }