Back to home page

DOS ain't dead

Forum index page

Log in | Register

Back to index page
Thread view  Board view
Zyzzle

31.07.2008, 00:35
 

DOS and 4 GB of memory (Users)

I realize the whole 4 GB address space cannot be directly used in DOS in 32-bit systems because of virtual mapping, etc. The most I've been able to get HIMEM.SYS ver. 3.0 to see is 3328 MB. This is with an old 128-MB ATI Radeon 9200 card. Am I correct in assuming that reducing the total video memory will augment the total available DOS RAM? So using an old 4 MB or 8 MB card would give me more addressable memory?

I'm surprised the HIMEM.SYS even sees above 2 GB, and I was able to use HX DOS-extender to run Win32 apps like PIFAST 4.3, and utilize above & beyond 3 GB of memory.

What is the closes anyone on this board has gotten to utilizing the full 4 GB on their DOS systems?

Can 16-bit apps be tweaked to see > 2 GB. Specifically, I'm wanting to create a RAMDISK over 2 GB in FAT16, utilizing 64-kb clustersize.

What about PAE -extensions in DOS to utilize > 4 GB memory on a 64-bit CPU?

All thoughts & comments on this much appreciated!

marcov

31.07.2008, 10:56

@ Zyzzle
 

DOS and 4 GB of memory

> I realize the whole 4 GB address space cannot be directly used in DOS in
> 32-bit systems because of virtual mapping, etc. The most I've been able to
> get HIMEM.SYS ver. 3.0 to see is 3328 MB. This is with an old 128-MB ATI
> Radeon 9200 card. Am I correct in assuming that reducing the total video
> memory will augment the total available DOS RAM? So using an old 4 MB or 8
> MB card would give me more addressable memory?

Not per se. A card can map more than it has memory.

The main culprit seem to be modern chipsets that require a full 256MB mapping.

PAE and memory remapping could be a solution, since under Dos, mostly only BIOS accesses the roms? Note that I haven't researched this, it is just intuitive.

Btw, what's the matter with all these new chipsets that come with big warning stickers "can't run win9x" ? Is this something only matters for support, or is it something major?

> I'm surprised the HIMEM.SYS even sees above 2 GB, and I was able to use HX
> DOS-extender to run Win32 apps like PIFAST 4.3, and utilize above & beyond
> 3 GB of memory.

Note that many programs, specially C ones doing pointer arithmetic might have problems when using address over 2GB.

> What about PAE -extensions in DOS to utilize > 4 GB memory on a 64-bit
> CPU?

A lot of older Xeons also support PAE. Not just 64-bit ones.

ecm

Homepage E-mail

Düsseldorf, Germany,
31.07.2008, 16:32

@ marcov
 

DOS and 4 GB of memory

> Note that many programs, specially C ones doing pointer arithmetic might
> have problems when using address over 2GB.

Could be a problem for DPMI and such, but real mode DOS applications using XMS shouldn't run into trouble here.

> > What about PAE -extensions in DOS to utilize > 4 GB memory on a 64-bit
> > CPU?
>
> A lot of older Xeons also support PAE. Not just 64-bit ones.

It was introduced around Pentium Pro (80686) or so.

---
l

RayeR

Homepage

CZ,
31.07.2008, 23:23

@ marcov
 

DOS and 4 GB of memory

> Btw, what's the matter with all these new chipsets that come with big
> warning stickers "can't run win9x" ? Is this something only matters for
> support, or is it something major?

What chipsets did you mean? I run Win98SE on intel P31 mobo and it works well. I can use only 1,15GB (limited in system.ini) of 2GB due to some bug in realtek 8111 eth. drivers but don't care. For more demanding apps I just boot XP.

---
DOS gives me freedom to unlimited HW access.

marcov

01.08.2008, 12:39

@ RayeR
 

DOS and 4 GB of memory

> > Btw, what's the matter with all these new chipsets that come with big
> > warning stickers "can't run win9x" ? Is this something only matters for
> > support, or is it something major?
>
> What chipsets did you mean? I run Win98SE on intel P31 mobo and it works
> well. I can use only 1,15GB (limited in system.ini) of 2GB due to some bug
> in realtek 8111 eth. drivers but don't care. For more demanding apps I just
> boot XP.

