MPXplay under CWSDPMI (Users)
N.B. I'm a horrible programmer. You are 10x the coder I will ever be. So please don't take any of this as condescending, it's not. I'm just clarifying what I (barely) know. You probably knew all of this already anyways. (Corrections and clarifications welcome.)
> I don't do anything with DPMI in my own source. I already have the 32-bit
> dpmi environment at (before) the first line of my code.
Who says it's using DPMI? It could be using raw, XMS, EMS/VCPI instead. DPMI is just an API, it's not the same as 32-bit pmode (esp. since DPMI can also be 16-bit, e.g. 286). VCPI existed for a while before DPMI (Win 3.0). Old "WIN.COM /S" (standard mode) was the only way to get VCPI in Windows, and that's long since been abandoned.
> I haven't checked, but I think so there's no such stuff in the linked stub
> neither (that calls the dos4g.exe). Probably the DPMI host checking is in
> the dos4g.exe (and it's not opensource), so I cannot modify it (but I don't
> want it neither)...
I haven't checked your sources lately, do you use much inline asm? But anyways, IIRC, DOS/4G and DOS/4GW weren't meant for DJGPP, nor was CWSDPMI meant for Watcom. CWSDPMI is not an "extender" at all, it only provides the DPMI API (plus low-level support) and even then only for 32-bit stuff. OpenWatcom/DOS (mostly) only supports LE while DJGPP only (properly) supports COFF. You can't use the DJGPP stub with OpenWatcom.
> btw. Laaca. I don't understand why did you load the cwsdpmi like a "host"
> (tsr). It have to work similar like the using of dos4g (the program should
> load the cwsdpmi if it needs, you don't have to pre-load it)...
Right, I can't see why he would want to use it either unless he wanted swapping for some reason.
>> And generaly - when I got crash with some DOS4GW or DOS32A program I
>> always try to run it also under CWSDPMI.
Most apps are only tested with one DPMI host or one extender. It's very rare that switching helps. I know OpenWatcom brags about their drop-in replacements, but none of them support the full DPMI 0.9 standard, even (last I checked), only a subset.
> btw2. (the answer to your original question) probably the DLL handling part
> of Mpxplay crashes, because there are no such functions (API) in the
> CWSDPMI (these functions are also missing from DOS4GW.EXE, only DOS4G.EXE
> have them)
Right, DLLs are not part of the standard. And all these extended 32-bit variants of the 16-bit DOS API are non-standard also. DJGPP doesn't use any of that, and CWSDPMI primarily exists only for DJGPP (though well-behaving apps from others could work too, in theory, and I'm not implying Mpxplay isn't well-behaving here). DJGPP does "have hooks" (as Rod P. often says) for full DPMI 1.0, but most of that is disabled because Windows never supported more than 0.9 (though OS/2 allegedly came closer with 0.95). DJ said that 0.9 was the older, 286 version. The unpopular 1.0 was where some additional 386-only features came into play.
> Maybe I can add something api check to my code with a nice exit-error
> message, but I cannot load a new/other dpmi host.
"Get DPMI Capabilities -- DPMI 1.0"
http://www.delorie.com/djgpp/doc/dpmi/api/310401.html
IIRC, only CWSDPMI r5 and up support this (which should be plenty of leeway, IMHO). r6 was never finalized and was buggy, so r7 is the true successor to that. r6 calls itself "5.00" also (bug). r7 does correctly identify itself as 7.00. Note that CWSDPMI is not a full 1.0 implementation. I don't know if anybody outside of DPMIONE (or its cousin 386MAX?) ever did that, not even HDPMI32 (yet? right??). Still, CWSDPMI does support a few 1.0 calls.
.get_dpmi:
mov ax,401h ; get DPMI capabilities
mov cx,128
mov edi,dpmi_buf
stc
int 31h
jc .fiddle
.dosemu:
cmp dword [dpmi_buf+2],'DOSE'
jnz .cwsdpmi
cmp dword [dpmi_buf+2+2],'SEMU'
jz .no_fiddle
.cwsdpmi:
cmp dword [dpmi_buf+2],'CWSD'
jnz .fiddle
cmp dword [dpmi_buf+2+3],'DPMI'
jnz .fiddle
.no_fiddle:
xor eax,eax
inc al
jmp .ret
.fiddle:
xor eax,eax
.ret:
pop edi
ret
EDIT: Here's a DJGPP version I had lying around:
#include <stdio.h>
#include <dpmi.h>
int main() {
int flags; char vendor[129];
if (__dpmi_get_capabilities(&flags,vendor) == 0)
printf("\nVendor = %s, version = %d.%d\n",&vendor[2],vendor[0],vendor[1]);
else
printf("\nNo vendor id found.\n");
return 0; }
Complete thread:
- MPXplay under CWSDPMI - Laaca, 16.10.2010, 17:25 (Users)
![Open in board view [Board]](img/board_d.gif)
![Open in mix view [Mix]](img/mix_d.gif)
- MPXplay under CWSDPMI - ecm, 16.10.2010, 18:40
- MPXplay under CWSDPMI - Rugxulo, 17.10.2010, 01:39
- MPXplay under CWSDPMI - ecm, 17.10.2010, 01:56
- MPXplay under CWSDPMI - Rugxulo, 17.10.2010, 06:02
- MPXplay under CWSDPMI - DOS386, 23.10.2010, 09:08
- MPXplay under CWSDPMI - Rugxulo, 23.10.2010, 10:43
- MPXplay under CWSDPMI - DOS386, 23.10.2010, 10:56
- MPXplay under CWSDPMI - Rugxulo, 24.10.2010, 01:14
- CWSDPMI assembler port - ecm, 23.10.2010, 18:02
- CWSDPMI assembler port - Rugxulo, 24.10.2010, 01:30
- MPXplay under CWSDPMI - DOS386, 23.10.2010, 10:56
- MPXplay under CWSDPMI - Rugxulo, 23.10.2010, 10:43
- MPXplay under CWSDPMI - DOS386, 23.10.2010, 09:08
- MPXplay under CWSDPMI - Rugxulo, 17.10.2010, 06:02
- MPXplay under CWSDPMI - Laaca, 17.10.2010, 10:08
- MPXplay under CWSDPMI - Rugxulo, 17.10.2010, 15:46
- MPXplay under CWSDPMI - Laaca, 17.10.2010, 17:33
- MPXplay under CWSDPMI - Rugxulo, 17.10.2010, 23:23
- MPXplay under CWSDPMI - Laaca, 17.10.2010, 17:33
- MPXplay under CWSDPMI - Rugxulo, 17.10.2010, 15:46
- MPXplay under CWSDPMI - ecm, 17.10.2010, 01:56
- MPXplay under CWSDPMI - Rugxulo, 17.10.2010, 01:39
- MPXplay under CWSDPMI - Japheth, 16.10.2010, 19:31
- MPXplay under CWSDPMI - ecm, 16.10.2010, 19:34
- MPXplay under CWSDPMI - Japheth, 17.10.2010, 07:55
- MPXplay under CWSDPMI - RayeR, 26.10.2010, 18:30
- MPXplay under CWSDPMI - Mpxplay, 28.10.2010, 08:48
- MPXplay under CWSDPMI - Rugxulo, 28.10.2010, 11:41
- MPXplay under CWSDPMI - Mpxplay, 28.10.2010, 15:01
- MPXplay under CWSDPMI - Japheth, 28.10.2010, 15:50
- MPXplay under CWSDPMI - RayeR, 28.10.2010, 21:08
- MPXplay under CWSDPMI - Laaca, 29.10.2010, 07:44
- MPXplay under CWSDPMI - RayeR, 30.10.2010, 22:06
- MPXplay under CWSDPMI - Japheth, 03.11.2010, 20:50
- MPXplay under CWSDPMI - RayeR, 04.11.2010, 00:00
- MPXplay under CWSDPMI - Rugxulo, 04.11.2010, 06:24
- MPXplay under CWSDPMI - RayeR, 04.11.2010, 10:25
- Eternity (engine) + FreeDoom (data) - Rugxulo, 04.11.2010, 12:20
- Eternity (engine) + FreeDoom (data) - RayeR, 04.11.2010, 14:07
- Eternity (engine) + FreeDoom (data) - Rugxulo, 04.11.2010, 12:20
- MPXplay under CWSDPMI - RayeR, 04.11.2010, 10:25
- MPXplay under CWSDPMI - Japheth, 04.11.2010, 07:20
- MPXplay under CWSDPMI - Rugxulo, 04.11.2010, 09:03
- MPXplay under CWSDPMI - RayeR, 04.11.2010, 10:27
- MPXplay under CWSDPMI - RayeR, 04.11.2010, 14:10
- MPXplay under CWSDPMI - Laaca, 06.11.2010, 19:17
- MPXplay under CWSDPMI - Mpxplay, 08.11.2010, 12:31
- Mpxplay v1.57 beta 9 is out - Mpxplay, 15.11.2010, 12:03
- Mpxplay v1.57 beta 9 is out - Laaca, 15.11.2010, 16:32
- Mpxplay v1.57 beta 9 is out - Mpxplay, 15.11.2010, 17:16
- Mpxplay v1.57 beta 9 is out - Rugxulo, 15.11.2010, 19:43
- Mpxplay v1.57 beta 9 is out - Mpxplay, 16.11.2010, 00:15
- Mpxplay v1.57 beta 9 is out - Rugxulo, 16.11.2010, 14:01
- Mpxplay v1.57 beta 9 is out - Mpxplay, 16.11.2010, 20:46
- Mpxplay v1.57 beta 9 is out | WEBM - DOS386, 17.11.2010, 04:02
- Mpxplay v1.57 beta 9 is out | WEBM - Mpxplay, 17.11.2010, 13:08
- Mpxplay v1.57 beta 9 is out | WEBM - DOS386, 17.11.2010, 13:36
- Mpxplay v1.57 beta 9 is out | WEBM - Mpxplay, 17.11.2010, 20:47
- Mpxplay v1.57 beta 9 is out | WEBM - Mpxplay, 17.11.2010, 22:50
- Mpxplay v1.57 final is out | Ogg problems - Mpxplay, 26.11.2010, 05:44
- Mpxplay v1.57 beta 9 is out | WEBM - DOS386, 17.11.2010, 13:36
- Mpxplay v1.57 beta 9 is out | WEBM - Mpxplay, 17.11.2010, 13:08
- Mpxplay v1.57 beta 9 is out - Rugxulo, 16.11.2010, 14:01
- Mpxplay v1.57 beta 9 is out - Mpxplay, 16.11.2010, 00:15
- Mpxplay v1.57 beta 9 is out - Laaca, 04.12.2010, 21:09
- Mpxplay v1.57 beta 9 is out - Mpxplay, 11.12.2010, 22:02
- Mpxplay v1.57 beta 9 is out - RayeR, 12.12.2010, 14:12
- Mpxplay v1.57 - Rugxulo, 12.12.2010, 23:23
- Mpxplay v1.57 - Mpxplay, 12.12.2010, 23:58
- Mpxplay v1.57 and 1.58 - DOS386, 21.12.2010, 16:22
- Seems to be about TENNIS rather than MPXPLAY - DOS386, 24.12.2010, 08:45
- Mpxplay v1.57 and 1.58 - Rugxulo, 25.12.2010, 01:11
- Mpxplay v1.57 and 1.58 - DOS386, 26.12.2010, 09:21
- Mpxplay v1.57 and 1.58 - Laaca, 26.12.2010, 13:20
- Mpxplay v1.57 and 1.58 - INI and CFG stuff - DOS386, 27.12.2010, 08:42
- Mpxplay v1.57 and 1.58 - INI and CFG stuff - Mpxplay, 27.12.2010, 17:24
- Mpxplay v1.57 and 1.58 - INI and CFG stuff - DOS386, 30.12.2010, 09:45
- Mpxplay v1.57 and 1.58 - INI and CFG stuff - Mpxplay, 27.12.2010, 17:24
- Mpxplay v1.57 and 1.58 - INI and CFG stuff - DOS386, 27.12.2010, 08:42
- Mpxplay v1.57 and 1.58 - Laaca, 26.12.2010, 13:20
- Mpxplay v1.57 and 1.58 - DOS386, 26.12.2010, 09:21
- Mpxplay v1.57 - Rugxulo, 12.12.2010, 23:23
- Mpxplay v1.57 beta 9 is out - RayeR, 12.12.2010, 14:12
- Mpxplay v1.57 beta 9 is out - Mpxplay, 11.12.2010, 22:02
- Mpxplay v1.57 beta 9 is out - Laaca, 15.11.2010, 16:32
- Mpxplay v1.57 beta 9 is out - Mpxplay, 15.11.2010, 12:03
- MPXplay under CWSDPMI - Mpxplay, 08.11.2010, 12:31
- MPXplay under CWSDPMI - Laaca, 06.11.2010, 19:17
- MPXplay under CWSDPMI - Rugxulo, 04.11.2010, 06:24
- MPXplay under CWSDPMI - RayeR, 04.11.2010, 00:00
- MPXplay under CWSDPMI - Laaca, 29.10.2010, 07:44
- MPXplay under CWSDPMI - RayeR, 28.10.2010, 21:08
- MPXplay under CWSDPMI - Japheth, 28.10.2010, 15:50
- MPXplay under CWSDPMI - Mpxplay, 28.10.2010, 15:01
- MPXplay under CWSDPMI - Rugxulo, 28.10.2010, 11:41
- MPXplay under CWSDPMI - ecm, 16.10.2010, 19:34
- MPXplay under CWSDPMI - ecm, 16.10.2010, 18:40
Mix view