User avatar
RasPiGaming
Posts: 213
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: 253
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: 213
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: 253
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: 213
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: 213
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: 253
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: 213
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: 213
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: 213
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: 213
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: 253
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: 213
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.

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

Re: DirectX through Box86/Wine?

Thu Sep 23, 2021 10:12 pm

I never really thought of it as important as even apps that work through wine have this, but does any of this make sense?

Code: Select all

00c4:fixme:service:QueryServiceConfig2W Level 6 not implemented
00c4:fixme:advapi:RegisterEventSourceW ((null),L".NET Runtime Optimization Service"): stub
00c4:fixme:advapi:DeregisterEventSource (0xcafe4242) stub
00b0:fixme:msvcrt:__clean_type_info_names_internal (0x64085a64) stub
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: 253
Joined: Tue May 19, 2015 2:49 pm

Re: DirectX through Box86/Wine?

Fri Sep 24, 2021 6:30 am

Your wineprefix may be broken. Try to start a new one (save ~/.wine and remove the folder). All Wine parameter will be lost, but may need to re-start clean.

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

Re: DirectX through Box86/Wine?

Fri Sep 24, 2021 9:54 pm

ptitSeb wrote:
Fri Sep 24, 2021 6:30 am
Your wineprefix may be broken. Try to start a new one (save ~/.wine and remove the folder). All Wine parameter will be lost, but may need to re-start clean.
I've rebooted it twice though (and errors appear each time). And non-games seem to work fine, so maybe it's just something about Wine's OpenGL or something is messed up I guess? Is there anything I could do to fix it?
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: 213
Joined: Mon Jul 26, 2021 1:06 pm

Re: DirectX through Box86/Wine?

Sat Sep 25, 2021 1:10 am

Oh, one more idea, do I actually need to set the Pi's GPU memory to the requirements for a game? I haven't done this as I've heard it can hurt performance.
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.

Brian Beuken
Posts: 410
Joined: Fri Jan 29, 2016 12:51 pm

Re: DirectX through Box86/Wine?

Sat Sep 25, 2021 8:40 am

On a Pi4 you don't need to change any of GPU memory settings, in fact keeping it low is a benefit as the system allocates memory as it needs it up to about 1G... if you set a size to your GPU mem you are just setting some memory limits on your OS usage...and that will take away from your 1G total.

On a Pu0-3 though you do need to set the GPU memory to as much as you think you need.
Very old computer game programmer, now teaching very young computer game programmers, some very bad habits.
http://www.scratchpadgames.net/
https://www.patreon.com/BrianBeuken

Brian Beuken
Posts: 410
Joined: Fri Jan 29, 2016 12:51 pm

Re: DirectX through Box86/Wine?

Sat Sep 25, 2021 8:53 am

On a Pi4 you don't need to change any of GPU memory settings, in fact keeping it low is a benefit as the system allocates memory as it needs it up to about 1G... if you set a size to your GPU mem you are just setting some memory limits on your OS usage...and that will take away from your 1G total.

On a Pi0-3 though you do need to set the GPU memory to as much as you think you need.
Very old computer game programmer, now teaching very young computer game programmers, some very bad habits.
http://www.scratchpadgames.net/
https://www.patreon.com/BrianBeuken

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

Re: DirectX through Box86/Wine?

Sat Sep 25, 2021 3:17 pm

Brian Beuken wrote:
Sat Sep 25, 2021 8:53 am
On a Pi4 you don't need to change any of GPU memory settings, in fact keeping it low is a benefit as the system allocates memory as it needs it up to about 1G... if you set a size to your GPU mem you are just setting some memory limits on your OS usage...and that will take away from your 1G total.

On a Pi0-3 though you do need to set the GPU memory to as much as you think you need.
This is on Pi4, so I guess GPU memory isn't a problem then? I guess just something with Wine's OpenGL then is the problem.
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: 213
Joined: Mon Jul 26, 2021 1:06 pm

Re: DirectX through Box86/Wine?

Sun Sep 26, 2021 8:38 pm

Just tried a demo of a 90s Windows game, the loading screen pops up for a second but then this appears:

Code: Select all

wine: Unhandled page fault on read access to 00008080 at address 4244979C (thread 00d8), starting debugger...
In a few minutes I'll try another game demo though from the early 2000s. It's downloading right now, so I'll try to put a post in a few minutes if it works.

EDIT: Tried the other demo, no errors at all but it fails to launch.
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: 253
Joined: Tue May 19, 2015 2:49 pm

Re: DirectX through Box86/Wine?

Mon Sep 27, 2021 12:44 pm

I don't know what you try to run, but check microLinux, PILabs, The Byteman and NicoD Youtubes channels, they did run a lot of windows games. I did run a few things myself too on the Pi. Check the box86-compatibility-list repo also, there are a few windows game there too.

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

Re: DirectX through Box86/Wine?

Mon Sep 27, 2021 2:22 pm

ptitSeb wrote:
Mon Sep 27, 2021 12:44 pm
I don't know what you try to run, but check microLinux, PILabs, The Byteman and NicoD Youtubes channels, they did run a lot of windows games. I did run a few things myself too on the Pi. Check the box86-compatibility-list repo also, there are a few windows game there too.
Tried Sonic CD, Lemmings 2, and Sonic Adventure DX. One of the games I've tried (RPG Maker VX Ace) was in the compatability list, so something is just wrong I guess with my WINE install.
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: 253
Joined: Tue May 19, 2015 2:49 pm

Re: DirectX through Box86/Wine?

Mon Sep 27, 2021 3:54 pm

RasPiGaming wrote:
Mon Sep 27, 2021 2:22 pm
ptitSeb wrote:
Mon Sep 27, 2021 12:44 pm
I don't know what you try to run, but check microLinux, PILabs, The Byteman and NicoD Youtubes channels, they did run a lot of windows games. I did run a few things myself too on the Pi. Check the box86-compatibility-list repo also, there are a few windows game there too.
Tried Sonic CD, Lemmings 2, and Sonic Adventure DX. One of the games I've tried (RPG Maker VX Ace) was in the compatability list, so something is just wrong I guess with my WINE install.
I use PlayOnLinux build service: https://www.playonlinux.com/wine/binari ... linux-x86/
I used 5.15 and it works fine for many things!
6.00 and later probably, but I have done much test myself.
I think some Stagging one (5.13?) is also working fine, but i'm not sure wich version.

Return to “Gaming”