VOGONS


EMM386 NOEMS Vs EMM386

Topic actions

First post, by GabrielKnight123

User metadata
Rank Oldbie
Rank
Oldbie

Im making a config.sys menu with different settings but I have compared it to Phills PC Lab's config.sys and in general I have this:

submenu=EMS, Start PC With Expanded Memory (EMM386).
submenu=NOEMS, Start PC With Extended Memory (No EMM386).

If I want extended memory do I use:

DEVICE=C:\DOS\EMM386.EXE NOEMS HIGHSCAN I=B000-B7FF

or do I delete the DEVICE=C:\DOS\EMM386.EXE NOEMS HIGHSCAN I=B000-B7FF line completely? If I just delete the whole line how do I set I=B000-B7FF do I just put it on a line of its own? ie:

DEVICE=C:\DOS\HIMEM.SYS /TESTMEM:OFF
I=B000-B7FF

Reply 1 of 30, by root42

User metadata
Rank l33t
Rank
l33t

You don't. If you want to use UMBs to load programs high you NEED EMM386. himem.sys takes care of XMS, and EMM386 takes care of UMBs and EMS. You can disable EMS with the NOEMS option, but it will still put the CPU in protected mode, which might conflict with a few games.

YouTube and Bonus
80486DX@33 MHz, 16 MiB RAM, Tseng ET4000 1 MiB, SnarkBarker & GUSar Lite, PC MIDI Card+X2+SC55+MT32, OSSC

Reply 2 of 30, by derSammler

User metadata
Rank l33t
Rank
l33t
root42 wrote:

but it will still put the CPU in protected mode

EMM386 puts the CPU into Virtual 8086 mode, not into protected mode. That means that DOS can run within protected mode, if a program switches to that.

Reply 3 of 30, by Falcosoft

User metadata
Rank Oldbie
Rank
Oldbie
derSammler wrote:

EMM386 puts the CPU into Virtual 8086 mode, not into protected mode. That means that DOS can run within protected mode, if a program switches to that.

Root42 is right. V86 mode is a submode of protected mode. You cannot have V86 mode without switching the CPU into protected mode. V86 mode means that while the CPU is in protected mode it emulates a 16 bit real mode virtual machine. So in V86 mode normal programs run in ring 3 only the monitor/supervisor runs in ring 0 (which is EMM386 in this case) so normal user programs can't enter protected mode from inside of a v86 task (it would cause an exception). DOS programs that use 32-bit DOS extenders like DOS4GW/DOS32A do not try to switch directly into protected mode. They interact directly only with the DOS extender. It's the DOS extender's duty to detect that the CPU is already in protected/V86 mode and use the standard interfaces provided by the monitor/supervisor (such as VCPI/DPMI).

Website, Facebook, Youtube
Falcosoft Soundfont Midi Player + Munt VSTi + BassMidi VSTi
VST Midi Driver Midi Mapper

Reply 4 of 30, by dr_st

User metadata
Rank l33t
Rank
l33t
GabrielKnight123 wrote:

Im making a config.sys menu with different settings but I have compared it to Phills PC Lab's config.sys and in general I have this:

submenu=EMS, Start PC With Expanded Memory (EMM386).
submenu=NOEMS, Start PC With Extended Memory (No EMM386).

That's a bad idea to start. Phil's examples are unnecessary bloated, and it's unfortunate that this is where most newbies begin. There is no reason to have a separate EMS and a NOEMS config.

DEVICE=C:\DOS\EMM386.EXE RAM I=B000-B7FF is good for 99% of the configs. If you have something that must have real mode, you cannot have EMM386, period.

https://cloakedthargoid.wordpress.com/ - Random content on hardware, software, games and toys

Reply 5 of 30, by derSammler

User metadata
Rank l33t
Rank
l33t
Falcosoft wrote:

Root42 is right. V86 mode is a submode of protected mode. You cannot have V86 mode without switching the CPU into protected mode. V86 mode means that while the CPU is in protected mode it emulates a 16 bit real mode virtual machine.

Well, maybe nitpicking, but saying that it puts the CPU into protected mode while it's really V86 mode is wrong. Why? Because it makes a huge difference. In V86 mode, memory above 1 MB can still only be accessed by a page window. In protected mode however you have linear addressing for the whole memory range. A game like DOOM or a 32-bit OS put the CPU into protected mode, EMM386 does not. You may call V86 mode a submode of protected mode, but that still doesn't make them equal.

