Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WOLF RPG Editor (Game.exe): Black screen in GPU rendering mode #65

Open
kakurasan opened this issue Jan 24, 2015 · 10 comments
Open

WOLF RPG Editor (Game.exe): Black screen in GPU rendering mode #65

kakurasan opened this issue Jan 24, 2015 · 10 comments

Comments

@kakurasan
Copy link

kakurasan commented Jan 24, 2015

In GPU rendering mode, nothing displayed. keyboard and sound work.
If native Direct3D 9 is disabled, this program almost works fine (font rendering is broken in version 2.10, see https://bugs.winehq.org/show_bug.cgi?id=35205).

WOLF RPG Editor download page (Japanese): http://www.vector.co.jp/soft/dl/winnt/game/se475870.html

WOLF RPG Editor uses a DirectX wrapper library called "DX Library" (open source). The latest version (2.10) uses DX Library 3.10f (development version, not available). version 3.10e and 3.11 are available at http://dxlib.o.oo7.jp/dxolddload.html (exe files are 7-Zip archives, 7z can extract them).

@axeldavy
Copy link

It seems to use ff pipeline with a custom ps shader.
Probably a bug we still have there

@tizbac
Copy link

tizbac commented Jan 24, 2015

No, if you trace it with nine and replay trace it works
Il 24/gen/2015 15:35 "axeldavy" [email protected] ha scritto:

It seems to use ff pipeline with a custom ps shader.
Probably a bug we still have there


Reply to this email directly or view it on GitHub
#65 (comment).

@kakurasan
Copy link
Author

kakurasan commented Jan 26, 2015

@siro20
Copy link

siro20 commented Dec 10, 2015

Is this still an issue ? The example program you provided crashes with latest wine at startup. Looks like a regression in wine.
Does WOLF RPG work on latest wine ?

@kakurasan
Copy link
Author

The issue still remains.

ppa:oibaf/graphics-drivers + ppa:commendsarnex/winedri3 (1.7.55) + ppa:oibaf/gallium-nine (0085cd5)

The example program you provided crashes with latest wine at startup. Looks like a regression in wine.
Does WOLF RPG work on latest wine ?

Some versions (1.7.49 - 1.7.53) crash if builtin version of xaudio2_8.dll is used (workaround: "WINEDLLOVERRIDES=xaudio2_8="), but it seems to be already fixed.

The example program and Game.exe don't crash as of Wine git-97ac9d4 (built from latest source).

If it still crashes, would you try this (rebuilt against DX Library 3.15e) ?

@siro20
Copy link

siro20 commented Dec 11, 2015

One issue I found in nine that it rejects vertexdeclarations with more than 16 elements.
Wine allows up to 128 elements for one vertexdeclaration.

@kakurasan
Copy link
Author

"DX Library" calls IDirectDraw7::SetCooperativeLevel() in Windows/DxGraphicsAPIWin.cpp (function OldGraphicsInterface_Create()). I found that nothing rendered when D_DDSCL_NORMAL is specified (if the flag is removed, the rendering works).

// Doesn't work (original code)
GAPIWin.DirectDraw7Object->SetCooperativeLevel( NS_GetMainWindowHandle(), D_DDSCL_NORMAL | ( WinData.UseFPUPreserve ? D_DDSCL_FPUPRESERVE : 0 ) ) ;

// Works (modified code, incorrect cooplevel flag specified)
GAPIWin.DirectDraw7Object->SetCooperativeLevel( NS_GetMainWindowHandle(), ( WinData.UseFPUPreserve ? D_DDSCL_FPUPRESERVE : 0 ) ) ;

So, a workaround is to insert return DD_OK; to the beginning of the function ddraw_set_cooperative_level() in dlls/ddraw/ddraw.c (WOLF RPG Editor also works).

@siro20
Copy link

siro20 commented Jan 10, 2017

Thank you for you interest in fixing nine.
Your patch is wrong as it will break ddraw.
Calling SetCooperativeLevel without D_DDSCL_NORMAL flag should return an error.
The question rises why does it work with nine when ddraw is "disabled" ?

@siro20
Copy link

siro20 commented Jan 10, 2017

The problem is simple:
There's nothing wrong with nine.
It renders a yellow quad to the window.
The Library uses ddraw to wait for vsync.
ddraw will be emulated by wined3d, which will create another X drawable and it's placed on top of nine X drawable.
As ddraw is never used to render anything it's always black.
I'm note sure how to deal with ddraw <-> nine interop.

@axeldavy
Copy link

is GetDC called ?

That's supposed to be the entry point for nine and ddraw to interoperate, and we don't implement it. I don't know enough for directdraw to do it, and I'm not sure it's even possible given how nine is designed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants