User avatar
RasPiGaming
Posts: 174
Joined: Mon Jul 26, 2021 1:06 pm

DirectX through Box86/Wine?

Tue Sep 14, 2021 10:30 pm

Well, you may have seen my post a while back about Sonic Adventure 2 not working, and well, now it boots. But only an error message saying:

Code: Select all

No compatible Direct3D devices available
Tried it with some other games, same result. But I'm guessing Wine should have a way to emulate DirectX/3D. If it does, how would I do it (would I need to install 32-bit OpenGL because I'm on 64-bit Ubuntu)?
An RPi can be a gaming PC. As long as you have the right packages and software anyway.
Using a RPi4 8GB with Ubuntu Desktop 21.04, main interests are gaming and programming. Also occasionally uses two RPi3B+ and a RPi3B.

ptitSeb
Posts: 244
Joined: Tue May 19, 2015 2:49 pm

Re: DirectX through Box86/Wine?

Wed Sep 15, 2021 6:39 am

Wine have a internal Direct3D -> OpenGL wrapper. So yes, you need a working OpenGL driver to have DirectX/D3D games running.
Also, some old games may want to use 8bits or 16bits fullscreen, that may not work fine. In that cas, use virtual desktop. On way is to go to winecfg and select it. Another way is to use command line:

Code: Select all

wine explorer /desktop=shell,800x600 GAME.exe
You can use virtual desktop temporary for "GAME.exe" in that way, using a 800x600 default screen (named "shell"). The window will resize itself if the game ask for other screen resolution.

User avatar
RasPiGaming
Posts: 174
Joined: Mon Jul 26, 2021 1:06 pm

Re: DirectX through Box86/Wine?

Wed Sep 15, 2021 12:53 pm

ptitSeb wrote:
Wed Sep 15, 2021 6:39 am
Wine have a internal Direct3D -> OpenGL wrapper. So yes, you need a working OpenGL driver to have DirectX/D3D games running.
Also, some old games may want to use 8bits or 16bits fullscreen, that may not work fine. In that cas, use virtual desktop. On way is to go to winecfg and select it. Another way is to use command line:

Code: Select all

wine explorer /desktop=shell,800x600 GAME.exe
You can use virtual desktop temporary for "GAME.exe" in that way, using a 800x600 default screen (named "shell"). The window will resize itself if the game ask for other screen resolution.
Okay, after trying the virtual desktop it crashes after a few seconds, looks like the game is 32-BIT so I don't have to worry about the 16/8-bit stuff. Would it be easier for me to use GL4ES so I can use that as my OpenGL for WINE (I already saw the thing how the RPi's Vulkan doesn't work with WINE) and I don't have to uninstall my 64-bit driver? I've tried compiling it in the past but I'm not sure which RPi compile command to go with.
An RPi can be a gaming PC. As long as you have the right packages and software anyway.
Using a RPi4 8GB with Ubuntu Desktop 21.04, main interests are gaming and programming. Also occasionally uses two RPi3B+ and a RPi3B.

ptitSeb
Posts: 244
Joined: Tue May 19, 2015 2:49 pm

Re: DirectX through Box86/Wine?

Wed Sep 15, 2021 4:33 pm

RasPiGaming wrote:
Wed Sep 15, 2021 12:53 pm
ptitSeb wrote:
Wed Sep 15, 2021 6:39 am
Wine have a internal Direct3D -> OpenGL wrapper. So yes, you need a working OpenGL driver to have DirectX/D3D games running.
Also, some old games may want to use 8bits or 16bits fullscreen, that may not work fine. In that cas, use virtual desktop. On way is to go to winecfg and select it. Another way is to use command line:

Code: Select all

wine explorer /desktop=shell,800x600 GAME.exe
You can use virtual desktop temporary for "GAME.exe" in that way, using a 800x600 default screen (named "shell"). The window will resize itself if the game ask for other screen resolution.
Okay, after trying the virtual desktop it crashes after a few seconds, looks like the game is 32-BIT so I don't have to worry about the 16/8-bit stuff.
I mean the bpp of the screen. Some games use a 256colors full screen, some other 65536 colors... That's for old game (Win95-WinMe era mainly).
RasPiGaming wrote:
Wed Sep 15, 2021 12:53 pm
Would it be easier for me to use GL4ES so I can use that as my OpenGL for WINE (I already saw the thing how the RPi's Vulkan doesn't work with WINE) and I don't have to uninstall my 64-bit driver? I've tried compiling it in the past but I'm not sure which RPi compile command to go with.
Not on Pi4. Keep mesa, it's better.

User avatar
RasPiGaming
Posts: 174
Joined: Mon Jul 26, 2021 1:06 pm

Re: DirectX through Box86/Wine?

Wed Sep 15, 2021 5:15 pm

ptitSeb wrote:
Wed Sep 15, 2021 4:33 pm
RasPiGaming wrote:
Wed Sep 15, 2021 12:53 pm
ptitSeb wrote:
Wed Sep 15, 2021 6:39 am
Wine have a internal Direct3D -> OpenGL wrapper. So yes, you need a working OpenGL driver to have DirectX/D3D games running.
Also, some old games may want to use 8bits or 16bits fullscreen, that may not work fine. In that cas, use virtual desktop. On way is to go to winecfg and select it. Another way is to use command line:

Code: Select all

wine explorer /desktop=shell,800x600 GAME.exe
You can use virtual desktop temporary for "GAME.exe" in that way, using a 800x600 default screen (named "shell"). The window will resize itself if the game ask for other screen resolution.
Okay, after trying the virtual desktop it crashes after a few seconds, looks like the game is 32-BIT so I don't have to worry about the 16/8-bit stuff.
I mean the bpp of the screen. Some games use a 256colors full screen, some other 65536 colors... That's for old game (Win95-WinMe era mainly).
RasPiGaming wrote:
Wed Sep 15, 2021 12:53 pm
Would it be easier for me to use GL4ES so I can use that as my OpenGL for WINE (I already saw the thing how the RPi's Vulkan doesn't work with WINE) and I don't have to uninstall my 64-bit driver? I've tried compiling it in the past but I'm not sure which RPi compile command to go with.
Not on Pi4. Keep mesa, it's better.
This game is 3D, so I'm guessing it's not only 256 colors. OK, I need to install the 32-bit driver, got it. Thanks @ptitSeb! Amazing work on Box86/64 too!
An RPi can be a gaming PC. As long as you have the right packages and software anyway.
Using a RPi4 8GB with Ubuntu Desktop 21.04, main interests are gaming and programming. Also occasionally uses two RPi3B+ and a RPi3B.

User avatar
RasPiGaming
Posts: 174
Joined: Mon Jul 26, 2021 1:06 pm

Re: DirectX through Box86/Wine?

Wed Sep 15, 2021 6:40 pm

Just tried installing the 32-bit Mesa drivers, but strangely enough I already had the 32-bit installed. Is there anything I need to do in Winetricks to make it use DirectX -> OpenGL instead of DirectX -> Vulkan? Because after using BOX86_LOG=1 it looks like it's using the DirectX -> Vulkan for some reason.
An RPi can be a gaming PC. As long as you have the right packages and software anyway.
Using a RPi4 8GB with Ubuntu Desktop 21.04, main interests are gaming and programming. Also occasionally uses two RPi3B+ and a RPi3B.

ptitSeb
Posts: 244
Joined: Tue May 19, 2015 2:49 pm

Re: DirectX through Box86/Wine?

Wed Sep 15, 2021 7:41 pm

RasPiGaming wrote:
Wed Sep 15, 2021 6:40 pm
Just tried installing the 32-bit Mesa drivers, but strangely enough I already had the 32-bit installed. Is there anything I need to do in Winetricks to make it use DirectX -> OpenGL instead of DirectX -> Vulkan? Because after using BOX86_LOG=1 it looks like it's using the DirectX -> Vulkan for some reason.
You can use "BOX86_NOVULKAN=1" env. var. to disable the wrapping of vulkan in box86.
Also, default mode for Wine is opengl. I don't think it use Vulkan and dxvk by default, unless you specificaly installed it (dxvk), or are somehow using Proton instead of wine.

User avatar
RasPiGaming
Posts: 174
Joined: Mon Jul 26, 2021 1:06 pm

Re: DirectX through Box86/Wine?

Wed Sep 15, 2021 9:37 pm