P35 and P965. Sticker says something "due to hardware limitations in the chipsets these boards are not supported for w9x".

Zyzzle

01.08.2008, 23:37

@ marcov
 

DOS and 4 GB of memory

The most I've been able to get available in Win98 is 1156 MB. This is in addition to a 2 GB ramdisk setup via XMSDSK.

Didn't know the P35 chipset claims not to have hardware support for Win98... Obviously DOS runs without problems.

Interesting comments about CWSDPMI rel. 6... I'll be using it to get 4M page swaps and fast access to > 512M. Thanks for the info!

Rugxulo

Homepage

Usono,
02.08.2008, 08:12

@ Zyzzle
 

DOS and 4 GB of memory

> Interesting comments about CWSDPMI rel. 6... I'll be using it to get 4M
> page swaps and fast access to > 512M. Thanks for the info!

Apparently, even with swap file pointing to RAM disk, when using > 512 MB of RAM (e.g. paq8o8z -7) it is like twice as slow (!) with r5 instead of r6. However, r6 might have compatibility issues with some (?) VCPI servers and DPMI 1.0 extensions (should your app rely on those). If you find any problems, report them to the author.

RayeR

Homepage

CZ,
03.08.2008, 00:59

@ Rugxulo
 

DOS and 4 GB of memory

> > Interesting comments about CWSDPMI rel. 6... I'll be using it to get 4M
> > page swaps and fast access to > 512M. Thanks for the info!
>
> Apparently, even with swap file pointing to RAM disk, when using > 512 MB
> of RAM (e.g. paq8o8z -7) it is like twice as slow (!) with r5 instead of
> r6. However, r6 might have compatibility issues with some (?) VCPI servers
> and DPMI 1.0 extensions (should your app rely on those). If you find any
> problems, report them to the author.

I'm using CWSDPMI r6 many years and I didn't find any compatability problems and I can see all 2GB of physical RAM.

---
DOS gives me freedom to unlimited HW access.

Japheth

Homepage

Germany (South),
03.08.2008, 06:15

@ RayeR
 

DOS and 4 GB of memory

> I'm using CWSDPMI r6 many years and I didn't find any compatability
> problems and I can see all 2GB of physical RAM.

It's not VCPI compliant. I had to implement a hack in Jemm to make CWSDPMI run with it.

---
MS-DOS forever!

Rugxulo

Homepage

Usono,
06.08.2008, 01:11

@ Japheth
 

DOS and 4 GB of memory

> > I'm using CWSDPMI r6 many years and I didn't find any compatability
> > problems and I can see all 2GB of physical RAM.
>
> It's not VCPI compliant. I had to implement a hack in Jemm to make CWSDPMI
> run with it.

In particular, I think r6 w/ (sometimes?) 4 MB pages will always have issues with some VCPI/EMM386s. CWS never did have enough testers of various VCPI servers, so if anyone here wants to test on QEMM, 386Max, whatever ... feel free to report your experiences either here or to CWS directly. Just anything that doesn't work as normal in standard/stable r5 is what he's specifically curious about (esp. DJGPP apps with code + data >= 4 MB: uncompressed CC1PLUS.EXE from GCC, Dungeon Crawl:SS, unstripped GDB, whatever).

http://rugxulo.googlepages.com/csdpmi6t.zip (44k)

( cwsdpmi AUGHT earthlink DAWT net )

Anyways, here's what Eric Auer had to say about 4 GB in pure DOS:

> About the 3.3 GB limit, this is simply because the BIOS tells HIMEM / ...
> that the last 0.5 or more GB of the 4 GB address space are
> reserved for PCI / AGP / PCIe MMIO and framebuffers,
> ACPI and BIOS data and similar stuff. No DOS bug here.
>
> This is NOT related to possible 2 GB and similar limits in
> DOS extenders. As a rule of thumb, if anybody can use more
> than 3 but less than 4 GB, the DOS extender WILL give him
> the full 4 GB, but there are hardware / firmware reserved
> areas which prevent you from using them.

