aaronsgiles,
@aaronsgiles@corteximplant.com avatar

Discovered there was a Windows version of Star Wars Chess, so decided to look into it. As usual, it revealed some limitations in my emulation and ultimately caused me to pull quite a few threads to even get it up and limping.

In this case, I had to support loading multiple 16-bit EXEs into the same process, much like the Win32 VDM does. Previously I had just treated launching a 16-bit process like launching a 32-bit process: create an entirely fresh environment and run it in its own address space.

But SWC for some reason is written as multiple applications (tasks) that communicate aggressively via DDE using windows messaging and shared global memory. There were two ways of making that work: either maintain the 1:1 process-task mapping and figure out how to share global memory blocks between them, or switch over to launching all 16-bit tasks in the same process.

Turns out the latter is the right approach (I mean, there's a reason this is the way it's done in Windows). This is because the tight communication between programs relies on the cooperative multitasking rules of Win16, so I need to carefully control which task (and only one task at a time!) is active, and switch between them. It also meant abstracting a bunch of state (e.g., current directory) that each task maintains separately.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • random
  • DreamBathrooms
  • InstantRegret
  • ethstaker
  • magazineikmin
  • osvaldo12
  • rosin
  • mdbf
  • Youngstown
  • khanakhh
  • slotface
  • Durango
  • kavyap
  • ngwrru68w68
  • thenastyranch
  • provamag3
  • tacticalgear
  • cisconetworking
  • GTA5RPClips
  • modclub
  • cubers
  • normalnudes
  • everett
  • tester
  • megavids
  • Leos
  • anitta
  • JUstTest
  • lostlight
  • All magazines