ptitSeb wrote:
Wed Sep 15, 2021 7:41 pm
RasPiGaming wrote:
Wed Sep 15, 2021 6:40 pm
Just tried installing the 32-bit Mesa drivers, but strangely enough I already had the 32-bit installed. Is there anything I need to do in Winetricks to make it use DirectX -> OpenGL instead of DirectX -> Vulkan? Because after using BOX86_LOG=1 it looks like it's using the DirectX -> Vulkan for some reason.
You can use "BOX86_NOVULKAN=1" env. var. to disable the wrapping of vulkan in box86.
Also, default mode for Wine is opengl. I don't think it use Vulkan and dxvk by default, unless you specificaly installed it (dxvk), or are somehow using Proton instead of wine.
I'm using WINE, not Proton (If I use Proton it always says there is an error). BOX86_NOVULKAN=1 just brings an error message saying it failed to load an x86 version (probably because I don't have an x86 one). But by looking close at WINE's logging, as it seems to be WINE's problem, not Box86, it looks like it's using dxvk. Is there any way to turn it off?
An RPi can be a gaming PC. As long as you have the right packages and software anyway.
Using a RPi4 8GB with Ubuntu Desktop 21.04, main interests are gaming and programming. Also occasionally uses two RPi3B+ and a RPi3B.

User avatar
RasPiGaming
Posts: 174
Joined: Mon Jul 26, 2021 1:06 pm

Re: DirectX through Box86/Wine?

Thu Sep 16, 2021 12:49 pm

Maybe this would help?

Code: Select all

Box86 with Dynarec v0.2.3 9190a20c built on Sep 12 2021 16:08:32
Box86 with Dynarec v0.2.3 9190a20c built on Sep 12 2021 16:08:32
Box86 with Dynarec v0.2.3 9190a20c built on Sep 12 2021 16:08:32
00b0:fixme:ntdll:NtQuerySystemInformation info_class SYSTEM_PERFORMANCE_INFORMATION
0024:fixme:heap:RtlSetHeapInformation 00000000 1 00000000 0 stub
info:  Game: ConfigurationTool.exe
info:  DXVK: v1.9.1
info:  Built-in extension providers:
info:    Win32 WSI
info:    OpenVR
info:    OpenXR
info:  OpenVR: could not open registry key, status 2
warn:  OpenVR: Failed to locate module
info:  Enabled instance extensions:
info:    VK_KHR_get_surface_capabilities2
info:    VK_KHR_surface
info:    VK_KHR_win32_surface
warn:  Skipping Vulkan 1.0 adapter: V3D 4.2
warn:  Skipping Vulkan 1.0 adapter: llvmpipe (LLVM 12.0.0, 128 bits)
warn:  DXVK: No adapters found. Please check your device filter settings and Vulkan setup.
info:  Process set as DPI aware
0024:fixme:service:I_ScRegisterDeviceNotification Notification filters are not yet implemented.
00c4:fixme:service:QueryServiceConfig2W Level 6 not implemented
00c4:fixme:service:QueryServiceConfig2W Level 6 not implemented
0024:fixme:system:SystemParametersInfoW Unimplemented action: 59 (SPI_SETSTICKYKEYS)
0024:fixme:system:SystemParametersInfoW Unimplemented action: 53 (SPI_SETTOGGLEKEYS)
0024:fixme:system:SystemParametersInfoW Unimplemented action: 51 (SPI_SETFILTERKEYS)
I need to uninstall DXVK, but I don't know how.
An RPi can be a gaming PC. As long as you have the right packages and software anyway.
Using a RPi4 8GB with Ubuntu Desktop 21.04, main interests are gaming and programming. Also occasionally uses two RPi3B+ and a RPi3B.

User avatar
RasPiGaming
Posts: 174
Joined: Mon Jul 26, 2021 1:06 pm

Re: DirectX through Box86/Wine?

Sat Sep 18, 2021 7:25 pm

OK uninstalled DXVK, now this comes up.

Code: Select all

X Error of failed request:  GLXBadFBConfig
  Major opcode of failed request:  152 (GLX)
  Minor opcode of failed request:  0 ()
  Serial number of failed request:  219
  Current serial number in output stream:  219
Any ideas?
An RPi can be a gaming PC. As long as you have the right packages and software anyway.
Using a RPi4 8GB with Ubuntu Desktop 21.04, main interests are gaming and programming. Also occasionally uses two RPi3B+ and a RPi3B.

User avatar
RasPiGaming
Posts: 174
Joined: Mon Jul 26, 2021 1:06 pm

Re: DirectX through Box86/Wine?

Sun Sep 19, 2021 1:31 am