I would test a bit myself, but I don't have that much RAM (although some uber-geeks seem to ... it shan't be long before we are all assimilated).

Japheth

Homepage

Germany (South),
06.08.2008, 07:15

@ Rugxulo
 

DOS and 4 GB of memory

> In particular, I think r6 w/ (sometimes?) 4 MB pages will always have
> issues with some VCPI/EMM386s. CWS never did have enough testers of
> various VCPI servers, so if anyone here wants to test on QEMM, 386Max,
> whatever ... feel free to report your experiences either here or to CWS
> directly. Just anything that doesn't work as normal in standard/stable r5
> is what he's specifically curious about (esp. DJGPP apps with code + data
> >= 4 MB: uncompressed CC1PLUS.EXE from GCC, Dungeon Crawl:SS, unstripped
> GDB, whatever).

It's not related to 4 MB pages. The VCPI client is free to implement any page tables he likes. The issue was about switching from real-mode to protected-mode. cwsdpmi expects a 16bit host stack and will crash if the stack is 32bit.

---
MS-DOS forever!

Rugxulo

Homepage

Usono,
07.08.2008, 05:37

@ Japheth
 

DOS and 4 GB of memory

> It's not related to 4 MB pages. The VCPI client is free to implement any
> page tables he likes. The issue was about switching from real-mode to
> protected-mode. cwsdpmi expects a 16bit host stack and will crash if the
> stack is 32bit.

(quoting README.UPD from R5UPDTST.ZIP, r5 update from 2002):

> This is an update of the r5 distribution for testing purposes. It is a test
> version! The copyright banner has an updated year but the images are very
> similar to the standard r5 binaries. Three bug fixes:
>
> 1) Test of PSE feature checks correct bit (removes warnings with BOCHS).
> 2) Load ESP properly to clear upper bits with VCPI servers setting them
> (Martin, please test!)
> 3) Serializing jump to avoid Pentium III bug hang (Symantec bug).
>
> MSWITCH.ASM includes all three changes. The copyright year is also changed
> in control.c - but a single byte change isn't worth including here.

So, is it possible that this update (in particular, fix #2) corrects this issue??

EDIT: Anyone else notice that FPC 2.2.2rc2 includes this r5 updated version? Good! ;-)

Japheth

Homepage

Germany (South),
07.08.2008, 10:08

@ Rugxulo
 

DOS and 4 GB of memory

