[comp.sys.ibm.pc.hardware] XMS -> EMS without using protected mode?

blk@mitre.org (Brian L. Kahn) (01/10/91)

I would like to convert some XMS memory to EMS, without using
protected mode.  I have seen a manager called LASTBYTE that claims to
do this by twiddling the chipset DMA's or something, but LASTBYTE
won't run on my machine.  I do have the kind of chipset they support,
so I bet my hardware could do this with the right software.
Unfortunately, I don't understand what is in some chipsets (NEAT,
VLSI, others) that allow this operation, so I am a bit in the dark.
Can anyone either explain the special features of chipsets, explain
what is needed for XMS -> EMS, or point me to some software?

--
B<   Brian Kahn   blk@security.mitre.org   "may the farce be with you"

williams@umaxc.weeg.uiowa.edu (Kent Williams) (01/11/91)

In article <BLK.91Jan10105610@vanity.mitre.org> blk@mitre.org (Brian L. Kahn) writes:
>
>I would like to convert some XMS memory to EMS, without using
>protected mode.

That isn't exactly what it does -- it uses the integrated chipset mapping
hardware to make use of the memory 'behind' the ROMS and video ram between
640K and 1 MByte.

The VLSI and C&T chipsets have hardware that can enable RAM on a page by
page basis throughout the Processor's address space.  TLB works by mapping
in RAM to the holes between the ROMS, on top of graphics RAM when you're
not using Graphics, etc.

>I have seen a manager called LASTBYTE that claims to
>do this by twiddling the chipset DMA's or something, but LASTBYTE
>won't run on my machine.  I do have the kind of chipset they support,
>so I bet my hardware could do this with the right software.

The two sentences contradict each other.  Try the latest version off of
SIMTEL20, V1.17.  It understands nearly all C&T chipsets for 286 and 386,
and has recently added support for a VLSI chipset.  It comes with a test
program that can tell you whether it will work with your computer.  This
program is available in a separate smaller ZIP file, so you don't waste
time downloading the whole thing if it won't work.

>Unfortunately, I don't understand what is in some chipsets (NEAT,
>VLSI, others) that allow this operation, so I am a bit in the dark.
>Can anyone either explain the special features of chipsets, explain
>what is needed for XMS -> EMS, or point me to some software?
>
>--
>B<   Brian Kahn   blk@security.mitre.org   "may the farce be with you"
There are commercial products that simulate EMS using expanded memory, but
they're an order of magnitude slower than the real thing.

& for all you 'The Cuckoo's Egg' fans, our friend Brian works at Mitre -- a
company featured prominently in that book.

--
             Kent Williams --- williams@umaxc.weeg.uiowa.edu 
"'Is this heaven?' --- 'No, this is Iowa'" - from the movie "Field of Dreams"
"This isn't heaven, ... this is Cleveland" - Harry Allard, in "The Stupids Die"

blk@mitre.org (Brian L. Kahn) (01/12/91)

In article <3864@ns-mx.uiowa.edu> williams@umaxc.weeg.uiowa.edu (Kent Williams) writes:
]In article <BLK.91Jan10105610@vanity.mitre.org> blk@mitre.org (Brian L. Kahn) writes:
]
]>I would like to convert some XMS memory to EMS, without using
]>protected mode.
] ...
]The VLSI and C&T chipsets have hardware that can enable RAM on a page by
]page basis throughout the Processor's address space.  TLB works by mapping
]in RAM to the holes between the ROMS, on top of graphics RAM when you're
]not using Graphics, etc.

Thanks for responding.  This might be general interest, so I'll come
back in a posting.  You seem to understand this, a few more questions:

1) Can these chipsets relocate RAM, or is the RAM "behind" ROMs and 
   adapter buffers lost when in real mode?
2) Do any readily available DOS programming books cover some of the
   chipset capabilities?  I know that each chipset will be different,
   but many functions are apparently similar or equivalent.

]>I have seen a manager called LASTBYTE that claims to
]>do this by twiddling the chipset DMA's or something, but LASTBYTE
]>won't run on my machine.  I do have the kind of chipset they support,
]>so I bet my hardware could do this with the right software.
]
]The two sentences contradict each other.  Try the latest version off of
]SIMTEL20, V1.17.  It understands nearly all C&T chipsets for 286 and 386,
]and has recently added support for a VLSI chipset.  It comes with a test
]program that can tell you whether it will work with your computer.  This
]program is available in a separate smaller ZIP file, so you don't waste
]time downloading the whole thing if it won't work.

If your lucky.  The reason these sentences contradict is that the test
program says "Lastbyte 1.17 will work on your computer" but I can't
get it to work.  No matter how I configure my setup, I get an error
message complaining "Shadow ram disabled/relocated - change setup",
and I just can't get Lastbyte (v1.17) to run.  Too bad, looks like
just what I want.

I've got an Enhanced Phoenix BIOS that includes setup in ROM.  The
setup screen gives me three options for the Intel 82335 (?) Memory
Controller, enabling or disabling DOS BIOS shadow, Video BIOS shadow,
and memory relocation.  I think that relocation moves otherwise unused
RAM up above 1 meg.  Another series of screens supports some 'extended
features', but these seem to all be associated with protected mode.
Disabling 'extended features' boots the machine in real mode.

] ...
]There are commercial products that simulate EMS using expanded memory, but
]they're an order of magnitude slower than the real thing.

Is it true that EMS -> XMS runs slower because those drivers use the
CPU to copy data from XMS to the EMS window?  What does "real" EMS do,
use DMA from the chipsets or remap the hardware?

--
B<   Brian Kahn   blk@security.mitre.org   "may the farce be with you"

liberato@dri.com (Jimmy Liberato) (01/13/91)

williams@umaxc.weeg.uiowa.edu (Kent Williams) writes:

>In article <BLK.91Jan10105610@vanity.mitre.org> blk@mitre.org (Brian L. Kahn) writes:
>>
>>I would like to convert some XMS memory to EMS, without using
>>protected mode.

Isn't XMS memory XMS memory by virtue of being defined as such by an XMS
driver?  And isn't XMS by its nature in protected mode? 

>That isn't exactly what it does -- it uses the integrated chipset mapping
>hardware to make use of the memory 'behind' the ROMS and video ram between
>640K and 1 MByte.                   ^^^^^^
                                     ^^^^^^
I keep hearing this metaphor but it does nothing to make this clear to
me.  If anything the "behindness" happens AFTER the shadow remapping.  There
is no memory to be made use of by the chipset in the ROM and video address
areas.  Am I misinterpreting your terminology?  Can you elaborate?  

>There are commercial products that simulate EMS using expanded memory, but
>they're an order of magnitude slower than the real thing.

But EMS=expanded memory!  You must have meant to type extended memory.  Those
programs are really only for early 286 class machines and their slowness and
inadequacy is a reflection of the awkward way the 286 handles extended memory. 
Those EMS emulators are not needed with modern NEAT 286 or 386/486 systems.    

--
Jimmy Liberato   liberato@dri.com
                 ...uunet!drivax!liberato