corteximplant.com is one of the many independent Mastodon servers you can use to participate in the fediverse.
CORTEX IMPLANT - an international cyberpunk'ish LGBTQIA+ friendly Fediverse instance for edgerunners, netrunners and cyberpunks and all who want to become one.

Administered by:

Server stats:

237
active users

Just finished hand-creating stub DLLs for all the 32-bit Windows system DLLs I've had referenced so far.

Prior to this, whenever a program linked against a DLL, I would intercept known system DLLs and route calls to a dynamically-generated set of stub functions that triggered my emulation of each API.

However, I have run into several cases where programs grope around for specific DLLs in Windows\System32 and even query version resources embedded within.

I figured this was a good excuse to make DREAMM's runtime a little more like the real thing, so now I produce these stub DLLs which have all the exports (at least as of Windows 2000/DX9) available. Each stub then triggers a call into the emulator with EAX pointing to a string containing the name of the function.

The first time this happens, I look the function up by name, convert it to an index in my table of APIs, and then patch the stub code to load the table index in EAX instead of a string pointer so that subsequent calls are cheap.

This also means I can implement some calls purely in emulation (for example, qsort and math helpers in the CRT), which is cleaner. And I can bundle a version resource for nosy programs to examine.

I kind of want to do this for 16-bit DLLs as well. We'll see if I can get the VC++1.5 tools to cooperate....

Rairii (bootloader unlocked, MSR_LE set)
Public

@aaronsgiles if vc++1.5 doesn't work there's always openwatcom (which is what i used last time i compiled an NE DLL)

Rairii (bootloader unlocked, MSR_LE set)
Public

@aaronsgiles i guess you could always use a dos compiler inside msdos player or dosbox

Evan Martin
Public

@aaronsgiles I am most of the way through implementing a similar change!