> So, is it possible that this update (in particular, fix #2) corrects this
> issue??

Since there's a workaround implemented in Jemm, it isn't an "issue".

If you're interested, you can disable the workaround in Jemm, reassemble it and see what cwsdpmi does then. It's switch ?VCPITMPSS in VCPI.ASM, which must be set to 0.

---
MS-DOS forever!

RayeR

Homepage

CZ,
06.08.2008, 15:09

@ Rugxulo
 

DOS and 4 GB of memory

> various VCPI servers, so if anyone here wants to test on QEMM, 386Max,

BTW latest QEMM 9.01 is limited to 256 MB only. I tried to tell qemm the
memory size manually but it couldn't go beyond 256 MB. Then also DJGPP
progs under QEMM are limited to 256 MB. But it hadn't broblems with cwsdpmi 6.

---
DOS gives me freedom to unlimited HW access.

Steve

Homepage E-mail

US,
31.07.2008, 13:00

@ Zyzzle
 

DOS and 4 GB of memory

> I realize the whole 4 GB address space cannot be directly used in DOS in
> 32-bit systems because of virtual mapping, etc. The most I've been able to
> get HIMEM.SYS ver. 3.0 to see is 3328 MB. This is with an old 128-MB ATI
> Radeon 9200 card. Am I correct in assuming that reducing the total video
> memory will augment the total available DOS RAM?

Precisely because the video card has its own RAM, you can tell DOS memory managers to free up the system RAM that DOS normally reserves for video. But you still won't get the whole 4GB, or whatever the amount of system RAM is, because some will still be reserved for system or DOS use.

> So using an old 4 MB or 8 MB card would give me more addressable memory?

If your system recognizes it, and if you have the drivers for it.

> Can 16-bit apps be tweaked to see > 2 GB. Specifically, I'm wanting to
> create a RAMDISK over 2 GB in FAT16, utilizing 64-kb clustersize.

DOS and apps see a RAM disk as a disk, not RAM. Apps don't care about disk size (unless they run out of it when writing new files).

Rugxulo

Homepage

Usono,
31.07.2008, 20:00

@ Zyzzle
 

DOS and 4 GB of memory

> I'm surprised the HIMEM.SYS even sees above 2 GB, and I was able to use HX
> DOS-extender to run Win32 apps like PIFAST 4.3, and utilize above & beyond
> 3 GB of memory.
>
> What is the closes anyone on this board has gotten to utilizing the full 4
> GB on their DOS systems?

Not nearly that much because I only have 1 GB RAM on this laptop. ;-)
Yesterday I did use about 850 MB in testing paq8o8z (although it didn't barely help more than 133 MB did).

> Can 16-bit apps be tweaked to see > 2 GB. Specifically, I'm wanting to
> create a RAMDISK over 2 GB in FAT16, utilizing 64-kb clustersize.

XMSv3 supports really large amounts of RAM, so you can use SHSURDRV (386 version) to make a really big RAM disk. It comes w/ NASM src.

XMSv2 is the 16-bit variant, and I think that usually maxes out at 64 MB (even though a 286 can only max. handle 16 MB). So not sure what you mean by "16-bit apps", but in general, you probably want 386+.

> What about PAE -extensions in DOS to utilize > 4 GB memory on a 64-bit
> CPU?

Untested by me, but there is a DOS/32A PAE hack (usable by OpenWatcom/DOS/32-bit, e.g. LE/LX format only):


[2007-01-14]: dos32a_PAE_update.zip - by Charles Hyde - updated PAE patch

> All thoughts & comments on this much appreciated!

CWSDPMI r5 limits you to 512 MB. As you've noticed, HDPMI32 doesn't have such limitations. I think CWSDPMI r6 (beta) is better for large RAM. It can use 4 MB pages, which is faster, and it won't swap out on you as soon either (once 512k page tables are used low). And as far as DJGPP's libc goes, I think it has 2 GB signed pointer issues, so you may have to use sbrk() directly instead of indirectly via malloc(). In other words, CWS has suggested call sbrk() twice in succession for 1.5 GB each time if you want to alloc 3 GB. (PMODE/DJ can alloc 2 GB okay too, supposedly, but it's considered not as good.)

Rugxulo

Homepage

Usono,
01.08.2008, 05:01

@ Rugxulo
 

DOS and 4 GB of memory (CWSDPMI)

Here's what I've been told recently about CWSDPMI (straight from the horse's mouth):

> Actually r5 and r6 both support 2GB of RAM. But r5 will need to
> page fault the page directories to access the 2GB. So a hack that
> was used before r6 was to create a Ramdisk of about 2MB, and
> put the CWSDPMI pagefile on the ramdisk. Yep, it worked.
>
> The total virtual address space for either R5 or R6 could be up to
> 4GB, by using 2GB of ram and 2GB of pagefile. And once again,
> the pagefile could be on a ramdisk... Yes, people get creative, but
> it did hurt performance even paging to the ramdisk.

RayeR

Homepage

CZ,
11.08.2008, 17:28

@ Rugxulo
 

DOS and 4 GB of memory (CWSDPMI)

BTW I have read on Googlegrp/djgpp that C. Sandman have/will make some CWSDPMI update (releated to SSE). Is it available somewhere? I tried to mail him but delivery fail.

---
DOS gives me freedom to unlimited HW access.

Rugxulo

Homepage

Usono,
12.08.2008, 07:20

@ RayeR
 

DOS and 4 GB of memory (CWSDPMI)

> BTW I have read on Googlegrp/djgpp that C. Sandman have/will make some
> CWSDPMI update (releated to SSE). Is it available somewhere? I tried to
> mail him but delivery fail.

Make sure you e-mail him at the right address:

cwsdpmi AUGHT earthlink DAWT net

I've been contacting him in e-mail (although mostly just ramblings, heh). There are a few minor nits to (maybe?) sort out, but I'm not really sure what / when / etc. he'll do further. (He did send me a test version, basically r5 update + SSE ... nothing else, and it seems to work fine. If all fails, I could e-mail you that, but it includes no sources, just FYI.)

RayeR

Homepage

CZ,
12.08.2008, 11:43

@ Rugxulo
 

DOS and 4 GB of memory (CWSDPMI)

> cwsdpmi AUGHT earthlink DAWT net
>
> I've been contacting him in e-mail (although mostly just ramblings, heh).
> There are a few minor nits to (maybe?) sort out, but I'm not really sure
> what / when / etc. he'll do further. (He did send me a test version,
> basically r5 update + SSE ... nothing else, and it seems to work fine. If
> all fails, I could e-mail you that, but it includes no sources, just FYI.)

Hm mail seems to be correct. You got only r5 updated, not r6?

---
DOS gives me freedom to unlimited HW access.

Rugxulo

Homepage

Usono,
14.08.2008, 04:28

@ RayeR
 

DOS and 4 GB of memory (CWSDPMI)

>
> Hm mail seems to be correct. You got only r5 updated, not r6?

I haven't heard from him in two or three days, but last I did, he wanted some DOS .EXE w/ SSE1 only to test on his P3 (but I didn't have any). If anybody here has one, please e-mail him! ;-)