Okay, turned on BOX86_LOG=2 after rebooting Wine, here's the errors.

Code: Select all

14095|0x40c53437: Calling my_read (00000007, 417F7860, 00000010...) =>003c:err:service:process_send_command service protocol error - failed to write pipe!
003c:fixme:service:scmdatabase_autostart_services Auto-start service L"PlugPlay" failed to start: 1053
003c:err:service:process_send_command service protocol error - failed to write pipe!
003c:fixme:service:scmdatabase_autostart_services Auto-start service L"clr_optimization_v2.0.50727_32" failed to start: 1053
0070:err:winediag:nodrv_CreateWindow Application tried to create a window, but no driver could be loaded.
0070:err:winediag:nodrv_CreateWindow The explorer process failed to start.
0070:err:ole:apartment_createwindowifneeded CreateWindow failed with error 0
0070:err:ole:apartment_createwindowifneeded CreateWindow failed with error 0
0070:err:ole:apartment_createwindowifneeded CreateWindow failed with error 0
Any help?
An RPi can be a gaming PC. As long as you have the right packages and software anyway.
Using a RPi4 8GB with Ubuntu Desktop 21.04, main interests are gaming and programming. Also occasionally uses two RPi3B+ and a RPi3B.

ptitSeb
Posts: 244
Joined: Tue May 19, 2015 2:49 pm

Re: DirectX through Box86/Wine?

Sun Sep 19, 2021 9:03 pm

RasPiGaming wrote:
Sat Sep 18, 2021 7:25 pm
OK uninstalled DXVK, now this comes up.

Code: Select all

X Error of failed request:  GLXBadFBConfig
  Major opcode of failed request:  152 (GLX)
  Minor opcode of failed request:  0 ()
  Serial number of failed request:  219
  Current serial number in output stream:  219
Any ideas?
This is an opengl error. Make sure your mesa is correctly working.
GLXBadFBConfig is an error with the setup of OpenGL context. Maybe it tries to get a to-high profile? Or a combinaison of BPP/screenres/Depth/Stencil that is not supported?

(also, Wine launch multiple process at start, you cannot debug it with a simple BOX86_LOG=2 I'm afraid. But you can use BOX86_TRACE_FILE=stderr and BOX86_LOG=1 to have more info on the console)

User avatar
RasPiGaming
Posts: 174
Joined: Mon Jul 26, 2021 1:06 pm

Re: DirectX through Box86/Wine?

Sun Sep 19, 2021 10:09 pm

ptitSeb wrote:
Sun Sep 19, 2021 9:03 pm
RasPiGaming wrote:
Sat Sep 18, 2021 7:25 pm
OK uninstalled DXVK, now this comes up.

Code: Select all

X Error of failed request:  GLXBadFBConfig
  Major opcode of failed request:  152 (GLX)
  Minor opcode of failed request:  0 ()
  Serial number of failed request:  219
  Current serial number in output stream:  219
Any ideas?
This is an opengl error. Make sure your mesa is correctly working.
GLXBadFBConfig is an error with the setup of OpenGL context. Maybe it tries to get a to-high profile? Or a combinaison of BPP/screenres/Depth/Stencil that is not supported?

(also, Wine launch multiple process at start, you cannot debug it with a simple BOX86_LOG=2 I'm afraid. But you can use BOX86_TRACE_FILE=stderr and BOX86_LOG=1 to have more info on the console)
Huh, OpenGL seems to be working with everything else. But I tried some other games (RPG Maker VX Ace, Sonic Generations), and they don't bring up any errors, they just don't start up. But it looks like Wine isn't starting them up, because Box86 doesn't log any errors. Also based on the task manager they're running, just the window isn't showing up. I've tried switch windows versions too. Is there anything I need to run OpenGL stuff in Wine? Also I don't think it's too high profile because it's basically a PC port of a Dreamcast/Gamecube game with Sonic Adventure 2, and RPG Maker VX Ace I've seen reported working with Box86. And Sonic Generations is a pretty old game now, and it even got ported to 3DS, so I don't think it's too high profile for a Pi if it can run on a 3DS.
An RPi can be a gaming PC. As long as you have the right packages and software anyway.
Using a RPi4 8GB with Ubuntu Desktop 21.04, main interests are gaming and programming. Also occasionally uses two RPi3B+ and a RPi3B.

Return to “Gaming”