Whatever, I don't want to go off topic, so I leave it at that.

Reply 6 of 30, by gdjacobs

User metadata
Rank l33t++
Rank
l33t++
dr_st wrote:

That's a bad idea to start. Phil's examples are unnecessary bloated, and it's unfortunate that this is where most newbies begin. There is no reason to have a separate EMS and a NOEMS config.

DEVICE=C:\DOS\EMM386.EXE RAM I=B000-B7FF is good for 99% of the configs. If you have something that must have real mode, you cannot have EMM386, period.

Is using submenu an actual problem in terms of memory usage?

All hail the Great Capacitor Brand Finder

Reply 7 of 30, by Falcosoft

User metadata
Rank Oldbie
Rank
Oldbie
derSammler wrote:

Well, maybe nitpicking, but saying that it puts the CPU into protected mode while it's really V86 mode is wrong. Why? Because it makes a huge difference. In V86 mode, memory above 1 MB can still only be accessed by a page window. In protected mode however you have linear addressing for the whole memory range. A game like DOOM or a 32-bit OS put the CPU into protected mode, EMM386 does not. You may call V86 mode a submode of protected mode, but that still doesn't make them equal.

Sorry to say but you are wrong. When you are talking about V86 mode you are talking from the perspective of real mode user programs. What you say is only possible since the CPU itself IS in protected mode so EMM386 can virtualize a 16 bit x86 environment. DOOM or 32-bit DOS extenders can enter to protected mode directly only when they are started in real mode. When they are started with EMM386 loaded the CPU is already in protected/v86 mode so they have to use VCPI/DPMI. The source code of DOOM is available so you can study this topic further. Also you can try to write a simple DOS program that tries to enter into protected mode directly. And test it under real mode and EMM386 loaded. You will see the difference immediately. Entering into protected mode requires the modification of CR0 register. At the moment when you try to modify CR0 when EMM386 is loaded you will get a privileged instruction exception (since we are already in protected mode, and in protected mode it's prohibited for user mode programs running in ring 3). If you do not believe me here's some reference:
https://wiki.osdev.org/Virtual_8086_Mode

Edit:
If the CPU is in Protected Mode or not is defined by the lowest bit of the CR0 register.
The lowest bit of CR0 (CR0.PE, Protection Enable) is also set in V86 mode.

Last edited by Falcosoft on 2018-08-19, 18:01. Edited 1 time in total.

Website, Facebook, Youtube
Falcosoft Soundfont Midi Player + Munt VSTi + BassMidi VSTi
VST Midi Driver Midi Mapper

Reply 9 of 30, by Jo22

User metadata
Rank l33t++
Rank
l33t++

@OP If you like to have both EMS and Real-Mode, you can try running EMM286.
It doesn't support all of the features of EMS, but might work with a few games.

Alternatively, you can also buy an Expaned Memory Board. That's the real thing.
Popular boards were/are the AST Rampage, Intel AboveBoard and the Lo-Tech 2MB EMS Card.

"Time, it seems, doesn't flow. For some it's fast, for some it's slow.
In what to one race is no time at all, another race can rise and fall..." - The Minstrel

//My video channel//

Reply 10 of 30, by cyclone3d

User metadata
Rank l33t++
Rank
l33t++

Oh there are a bunch more high memory areas you can use to get even more UMBs available as long as you don't have some special cards using those memory addresses.

See here:
http://www.cubic.org/docs/configuring.htm
http://www.lagmonster.org/docs/DOS7/v-emm386-sys.html
http://www.vogonswiki.com/index.php/DOS_memory_management

HIGHSCAN doesn't work nearly as good as configuring the included address ranges manually.

If you want UMBs, but to EMS, you can use UMBPCI if your chipset supports it. I used to use it back in the day. It also takes up less RAM than EMM386.

Yamaha modified setupds and drivers
Yamaha XG repository
YMF7x4 Guide
Aopen AW744L II SB-LINK

Reply 11 of 30, by Fusion

User metadata
Rank Member
Rank
Member

As always, DOS memory management is just as confusing and ridiculous as it was 25+ years ago. 😀

And I wouldn't have it any other way.

Pentium III @ 1.28Ghz - Intel SE440xBX-2 - 384MB PC100 - ATi Radeon DDR 64MB @ 200/186 - SB Live! 5.1 - Windows ME

Reply 12 of 30, by GabrielKnight123

User metadata
Rank Oldbie
Rank
Oldbie

Ok half of what everyone said I dont understand but maybe this question will help, what is it called when you have the "DEVICE=C:\DOS\EMM386.EXE RAM AUTO" line in the config.sys is this extended or expanded memory and what is it called when the "RAM AUTO" part is removed and "NOEMS" is added is it still extended/expanded or something else?

Reply 13 of 30, by cyclone3d

User metadata
Rank l33t++
Rank
l33t++
Fusion wrote:

As always, DOS memory management is just as confusing and ridiculous as it was 25+ years ago. 😀

And I wouldn't have it any other way.

It really isn't all that confusing. Just takes a little bit to set up. Once you get used to it, it is really pretty simple.

Back in the day I even had a program that would show the free blocks of RAM in between 640KB and 1MB. It helped for showing me the exact ranges I could include and in what order I should load stuff in config.sys and autoexec.bat. I will have to try to find it again at some point.

Yamaha modified setupds and drivers
Yamaha XG repository
YMF7x4 Guide
Aopen AW744L II SB-LINK

Reply 14 of 30, by GabrielKnight123

User metadata
Rank Oldbie
Rank
Oldbie

Oops I reread this from root42

"If you want to use UMBs to load programs high you NEED EMM386. himem.sys takes care of XMS, and EMM386 takes care of UMBs and EMS. You can disable EMS with the NOEMS option"

that answers my question

Reply 15 of 30, by cyclone3d

User metadata
Rank l33t++
Rank
l33t++
GabrielKnight123 wrote:

Ok half of what everyone said I dont understand but maybe this question will help, what is it called when you have the "DEVICE=C:\DOS\EMM386.EXE RAM AUTO" line in the config.sys is this extended or expanded memory and what is it called when the "RAM AUTO" part is removed and "NOEMS" is added is it still extended/expanded or something else?

HIMEM.SYS provides EXTENDED. EMM386 and similar provide EXPANDED.

With NOEMS you only get extended from HIMEM.SYS

If you look at the second link I provided, it explains ALL the options for EMM386

RAM=range
Specifies a range of segment addresses to be used for UMBs and also enables EMS support. If =range is omitted, EMM386 uses all available adapter space to create UMBs along with a page frame for EMS.

AUTO
EMM386 is not activated at startup but is automatically activated if any program calls for it.

(ninja posted, but still relevant)

Yamaha modified setupds and drivers
Yamaha XG repository
YMF7x4 Guide
Aopen AW744L II SB-LINK

Reply 16 of 30, by gdjacobs

User metadata
Rank l33t++
Rank
l33t++
cyclone3d wrote:

HIMEM.SYS provides EXTENDED. EMM386 and similar provide EXPANDED.

Also, EMM386 (plus UMBPCI, QEMM, and JEMM386) provide upper memory blocks.

All hail the Great Capacitor Brand Finder

Reply 18 of 30, by cyclone3d

User metadata
Rank l33t++
Rank
l33t++

I did use MSD, but I am pretty sure I also had something different.

I seem to remember a black background. Pretty sure it showed exactly what drivers and tsrs were loaded where.

Ok, so it may have been TSR Utilities Version 3.5
https://www.pcorner.com/list/UTILITY/TSRCOM35.ZIP/INFO/

THE PROGRAMMER'S CORNER BBS ARCHIVE FROM THE PAST

Tons of useful stuff.

Yamaha modified setupds and drivers
Yamaha XG repository
YMF7x4 Guide
Aopen AW744L II SB-LINK

Reply 19 of 30, by Falcosoft

User metadata
Rank Oldbie
Rank
Oldbie

There are better diagnostic utilities out there, but MSD is the only one that shows a PC system memory map (that I can recall).

I think Checkit is even more advanced than MSD since it can give you raw dump/vendor string if you press enter on a given memory area.

checkit_rammap.jpg
Filename
checkit_rammap.jpg
File size
232.03 KiB
Views
7366 views
File license
Fair use/fair dealing exception

Website, Facebook, Youtube
Falcosoft Soundfont Midi Player + Munt VSTi + BassMidi VSTi
VST Midi Driver Midi Mapper