P.S. Yes, r5 2002 update + SSE fix only (CWSDPMI.EXE, CWSDSTUB.EXE, nothing else), not r6, and I'm not sure exactly what CWS is planning (and there are a few minor nits to be sorted out). Anyways, the readme included (no srcs!) says his e-mail starts with "csandmann", if that helps at all. Never tried that address, though, so I dunno. In fact, I'd rather he officially finished or gave me explicit permission to send you the test image, but I'm not sure how useful it is without sources. (If you really want swapping and SSE, use Causeway 4.02 w/ OpenWatcom.) I'm halfway considering just hacking CWSDPMI myself (but sadly it needs Borland/Turbo C + TASM, meh, slight annoyance. Using a hex editor in this case would probably suffice since the change is pretty small, AFAICT.).

Zyzzle

04.08.2008, 00:13

@ Rugxulo
 

DOS and 4 GB of memory

Wonderful, with SHSURDRV.EXE I am now able to create a ramdisk greater than 2 GB, since it allows for the 64 kb cluster size in FAT16! A great and little-known program... It seems Jason Hood has written some other very useful DOS utilities as well.

rr

Homepage E-mail

Berlin, Germany,
04.08.2008, 09:26

@ Zyzzle
 

DOS and 4 GB of memory

> Wonderful, with SHSURDRV.EXE I am now able to create a ramdisk greater than
> 2 GB, since it allows for the 64 kb cluster size in FAT16! A great and
> little-known program...

It's well-known in the world of FreeDOS. ;-)

> It seems Jason Hood has written some other very
> useful DOS utilities as well.

Indeed. :-)

---
Forum admin

Rugxulo

Homepage

Usono,
04.08.2008, 23:19

@ rr
 

DOS and 4 GB of memory

> > Wonderful, with SHSURDRV.EXE I am now able to create a ramdisk greater
> than
> > 2 GB, since it allows for the 64 kb cluster size in FAT16! A great and
> > little-known program...
>
> It's well-known in the world of FreeDOS. ;-)

Yes, but it's not entirely evident that it could be used to make such large RAM disks. In fact, I explicitly asked Jason a year or two ago about this just to clear up confusion. So now we know (and knowing is half the battle ...). ;-)

Back to index page
Thread view  Board view
22049 Postings in 2034 Threads, 396 registered users, 249 users online (1 registered, 248 guests)
DOS ain't dead | Admin contact
RSS Feed
powered by my little forum