A few months ago, I posted about Astral, a hobby OS I’ve been working on for years, running Minecraft. Since then, others have gotten modern versions of Minecraft to run alongside Factorio (using glibc compatible libc). Although these games are built or packaged in a way that makes them easy to run under the new OS, most games are not. Many games are closed source and compiled for Windows, making them necessary for something like Wine to play.
One of my favorite games, Cogmind, falls under the same umbrella. This is a 32-bit Windows only roguelike, and running it under Astral became my goal. While there was already a wine port there, it was very incomplete, not at all notepad.exe Worked properly. To run Cogmind, the Wine port had to be finished, which also meant only adding the ability to run 32-bit code on a 64-bit OS.
basic wine functionality
The first step to get Wine up and running was to download MinGW and enable it in the Wine build, as it is needed to compile the PE DLL. Once it is enabled, notepad.exe Works and selecting “Save As” causes it to no longer crash!
Compiling libEGL.so
There’s still one big problem: Wine is being compiled without OpenGL support. While Astral had OpenGL, Wine apparently requires EGL to work, which Astral’s Mesa port did not provide. EGL connects rendering APIs like OpenGL to the windowing system, which Wine needs to properly initialize graphics. At first, this seemed like a simple fix, just enable it in Mesa. However, Mesa does not support EGL on the xlib backend, forcing me to switch to the DRI backend instead.
DRI (Direct Rendering Infrastructure) allows applications to communicate more directly with the GPU instead of going through an X server. This got me into the problem of patching Mesa to allow the X.org server to start without /dev/dri. Finally, I succeeded and I got a real game, Deltarune, to start with:

WoW64 and 32-bit Windows programs
Since Cogmind is 32-bit and Astral is 64-bit, more infrastructure is required. This was accomplished using Wine’s WoW64 mode, which does not require any 32-bit Unix libraries. It works by running 32-bit Windows binaries in a 64-bit process, translating between 32-bit and 64-bit system calls and data structures as needed, avoiding the need for full 32-bit user space.
Getting this to work involves implementing LDT (Local Descriptor Table) support in the kernel, as x86-64 allows you to run 32-bit code in long mode using 32-bit segment descriptors. These describe how memory should be accessed and, in the case of code segments, how the processor runs those instructions. LDT is one of the mechanisms used to define these segment descriptors and allows them to be configured on a per-process basis. It also required some fine-tuning of Wine’s signal and syscall handling code.
Cogmind!
After implementing WoW64 support in Astral Port and fixing some other bugs in the kernel, Cogmind works! The game was playable and had no noticeable issues other than game news and scoresheet uploads not working.

broken scoresheet upload
This bug is manifested by the TCP connection to the Cogmind server being opened and closed immediately without transferring any data. At first, I thought it was a network stack issue, but it wasn’t.
What I suspected was something else was the Wine debugging log function, __wine_dbg_writeWasn’t working at all in WoW64. After digging deeper into Wine’s code, I finally noticed that I was forgetting to save a register in __wine_unix_call_dispatcher Celebration. This broke the PE to UNIX transition and gave rise to UB. With this fixed, scoresheet upload works!
More sports and other events
I’ve also tried running some other applications under Wine:
| Program | Situation | notes |
|---|---|---|
| FTL | works | Completely playable. |
| Steam | partial | Install and update; Chromium crashes on startup due to glitch GetInterfaceAddresses(). |
| iexplore.exe | partial | Simple sites render; Complex pages crash for the same root reason as Steam. |
| Factory | partial | The window opens but does not proceed with loading. |
| Spooky’s JumpScare Mansion | partial | Starts but runs too slowly to be playable. |
| Noita | partial | Starts but runs too slowly to be playable. |
| plants vs Zombies | broken | Blocked by Steam DRM before accessing the main menu. |
| half life | broken | Claim failure in Wine’s C++ runtime. Possibly a missing implementation in the port. |
| Firefox/Chromium | broken | Installer failed; Does not reach playable state. |
| scp:containment violation | broken | does not start; The cause has not yet been diagnosed. |
| unity games in general | broken | There appear to be some issues with wine-mono on Astral, as Unity games are stuck MonoManager ReloadAssembly |



final thoughts
Porting Wine was a fun challenge and a way to prove that Hobby OS could be used to play far more games than originally thought, which is a step towards Hobby OS becoming a viable daily driver. There are still some rough edges, performance issues, and the odd crash, but the core of it works. It’s also taught me a lot about the inner workings of Wine, especially while digging around to fix the PE-to-Unix transition.
One of my big goals related to the Wine port now is to get Steam to work, which will also mean Chromium will work as well. As far as Astral is concerned, I plan to focus more on optimizations, new drivers, and bug fixes in the near future. There is a lot of scope for improvement on the kernel side.
Thanks for reading!
<a href