-
Notifications
You must be signed in to change notification settings - Fork 70
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
Game(s) running on Boxedwine for Windows but not on web (Touhou: Embodiment of Scarlet Devil) #94
Comments
"Direct3D initialization failed, game cannot be played." The web version definitely does not support 3d graphics. So far we haven't found a way to map OpenGL to WebGL and Wine converts Direct3D to OpenGL. Looking at https://en.touhouwiki.net/wiki/Embodiment_of_Scarlet_Devil It seems like that game required 3D so it won't work on the web build. But I am happy to hear that it works on the Windows build. For 2d games, the web build will work if GDI rendering is enabled in Wine, which the web build tries to do. Starting in Wine 6 ,how GDI is set changed which explain "Unable to find DirectDrawRenderer in user.reg" if you were trying to use Wine 6 the web build. |
Since you are using Wine 6, I assume you are building from source. Recently I started caching more files to the host file system (not web build). Previously if an app or wine opened a file for writing, I would copy it from the zip file system to the host file system and open it. Now I do that for reads as well. This does something interesting beside improving start up times, it also allows you to see what files are necessary to build a custom file system. You can just zip up the local root directory and use that as a web file system. I did this for a dotnet 2 proof of concept based on the Wine 6 filesystem and result was a custom file system only 30MB. https://boxedwine.org/dotnet2/boxedwine.html?app=SolitaireDotNet2&p=Solitaire.exe |
@danoon2 Thanks for the explanation. So the OpenGL support must be implemented first for this and other games to work.. in theory I guess software rendering could be used, but that's just an hypotetical, since it would be so slow to be unplayable due to the interpreted emulation. Kind of a shame because this specific game doesn't really use 3D graphics, it's all 2D, but the developer used DirectX and now we're stuck with it. About Wine 6.0, no, I didn't compile from source! I took the ZIP directly downloaded from the desktop launcher (the version without Mono and Gecko), and I was surprised to see that it actually works on web, albeit slowly both in loading (big ZIP) and execution (a bit slower than 5.0 I reckon). Some programs only work on there, like the latest version of the foobar2000 music player (which is unusable on web anyways because it runs too slow, even just PCM audio is crackly despite it being uncompressed, oh well, I tried). I will surely try out the file logging feature by the way, that could indeed be very useful to create small app-specific packages. |
At the end of the day, we need to generate either WebGL or WebGPU calls and luckily this work has already been done: https://github.com/ptitSeb/gl4es The only way to circumvent something like I tested around the last days mostly with @ptitSeb's |
I work on the web build and am aware of gl4es and some years back attempted to integrate it. I got some simple GL programs to work |
@kevodwyer Wow, too cool! I will try it tomorrow with Call of Duty 1 Demo on archive.org, would be nice to get it even half-broken to work for further testing lol I assume you mean this issue? emscripten-core/emscripten#12082 |
So I tested CoDSP.exe with your gl4es for boxedwine version, but now it lacks @kevodwyer Would there be any chance to link to your source code? Just found it: https://github.com/danoon2/Boxedwine/tree/emscripten/use-gl4es |
The experiment I performed is at a dead-end and very out-of-date. It was enough to prove that it is possible, but I don't have the skills in OpenGL, gl4es or emscripten internals to take it any further. |
Hi, I've been experimenting a lot with this project in the last days. It seems like a pretty neat option for running games on Linux without the hassle of setting up Wine. However, what interests me the most is not the desktop version of Boxedwine, but in fact the web one. And, while general program incompatibilities due to Wine are to be expected, I'm experiencing some really strange inconsistencies between the desktop (Windows x64) version of Boxedwine, and the web one running with proper WASM (in the latest versions of both Firefox and Chromium).
There's one game in particular that I've tried on desktop Boxedwine and have seen it be very playable, and then not even being able to start on the web, and that's "Touhou: Embodiment of Scarlet Devil" (from 2002). But I fear there might be a lot more software that I've tried on web Boxedwine with zero to insufficient success, that maybe will run fine on desktop, but that I've not yet been able to try. Yet, the fact that even just one software behaves differently between the emulator builds points to a probable fault in the emulator itself.
I tried this Touhou game with the following versions of the Wine filesystems downloaded directly from the desktop launcher, with both the Windows x64 and web build of Boxedwine taken from the zip of the latest workflow on your Jenkins server (master#70 as of now), and these are the results on Windows:
Instead, as I said, the game fails to start on web with the exact same file systems and build version. The emulator throws an exception and crashes entirely. The bad behaviour is a bit different on different Wine versions, but overall the outcome is the same; for example, this is the console log when trying to run the game on 5.0, which on desktop just works but here does this:
Browser log
It's curious to note that on Wine1.7.55-v8 (the file system from boxedwine.org) I don't get an emulator crash, but rather the program terminates with an error that, translated from japanese to english, roughly reads like the following:
Anyways, the last thing I noticed about this game is that it doesn't work even on Boxedwine for Windows if I use Mesa graphics instead of the Default one. Specifically, the emulator crashes on there too, but I can't really understand if that's related to the web crashes. Perhaps software graphics instead of native are the problem, since I assume on Web native graphics can't be used? I ran the emulator under normal Wine on my Debian Linux system to generate a stack trace, since on Windows the emulator just crashes silently:
Native stack trace
In case you need to test with this specific game to replicate, I am maintaining a page on my private server with a special UI to help myself with testing of Boxedwine web in general: https://hlb0.octt.eu.org/Misc/BoxedWine/. (I'm trying to collect as many different Wine filesystems and working apps on there so that I can rapidly verify is some things work or not, and I've done these tests on there.)
The text was updated successfully, but these errors were encountered: