X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f From: Rugxulo Newsgroups: comp.os.msdos.djgpp Subject: NTVDM fixes Date: Thu, 5 Jun 2008 15:59:44 -0700 (PDT) Organization: http://groups.google.com Lines: 61 Message-ID: NNTP-Posting-Host: 65.13.115.246 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: posting.google.com 1212706785 28138 127.0.0.1 (5 Jun 2008 22:59:45 GMT) X-Complaints-To: groups-abuse AT google DOT com NNTP-Posting-Date: Thu, 5 Jun 2008 22:59:45 +0000 (UTC) Complaints-To: groups-abuse AT google DOT com Injection-Info: 34g2000hsh.googlegroups.com; posting-host=65.13.115.246; posting-account=p5rsXQoAAAB8KPnVlgg9E_vlm2dvVhfO User-Agent: G2/1.0 X-HTTP-UserAgent: Opera/9.27 (Windows NT 6.0; U; en),gzip(gfe),gzip(gfe) To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Okay, so I've been using Vista Home Premium (and later SP1) for the past 10 months, and I've discovered that there are some fixes / tweaks / workarounds for NTVDM limitations: 1). As you probably know, Vista is shipped in lots of computers now by default (instead of XP), but it has a 32 MB DPMI limit (for whatever reason, security??). And supposedly, it's now the same kernel as 2k8, so that may exhibit the same issue (although fixes untested there by me). You can get around this problem in two ways: a). upgrade to SP1 and add the following registry setting (dword) with the amount you want to use (e.g. "128000000"): HKLM\System\CurrentControlSet\Control\Wow\DpmiLimit This works fine for me (although it seems to be undocumented, so I had to ask somebody "in the know" just to discover it). I used REGEDIT (and HKLM was HK_LOCAL_MACHINE, for me), if that matters. b). However, T.R. Nicely has reported that his Vista Home Basic (no SP1) doesn't improve with this setting. I can only guess that they fixed something in SP1. And since he's on dialup, he's hard-pressed to waste his time to download SP1 (was a 66 MB lump, for me at least). But the following unofficial hack works for him too (although it may make NTVDM slightly less stable after running DPMI apps): "HXNTVDM (12k), support tool for NTVDM: This is a DPMI TSR which supplies additional functionality for DPMI applications in NTVDM. Might be useful for native DOS-extended applications. Source is included." http://www.japheth.de/Download/HXNTVDM.zip (needs JWasm + Win32inc to reassemble, both available on his site) In Vista, at least, you have to run CMD as Admin, put HXVDD.DLL in \WINDOWS\SYSTEM32, then put HXNTVDM.EXE somewhere in your path. Then, when you want to run a DPMI app that needs > 32 MB, run the TSR first, and it will translate DPMI memory calls into Win32 API calls, so it will work. (As mentioned, this is a much much smaller download than SP1, so if you're stuck on dialup, this is a good alternative, IMO.) For the record, this TSR/DLL combo was originally meant to improve / add upon XP's NTVDM, so the fact that it helps Vista is just icing on the cake. ;-) 2). Another TSR for XP etc. is EMS Magic 1.1 (no src, though), which intends to allow you to relocate the page frame in low memory, fakes XMS 3.0 by calling XMS 2.0, and (in pure DOS) runs in real mode instead of slower V86. http://www.phatcode.net/projects.php?id=102 3). Still another TSR/DLL combo is NTOLDAPP, which lets you access the clipboard from DOS using the same API as was available in Win9x (e.g. TDE's DJGPP version, Ctrl-Shift will copy selected text to clipboard just like the Win32 version does). This one includes src (.ASM, .CPP). (I can only assume this is the latest version since the original author's page has disappeared): http://www.phatcode.net/downloads.php?id=188 P.S. Comments / suggestions to these fixes are welcome.