Sean
banner
drinkybird.net
Sean
@drinkybird.net
Programmer, player of #Splatoon, #Doom, and other games. @zandronum dev and wiki maintainer. Afflicted by chronic pain and mush brain. 🇬🇧🏳️‍🌈

🌉 bridged from ⁂ https://mastodon.org.uk/@DrinkyBird, follow @ap.brid.gy to interact
I somehow segfaulted Konsole while compiling Clang.
November 10, 2025 at 11:17 PM
Also, I bought a Switch 2 Pro Controller. Mostly for the GL/GR buttons. I think I might be able to make use of them in Splatoon, we'll see.
November 8, 2025 at 7:29 PM
Really want to play Half-Life: Alyx again but I’m not sure I can be arsed to deal with the tragedy that is the entire VR ecosystem surrounding it.
November 8, 2025 at 4:17 PM
The vague plan for this week involves libclang, so that'll be novel to me.
November 4, 2025 at 3:42 PM
I love stumbling upon a paper/presentation that covers exactly what I'm looking to do
November 4, 2025 at 1:01 PM
Here, I wrote a blog post about changing one byte https://drinkybird.net/2025/10/patching-hl2/
Patching the retail version of Half-Life 2 to get it running under Wine
For one reason or another, I recently found myself wanting to play the original retail 2004 build of Half-Life 2. Given that I now use Linux full-time, I have to do so under Wine, using Lutris to launch it and DXVK for the Direct3D 9 implementation. I quickly ran into some issues though. The first I encountered is that it would freeze and try and consume all of my system memory. Ouch. This is because it allocates textures endlessly until it can’t any more, in a poor attempt to determine how much video memory is avaiable. On a modern system with 12 GB of video memory and 48 GB of system memory, it ends poorly… Fortunately this one was trivial to fix: just add a `dxvk.conf` next to `hl2.exe` containing: [hl2.exe] d3d9.maxAvailableMemory = 1024 Then I hit another issue: it thought I had less than 128 MB of system memory. Specifically, it thought I had -1 bytes of system memory. Those of us (un)fortunate enough to know enough about Win32 can guess what’s happening: it’s using `GlobalMemoryStatus`. This function returns the amount of memory the system has in a 32-bit integer, and it handles amounts of memory above 4GB very poorly: > On computers with more than 4 GB of memory, the GlobalMemoryStatus function can return incorrect information, reporting a value of –1 to indicate an overflow. On modern Windows, it’s possible to set a per-application compatibility level, which will make Windows will try and behave like a previous version of the OS. Setting it to Windows XP compatibility fixes this issue, and it will cause `GlobalMemoryStatus` to report a valid amount of memory. Unfortunately, Wine seemingly has no such compatibility setting for this function, at least that I could find. So, I decided to do the only reasonable thing: patch the binary to remove this check. First, we need to find the module where the check is located. The Source engine is highly modular, and has a load of DLLs: There are some Linux .so files there, but they’re for the dedicated server. Client support for Linux was 9 years away yet. Fortunately, finding the right one was trivial. bin $ grep -rn 128MB dxsupport.cfg:2351: "name" "Matrox Parhelia 128MB" grep: engine.dll: binary file matches It’s in `engine.dll`. Time to crack it open using Ghidra. `engine.dll` is the largest module in the engine, so it took a little while to analyse. Ghidra has a handy “Defined Strings” window that lets us view all of the strings in the module, and search through them: From there, we can jump to where the string is referenced. And we found the memory check! It’s exactly as guessed: it’s using `GlobalMemoryStatus` which is returning an invalid value. The check essentially compiled to a `JGE` instruction at memory location `0x20162057`: if the memory is above 128 MB, it will skip over raising an error. We can easily get rid of the check by replacing it with a `JMP`, so it always skips over the error: right-click the instruction and select “Patch Instruction”. Export the DLL from File > Export, selecting the Raw Bytes format. Ghidra appends a `.bin` to the file extension, so copy it over your `engine.dll` manually. This has removed the memory capacity check. However, the code uses the memory size to determine the size of an internal engine heap; this will get clamped to the range of 48 to 64 MB. Due to unsigned shenanigans, the -1 value actually gets clamped to the upper of that bound. You can override it with `-heapsize` if you wish (it takes a value in kB). Now you can play the retail build of Half-Life 2 on Linux. Have fun. A slight caveat is that exporting the DLL from Ghidra doesn’t just change the instruction; it exports the whole binary from its datamodel anew. As such while it’s functionally identical the file has might have some differences. If you just want to fix this issue, using a hex editor to patch it is probably better: given an `engine.dll` with SHA256 `21cbf8e15551906eab2b27348d43876167e8b7e520cee6efc95a18b7a96ee051`, change the byte at offset `0x162054` from `7d` to `eb`. This was my first time actually patching a binary to get it working. At least it was simple… this article is basically about changing a single byte.
drinkybird.net
November 1, 2025 at 12:53 AM
Fucking GTK and its blurry ass text...
October 28, 2025 at 2:24 PM
So how's your weekends going so far #Splatoon3 #nintendoswitch
October 25, 2025 at 11:45 PM
Nothing more annoying than companies listing prices in £, without VAT…
Tends to be software companies as well. (JetBrains…)
October 3, 2025 at 11:19 AM
Linux randomly decided my EDID override was no longer valid and I had to spend way too long trying to fix it. I came so close to just giving up and trying to reinstall my Windows boot loader instead…
September 24, 2025 at 12:04 PM
Possibly my best Big Run yet ...I didn't know it could show a percentile rank.
#Splatoon3 #nintendoswitch
September 22, 2025 at 12:35 AM
I don't even want to know what the git equivalent of 'hg fold --from s1' is.
September 19, 2025 at 9:07 PM
Dear #flatpak interface developers, please make it visible when a flatpak is unverified and unofficial. *glares at KDE Discover*
September 19, 2025 at 4:21 PM
September 17, 2025 at 3:51 PM
Been a while since I blogged so I wrote a little bit about adding libsecret support to @zandronum, cause why not https://drinkybird.net/2025/09/zandronum-libsecret/
Zandronum support for using libsecret to save auth credentials
For a while, Zandronum has supported saving credentials for its account system to the system keyring using the `login_add` command, so you don’t have to keep typing your password into the console or storing it plaintext in your configuration file. This was only supported on Windows since the feature was first added, but I recently added support for libsecret, so this feature can now be used on Linux starting with Zandronum 3.3. This means you can now store your auth passwords in KDE Wallet1, GNOME Keyring, KeepassXC, or any other Secret Service implementation. You can also use `login_default_user` to set a default username to use, reducing the effort of logging in to just typing `login`. Naturally, to use this feature you will need to build Zandronum with libsecret - simply install the relevant package and build, and it should just work. The feature is optional, so similar to other dependencies like GTK, if it’s not found it will silently be disabled. It’s already available in the CI builds, and should be enabled whenever we start releasing official testing builds for 3.3, and eventually and inevitably, the release builds. A small bit of refactoring was also done to facilitate this, so it should be easier to add other storage backends in the future. Specifically, macOS doesn’t have support for this feature yet… For demonstration purposes, here’s a couple of screenshots of this in action: under KDE Plasma under MATE, using GNOME Keyring 1. If the Secret Storage implementation is even called KDE Wallet? KDE appears to be in a sort of transition period towards being Secret Service-native. ↩
drinkybird.net
September 16, 2025 at 4:57 PM
#mercurial 7.1.1 is now in #opensuse Tumbleweed as of snapshot 20250914.
Also includes the experimental #rust extensions under mercurial-rust (read the package info and 'hg help rust' before use)
September 15, 2025 at 2:44 PM
I accidentally gave a VM 200 GB of storage instead of 20 GB, whoops
September 13, 2025 at 10:05 PM
Two thunderstorms in the span of an hour, whew. This one is really aggressive as well.
September 3, 2025 at 2:22 PM
Thanks to the Online Safety Act, Steam has added the requirement that I have a credit card to view mature content. I add my debit card, it doesn't work. It has to be a credit card. I don't have a credit card, and therefore have no way of even viewing mature games on Steam. What an amazing law.
August 29, 2025 at 8:22 PM
Debian 13 removed mercurial-evolve and broke my Dockerfiles :(
Oh well, I wanted to port them to openSUSE anyway ;)
August 29, 2025 at 8:33 AM
Also did this, because my skill level was particularly high tonight #Splatoon3 #nintendoswitch
August 27, 2025 at 12:39 AM
I got stuck in a fence #Splatoon3 #nintendoswitch
August 27, 2025 at 12:28 AM
Let me just have that
#dragxdrive #nintendoswitch2
August 23, 2025 at 1:18 AM
Heh, the #fedora installer does not seem to cope well with openSUSE’s snapshots.
August 20, 2025 at 1:05 PM
Reposted by Sean
If you're in the UK, I invite you to join Open Rights Group (@openrightsgroup) to fight the good fight for privacy and free speech online against the barrage of government overreach.

https://www.openrightsgroup.org/campaign/stop-state-censorship-of-online-speech/ #privacy #ageverification
Reform the Online Safety Act
The Online Safety Act is restricting freedom of expression in the UK.
www.openrightsgroup.org
August 20, 2025 at 9:37 AM