Hi,
On May 24, 2:38 pm, "Rod Pemberton" <do_not_h...@notemailntt.cmm>
wrote:
> "Rugxulo" <
rugx...@gmail.com> wrote in message
>
> news:8f63638a-889d-46bd...@n42g2000yqm.googlegroups.com...
>
> > You said in another thread that your PC has 4 GB. I don't know why
> > you're still using older tools, e.g. CWSDPMI r5. His latest is r7 and
> > fixes and improves some stuff (though still has one or two rare bugs),
> > e.g. 4 MB pages (in some circumstances). I keep both around (among
> > others) for comparison.
>
> Yeah, so far, I haven't seen any advantage to r7. r5 works great. A few
> times, I thought r7 worked worse ... But, honestly, I haven't used r7
> enough to confirm. And, I've never checked if 4MB pages are enabled or
> disabled by default. I'd rather *not* have them enabled, i.e., choosing
> small pages by default.
I've used r7 a lot by now. More or less it's always better than r5 for
me. And while I love it and it works very very well, it does have one
or two bugs (sadly). You may encounter that on a 4 GB machine (due to
not taking into account needing to have page tables in low RAM, which
can sometimes run out on high amounts due to big RAM machines these
days; bad design flaw that would be tedious to test and fix).
You can use CWSPARAM to completely disable 4 MB pages in your r7. I
don't know the details of usage, though. I think it only uses 4 MB
pages if hardware supports it (586-686) and only if huge allocations
are used and only if not under EMM386/VCPI and only above a certain
amount of memory. (shrug) It's lots faster than 4 kb pages too, but
strict DPMI 1.0 wasn't technically designed for it (since 4 MB pages
didn't exist), so it may have very rare issues in those rare cases.
And something like it won't page/swap out 4 MB pages. Heh, I know,
sounds like a mess, welcome to modern hardware. ;-) I just like
having the option to use it, among others, and I usually use r7 by
default if at all possible.
At the very least, I hope you're using r5 from 2008, which had the 3
fixes from 2002 plus added SSE support.
> > [...] and I noticed (yet again) that Causeway (among others)
> > [has problems]
>
> I'm replying to an altered version of your topic...
>
> I collected many DPMI hosts a few years ago, but found most of them had one
> issue or another.
Probably true, yes. It's hard to test in a billion environments. And
DOS ain't cool anymore, so most developers gave up the ghost. Though
most of them are pretty darn stable and work well, but admittedly,
when you add gigs of RAM and other weirdnesses, it gets more complex.
> The main thing for me at that point in time was that they
> work with either DJGPP or OpenWatcom. So, I mostly stick to what works for
> those. CWSDPMI, CWSDPR0, PMODETSR (aka PMODEDJ) for DJGPP.
> DOS4G/W and HDPMI32 for OpenWatcom. I've not used Causeway with
> OpenWatcom. IIRC, I couldn't seem to get it to work with it, but I don't
> recall why. That was when I was very new to DPMI. So, I suspect it does
> work.
These days I'm using DOS32A.EXE renamed to DOS4GW.EXE with OpenWatcom.
It more or less works, but I keep the "real" DOS/4GW as backup just in
case.
Again, it's very eye-opening to see various bugs and corner cases in
DOS extenders on such a big RAM machine. <joking> Maybe you and I
should write our own? ^_^ </joking>
> Um, Rugxulo... Did you write most of this webpage? Be honest...
>
>
http://www.unet.univie.ac.at/~a0503736/php/drdoswiki/index.php?n=Main...
No, it was probably DOS386, he's big on editing that wiki. Reading it
again pretty obviously shows it was him, he has a certain style. ;-)
> I might have to take a look at DOS/32A someday.
>
> These features are very good:
> -"fast"
> -"large ram"
> -"drop-in replacement [for DOS4G/W]"
> -"applications are run in Ring0"
> -"written in assembly"
> -"it's source is very nice and well commented"
> -"compiles with TASM using IDEAL mode"
It's only 27 kb, which is much smaller than DOS4GW.EXE. Also, I think
DOSBox devs recommended using it for old Watcom-based games that had
problems as it sometimes worked better.
> I suspect these problems are probably easily fixable:
> -"in real mode also install[s] it[']s own DPMI kernel
> (bypassing the existing one)"
> -"prefer[s] VCPI over DPMI"
Yes, already mentioned that is a weird quirk. I emailed him, even he
doesn't remember why he did that. Oh well. But like I said, just do
"hdpmi32 -r", "jemm386 novcpi", "dos32a blah.exe ...", "jemm386 vcpi",
"hdpmi32 -u", and everything should be okay (if it doesn't work by
default, e.g. EMM386 NOVCPI, and you want to force DPMI).
> These features are so-so:
> -"paging won't be enabled"
> -I suspect no virtual memory (as a disk file) either (since no paging)...
Right. Most don't support virtual memory. The only ones that do are
CWSDPMI, DOS/4GW (barely), Causeway (but needs "full used RAM amount"
paged out, not just extra like CWS), DPMIONE, and maybe something else
I'm forgetting.
Though, like I said, DPMI seems to imply you can (client side) support
virtual memory even without explicit host support. But I have no idea,
never tried. (And my old experience with Vista with DPMI limit showed
that they must not support virtual memory for DOS apps anymore, ugh.)
We don't need virtual memory on modern machines. It was very useful on
old hardware (like my old P166), but nowadays, not so much. Anyways,
like I said, CWSDPMI r7 has a bug where, on my 6 GB machine, it says
"4 GB is free", but refuses (and can't) swap out, even when it needs
to (too many 4 kb pages to put into low / conventional memory!). So I
have to use some weird workarounds just to use Seed7 compiled compiler
+ DJGPP + tests (chkset, chkbig) or it will fail on those. (Boring,
obscure, just saying for completeness.)
> This feature might be useful for what I was asking about:
> -"bad habit ... to ignore an existing DPMI host"
It always uses VCPI despite DPMI being available also. You used to be
able to configure / choose, but no longer. Perhaps if you reassemble
it and uncomment out that part, but I haven't tried. Easier to use the
weird "jemm386 novcpi" hack mentioned above. Or just don't load
EMM386! ;-)
> This feature tells me it should be easy to convert to NASM:
> -"compiles with TASM using IDEAL mode"
>
> NASM sources would be great. I suspect converting DOS/32A to NASM would
> be easier than figuring out how to compile stuff by Japheth. That's one of
> the *big* problems, IMO, with the great stuff Japheth comes up with. Yes,
> I'm aware he was probably working on some of those projects for decades.
Well, the good news is that he spent a lot of time on JWasm, and he
used that by default in latest versions. So it's less crucial (unless
you, like me, prefer NASM syntax). Yeah, DOS extenders are kinda "old
school", so they mostly use old assemblers like TASM. Though D3X is
wholly written with NASM, but it has a few quirks (not to mention non-
commercial license, which doesn't bother me, but is GPL
incompatible ...).
I've not much tried, but "wasm -zcm=tasm" or lzasm or NoMySo (Perl
script) might be useful or help converting these things to NASM. A few
years ago I weakly tried to convert CWSDPMI r5 to free tools, but I
gave up half way. One of these days maybe I'll try again (though it's
not really urgent by any means).