Skip to content

Ferrum development journal · Part 3 of 19

Building More of the Windows Runtime

Older DirectX, thread state, windows, and system objects all became part of the same job: answering the requests real Windows components make.

A Windows compatibility layer starts to get interesting when the components begin depending on one another. A DLL needs thread-local state. A graphics library wants to enumerate a display. A registry operation needs the same view of an object that another API already created. Each individual call may look simple, but the application expects them to describe one consistent system.

One useful example from this period was the older Direct3D path. Direct3D 9 doesn't discover a display in exactly the same way as the newer DXGI-based path. The work had to answer the display-enumeration requests that this code actually made before it could create the expected device. The milestone records include targeted device and pixel results; that isn't a promise that every older DirectX game is supported.

Thread behavior was becoming just as important. A value that belongs to one thread can't be treated as a process-wide variable. Modules loaded after a thread starts still need the right initialization. A wait has to release the resources another thread needs in order to wake it. These are the kinds of problems that can make a program appear to stall somewhere unrelated to the original mistake.

There was also more work on the 32-bit foundation, including the process information and loader state that i386 programs expect. That target brings an extra address-space problem on the Mac: a 32-bit guest pointer needs to be translated into the correct host address. Passing the number through unchanged isn't enough.

For someone using the finished product, none of this should require a special setup step. You should launch the application and have its ordinary Windows components behave consistently. During development, though, those assumptions have to be made explicit and tested one at a time.

The progress here was a broader set of real runtime behaviors, with plenty of application-level work still open. I was moving past the question of whether Intel instructions could execute and into the harder question of whether the surrounding environment made sense to the program using it.

Ferrum development journal

View the journal

Live19 entries so farUpdated New (19 entries updated in the last 14 days)

  1. Part 1Bringing FEX to macOS: The First Windows ProgramDevelopment work: Aug 5 – 7, 2026Updated , new
  2. Part 2From Return Values to Pixels and SoundDevelopment work: Aug 8 – 11, 2026Updated , new
  3. Part 3Building More of the Windows RuntimeDevelopment work: Aug 12 – 18, 2026Updated , new
  4. Part 4Following a Game Through Its Opening VideoDevelopment work: Aug 19 – 20, 2026Updated , new
  5. Part 5Installers, Saves, Fonts, and the Parts Around the GameDevelopment work: Aug 21 – 22, 2026Updated , new
  6. Part 6Game Progress and Measuring the Right ThingDevelopment work: Aug 23 – 27, 2026Updated , new
  7. Part 7Building the 32-Bit Graphics PathDevelopment work: Aug 28 – Sep 1, 2026Updated , new
  8. Part 8Making Memory, Files, and Graphics State AgreeDevelopment work: Sep 2 – 3, 2026Updated , new
  9. Part 9DirectX 12, Shader Caches, and the Steam Startup WorkDevelopment work: Sep 4 – 6, 2026Updated , new
  10. Part 10Working on Presentation and Controller InputDevelopment work: Sep 7 – 12, 2026Updated , new
  11. Part 11A Launcher and a Freeze That Wasn't the PresenterDevelopment work: Sep 15 – 17, 2026Updated , new
  12. Part 12Portal Reaches a Command Stream, With the Frame Still AheadDevelopment work: Sep 23 – 26, 2026Updated , new
  13. Part 13Correcting the Ferrum Progress ReportDevelopment work: Oct 2, 2026Updated , new
  14. Part 14Recovering the Project and Resuming Real TestsDevelopment work: Oct 5, 2026Updated , new
  15. Part 15Making Memory Protection and Lifetime Tests More UsefulDevelopment work: Oct 6 – 9, 2026Updated , new
  16. Part 16Getting Wine's Real 32-Bit Startup to RunDevelopment work: Oct 9 – 11, 2026Updated , new
  17. Part 17Making the Launcher Own Its Storage and ProcessesDevelopment work: Oct 11, 2026Updated , new
  18. Part 18A Real Archive Roundtrip and Better File BehaviorDevelopment work: Oct 11, 2026Updated , new
  19. Part 19Asynchronous I/O and the Bytes a Cancelled Write KeepsDevelopment work: Oct 11, 2026Updated , new

Arrow keys move through the results, Enter opens one, Command or Control with Enter opens it in a new tab. Tab and Shift+Tab change which kind of results are shown.