The Windows approach to ensuring the integrity of executable code is signing via Authenticode - the executable file is digitally signed, and the signing certificate can be traced back to a trusted root. Recently, however, the de facto trust on Windows and other platforms has moved to be TLS-based, not Authenticode based: consider how you install OpenAI’s Codex CLI: powershell…
I do a lot of debugging in Visual Studio, and while having symbols for all modules loaded in my process (whether from public or internal symbol servers) is a huge boon, most of the time I’m trying to isolate issues in my own code and after every system update (or for some modules for which no symbols are available) I am faced with this screen multiple times, interrupting my state of flow:
Playing Commandos 2 on a modern Windows 10 system with a 4K display revealed a major, unexpected pain point of the game: the menu will only run in 640x480, regardless of the resolution the game is set to. This compounds with the game not supporting 4K resolutions, so playing the game involves a mode switch on launch, a mode switch from the menu to the game, a mode switch from the game to the menu…
In the classic world of OpenGL and Direct3D <= 11, an app would create GPU resources (buffers, textures) and receive opaque handles to them which it later binds to specific slots before issuing draw or compute commands. While some forms of bindless work existed, for the most part the GPU driver would know which resources were being used for which draw / compute commands and the driver managed the…
Ever since I got my latest laptop (a 2022 Razer Blade 15 Advanced) I’ve noticed that sometimes the mouse cursor would become jumpy, not tracking finger motion correctly, and when that happens some gestures like two-finger scrolling and three-finger-tap for middle-click would fail - I guess because the jumpy cursor interferes with the state machine for the gesture recognition. It’s very…
Ratchet & Clank: Rift Apart came out on PlayStation 5 in 2021 and as a first-party title it was built around, and to show off, the architecture of the PS5 - especially its fast IO system and hardware decompression support. And it succeeded - the “rifts” and other game elemnts would transport you between worlds, loading gigabytes of data in a mere second or two. Insomniac’s a…
Jedi Survivor has been recently released and has suffered from some performance problems. EA has responded by saying that some of these issues are due to players “using cutting-edge, multi-threaded chipsets designed for Windows 11 were encountering problems on Windows 10” - presumably referring to Intel’s Alder Lake and Raptor Lake heterogenous cores used in the 12th and 13th gen…
Ever since Batman: Arkham Knight hit PC and its performance profile has been quite something - despite running well on consoles, it launched in an abysmal state best covered in this TotalBiscuit YouTube video and I found it legitimately fascinating to find a port with such huge differential between its console and PC versions. At first I thought it was something that can be fixed by waiting for a…
Microsoft recently announced DirectStorage’s PC availability in a blog post, and I was immediately excited to try it out. DirectStorage was developed for the Xbox Series consoles, which have a high-speed NVMe SSD, a hardware decompression engine, and a Unified Memory Architecture (UMA) where the CPU and GPU share the same memory pool. The API was designed to extract the highest throughput…
[UPDATE: This is actually a Microsoft bug in Windows. I owe Razer, and their firmware / EC team, a huge apology. 100% my fault.] Upgrading my laptop is like a second Christmas - I always benefit from the extra horsepower, and the general year-over-year advancements in things like displays, WiFi, and PCIe / NVMe are always nice to have. A little over a week ago I upgraded to the latest Razer Blade…
A little while after I wrote the titlebar fix for THPS 2 described in Tony Hawk’s Pro Cleanup I got annoyed by how every time I launch the game I have to sit through a display mode switch, since even with community mods and patches there’s no way to get the game to run at the same native resolution as my 4K display. Thinking about it, there’s nothing stopping the OS or another…
Tony Hawk’s Pro Skater 2 was one of the first games I played as a kid, and while visting family my sister mentioned how she misses that game which I so happened to have installed on my laptop — so naturally, we decided to hook that up to the TV and replay the career mode. But this time on Windows 10, even with the latest “cumulative patch”, we were faced with a title bar…
“There’s that sort of sense that many technical people will see or feel when you see something and you know what it could be, and you know it could be important, and you see companies just doing it wrong — there’s that powerful desire to fix it and do it right and show them sort of how it’s supposed to be done” — John Carmack at GDC 2015, in what’s likely…
This post is a work-in-progress follow-up to Arkham Quixote - while this disclaimer is up expect it to be frequently updated. It is mainly a response to the frequently asked questions in the reddit discussion. Since Arkham Knight’s performance issues are related to memory allocation, and memory allocators are fickle things affected by many properties of the system in question (including even…
“There’s that sort of sense that many technical people will see or feel when you see something and you know what it could be, and you know it could be important, and you see companies just doing it wrong — there’s that powerful desire to fix it and do it right and show them sort of how it’s supposed to be done” — John Carmack at GDC 2015
In The Atomic Application I mentioned that “With only about a day’s work you can turn your app into a standalone file” - and after talking the talk I decided to put my effort where my mouth is and walk the walk. I grabbed the source of Quake 2, configured to build with Visual Studio, and began working on transforming it into an atomic application as outlined in my earlier post.
I was writing some game networking code when all of a sudden Visual Studio was becoming increasingly non-responsive as more networking events occured. My first reaction was to pull out UIforETW and attempt to figure out what’s going on in Visual Studio and the system overall to cause this slowdown. And I spotted this smoking gun in Windows Performance Analyzer: A lot of time was being spent…
In a 1987 email, Leslie Lamport described a distributed system as “one in which the failure of a computer you didn’t even know existed can render your own computer unusable”. On the morning of February 5th, 2020 many people discovered their Windows 10 Start Menu’s search feature is not showing them any results - I was one of them, and to me this was yet another debilitating…
Most people would interpret saying “I would like to leave now” as a sign that the person uttering that sentence expressing a desire to leave now. Among the notable exceptions are kidnappers, and computer programmers. Software is notorious for failing to understand, or refusing to acknowledge, basic requests to leave. In some cases it’s acceptable, like when exiting an application…
The C10k Problem is about handling ten thousand connections at the same time. Let’s use the Erlang from Part I and Part II to write a TCP echo server that can handle ten thousand clients, in this case on a Raspberry Pi. I’ll assume you’re familiar with socket programming in C, but if you’re not then you ought to check out the excellent Beej’s Guide to Network…
Let’s continue what we started in Part I. We learned how to print some output once: -module(hello). -export([start/0]). start() -> io:format("Hello world!~n"). Now let’s try doing it many times, and for doing anything multiple times we’ll need to work with lists. We’ve already used one in our export statement and in some of the code in Part I as start(X) -> io:format("X is…
Programmers coming from a procedural background and trying to approach functional languages for the first time are usually told to forget everything they’ve learned and approach functional programming from a tabula rasa state of mind. This is a lot like Douglas Adams’s advice on how to fly being “The knack lies in learning how to throw yourself at the ground and miss” -…
There is nothing new to be discovered in physics now. All that remains is more and more precise measurement. — A quote (commonly misattributed to Lord Kelvin) which we now know is false. There’s no longer any low hanging fruit in classical physics. Software, on the other hand, is full of fields ripe for picking. The way we traditionally locally install applications on a PC is archaic —…