Not good. After countless debugging sessions involving a modified version of DOSBox, lots of coffeine and a hammer I've figured out what's wrong with Dark Forces running under DOS/32A. In short, this is a manifestation of "Problem 5" described in http://dos32a.sourceforge.net/wwwroot/manual/html/util/6.htm .
For the technically inclined: DF installs an exception handler for Division by zero CPU error. Apparently, there is code in DF whose logic causes that error and judging from disassembly and the pattern of the crashes it is not system related, e.g. it seems to be something as trivial as GFX or AI. For some reason they are not handling it with "if" statements (tight schedule?) but choose to hardcode this:
exception0_handler:
push ebp
mov ebp,esp
add dword ptr [ebp+10h],2 // this skips the "idiv ecx" opcode that causes Exception0
pop ebp
retf
Since DOS/32A does not follow DPMI spec regarding stack frames for exception handlers (which is my fault: far too much aggressive optimization) this causes the stack to become completely screwed up and ultimately leads to game crashes.
Since this is documented, I won't tag this as a bug, but until I figure out a good way of handling this,.. this is a WONTFIX.
Too bad,
- NK