me: well this is stupid, why did IBM sneak specifically Photoshop support under Win32s 1.30 and nothing else

ArcaOS: "we don't actually have a copy of the Win-OS2 source because it's encumbered by god knows how many companies"

me: i am once again asking myself how did i get here

thunks from hell

16-bit Windows calling a 32-bit driver pretending to be three VXDs in the VDM context which calls out to undocumented hooks in the OS/2 kernel to let Win32s allocations work

i wouldn't know how the fuck any of this works if it wasn't my day job

Win32s maintains a memory arena in the top half of the 32-bit address space. To run under OS/2, the IBM-supplied VW32S.SYS has to translate the VirtualAlloc/Free/etc calls and their flags and options into OS/2 VMAlloc/Free/etc calls.

It looks like Boca Raton added undocumented MVDM.DLL exports that give a VDM direct access to the OS2KRNL virtual memory management subsystem!

@luigithirty

are you documenting all of this somewhere?

@bitsavers I will be once I figure out where
@luigithirty you're reversing win-os/2 *for your day job*?
@Rairii No, no, my day job is CPU simulation so I'm intimately familiar with x86 OS memory management
@luigithirty I read "the VDM context" as "a trenchcoat".
@pianosaurus not inaccurate since the driver masquerades as W32S, SHELL, and VTD.vxd to windows