Jump to content

Welcome to MSFN Forum
Register now to gain access to all of our features. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more. This message will be removed once you have signed in.
Login to Account Create an Account



Photo

EMS in XP

- - - - -

  • Please log in to reply
13 replies to this topic

#1
Asp

Asp

    Member

  • Member
  • PipPip
  • 156 posts
  • Joined 17-April 05
  • OS:XP Pro x86
  • Country: Country Flag
I've got a DOS app I run frequently that likes EMS memory.

I installed EMSMagic, an interesting free app that provides EMS.

I noticed that on my system that it didn't actually need to run its own app, but used Windows components.
Specifically, it made a pif file and that had a config.nt and autoexec.nt:

autoexec.nt
@echo off
lh %SystemRoot%\system32\mscdexnt.exe
set BLASTER=A220 I5 D1 P330 T3

config.nt
dos=high, umb
emm=ram
device=%SystemRoot%\system32\himem.sys
files=40

So I wondered if I could just make these my system files and have EMS available to all programs.
(Was this a bad idea? Any reason not to do this? I have 3.6 GB RAM available, so the maximum 16MB EMS uses seems affordable even if I don't need it all the time.)

So I replaced my system config.sys with the text of this config.nt. (I skipped the autoexec, it doesn't seem relevant, having CDROM and audio drivers which I don't need.) But on rebooting, there didn't seem to be any EMS available.

Running the pifs though did produce it as before.

Is my new config.sys being run at all, if so, why doesn't it work?

Edited by Asp, 22 June 2013 - 03:41 AM.



How to remove advertisement from MSFN

#2
dencorso

dencorso

    Iuvat plus qui nihil obstat

  • Supervisor
  • 5,935 posts
  • Joined 07-April 07
  • OS:98SE
  • Country: Country Flag

Donator

No, XP ignores the config.sys.

Then again EMSMagic is not needed anymore to get EMS, MS fixed the kernel for some months already.

Bulletin for Windows XP users with WPDOS 5.1: restore expanded memory (EMS) disabled by 10 October 2012 Windows update

A Windows XP update automatically installed on 10 October 2012 disabled expanded memory (EMS), which for some users (especially those who use abbreviation-expansion software such as SmarType) is required for smooth operation of WPDOS 5.1 and 5.1+. (EMS is not needed with WPDOS 6.x.) A later Windows update, installed on 12 February 2013, corrects this problem. If you installed EMSMagic or some other third-party solution as a way to work around this update, you no longer need any workaround. Simply let Windows Update install all current updates, and the problem will be solved. Source: wpdos site

The update from 12 February 2013 mentioned above is KB2799494, but it's already superceded by KB2839229, which, if you have it installed, already provides you the needed EMS.

#3
Asp

Asp

    Member

  • Member
  • PipPip
  • 156 posts
  • Joined 17-April 05
  • OS:XP Pro x86
  • Country: Country Flag

No, XP ignores the config.sys.


Why the hell does the file exist then?


The update from 12 February 2013 mentioned above is KB2799494, but it's already superceded by KB2839229, which, if you have it installed, already provides you the needed EMS.

No update of Windows XP provides EMS unless you have run the commands I mentioned in the config.nt.
Open a command prompt and run "mem". You have no EMS unless you have those in the pif.


Just running "cmd":
Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.
C:\Documents and Settings\Owner>mem

    655360 bytes total conventional memory
    655360 bytes available to MS-DOS
    598992 largest executable program size

   1048576 bytes total contiguous extended memory
         0 bytes available contiguous extended memory
    941056 bytes available XMS memory
           MS-DOS resident in High Memory Area
There is 940 kB of XMS, no EMS.

Running from a pif with the config.nt set:

D:\>mem


    655360 bytes total conventional memory
    655360 bytes available to MS-DOS
    614768 largest executable program size

  16777216 bytes total EMS memory
  16777216 bytes free EMS memory

  16775168 bytes total contiguous extended memory
         0 bytes available contiguous extended memory
  67041280 bytes available XMS memory
           MS-DOS resident in High Memory Area
16 MB EMS, 64 MB XMS

Edited by Asp, 22 June 2013 - 10:53 AM.


#4
dencorso

dencorso

    Iuvat plus qui nihil obstat

  • Supervisor
  • 5,935 posts
  • Joined 07-April 07
  • OS:98SE
  • Country: Country Flag

Donator

Presumably, config.sys and autoexec.bat exist (and usually are no more than just entries in the root directry, since they're both 0 bytes long in the default XP installation) for backwards compatibility with programs that require them. They also may be useful for multibooting scenarios using the built-in multiboot system controlled via boot.ini, which can boot more than one OS from the same partition (I never considered that option wise, BTW). My point was a different one: the NT-OSes don't create by default a DOS VM at boot, like the 9x/ME-family does. So, the NT-OSes' DOS-boxes are just applications (like any others) which must be loaded to be there, and one loads them through a .pif (which causes the .nt versions of the files to be read, if they exist, but not the classic ones), or by calling cmd.exe directly.

#5
Asp

Asp

    Member

  • Member
  • PipPip
  • 156 posts
  • Joined 17-April 05
  • OS:XP Pro x86
  • Country: Country Flag

the NT-OSes don't create by default a DOS VM at boot, like the 9x/ME-family does. So, the NT-OSes' DOS-boxes are just applications (like any others) which must be loaded to be there, and one loads them through a .pif (which causes the .nt versions of the files to be read, if they exist, but not the classic ones), or by calling cmd.exe directly.



So, running these commands via a PIF is the only way to make EMS available in XP?

If it is, well, I can deal with it but I'd just prefer not to have to mess with PIFs if I can avoid it by enabling EMS once for all programs.

After all, the DOS boxes use the system environment variables, so they are configurable in some ways.

Edited by Asp, 22 June 2013 - 10:50 PM.


#6
jaclaz

jaclaz

    The Finder

  • Developer
  • 15,634 posts
  • Joined 23-July 04
  • OS:none specified
  • Country: Country Flag

No, XP ignores the config.sys.

Sure :thumbup , but the program produced config.nt and autoexec.nt

@Asp
WHY was config.nt copied as config.sys?

You have to somehow provide environment parameters to the NTVDM:
http://en.wikipedia....ual_DOS_machine
running 16 bit apps, don't you?

JFYI:
http://support.micro...kb/324767/en-us
http://home.earthlin...osemulation.htm

jaclaz

Edited by jaclaz, 23 June 2013 - 08:02 AM.


#7
Asp

Asp

    Member

  • Member
  • PipPip
  • 156 posts
  • Joined 17-April 05
  • OS:XP Pro x86
  • Country: Country Flag
Maybe a mod can split all the posts about these updates to a separate thread.

I was notified there were a dozen responses to my question on EMS, but none are relevant.

#8
dencorso

dencorso

    Iuvat plus qui nihil obstat

  • Supervisor
  • 5,935 posts
  • Joined 07-April 07
  • OS:98SE
  • Country: Country Flag

Donator

Done! :D
But you were not fair: jaclaz had answered you latest question pretty comprehensively, AFAICS... and none of the other responders had anything else to add. Did you overlook his reply? :unsure:

#9
Asp

Asp

    Member

  • Member
  • PipPip
  • 156 posts
  • Joined 17-April 05
  • OS:XP Pro x86
  • Country: Country Flag

Done! :D
But you were not fair: jaclaz had answered you latest question pretty comprehensively, AFAICS... and none of the other responders had anything else to add. Did you overlook his reply? :unsure:

Thanks.
I didn't mean the whole thread, I said "the posts about these updates", which had drifted off the original topic.
I saw and replied to Jaclaz's post, but you seem to have deleted it.
it was something like this:

@Asp
WHY was config.nt copied as config.sys?

I thought that was what the system files were, the names as in previous versions of Windows and DOS, as opposed to the "PIF" versions with "nt".
Just my guess, but apparently wrong as neither will be read by XP.

You have to somehow provide environment parameters to the NTVDM:


Yes, that was basically my question.
DOS environment strings like "PATH" can be set universally, so I was wondering/hoping there was a way to run emm universally as well.

And added this today:
Looking around I found there is a default config.nt and autopexec.nt in WINDOWS\SYSTEM32 with some useful comments in them.

config.nt
REM Windows MS-DOS Startup File
REM
REM CONFIG.SYS vs CONFIG.NT
REM CONFIG.SYS is not used to initialize the MS-DOS environment.
REM CONFIG.NT is used to initialize the MS-DOS environment unless a
REM different startup file is specified in an application's PIF.
REM
REM ECHOCONFIG
REM By default, no information is displayed when the MS-DOS environment
REM is initialized. To display CONFIG.NT/AUTOEXEC.NT information, add
REM the command echoconfig to CONFIG.NT or other startup file.
REM
REM NTCMDPROMPT
REM When you return to the command prompt from a TSR or while running an
REM MS-DOS-based application, Windows runs COMMAND.COM. This allows the
REM TSR to remain active. To run CMD.EXE, the Windows command prompt,
REM rather than COMMAND.COM, add the command ntcmdprompt to CONFIG.NT or
REM other startup file.
REM
REM DOSONLY
REM By default, you can start any type of application when running
REM COMMAND.COM. If you start an application other than an MS-DOS-based
REM application, any running TSR may be disrupted. To ensure that only
REM MS-DOS-based applications can be started, add the command dosonly to
REM CONFIG.NT or other startup file.
REM
REM EMM
REM You can use EMM command line to configure EMM(Expanded Memory Manager).
REM The syntax is:
REM
REM EMM = [A=AltRegSets] [B=BaseSegment] [RAM]
REM
REM     AltRegSets
REM         specifies the total Alternative Mapping Register Sets you
REM         want the system to support. 1 <= AltRegSets <= 255. The
REM         default value is 8.
REM     BaseSegment
REM         specifies the starting segment address in the Dos conventional
REM         memory you want the system to allocate for EMM page frames.
REM         The value must be given in Hexdecimal.
REM         0x1000 <= BaseSegment <= 0x4000. The value is rounded down to
REM         16KB boundary. The default value is 0x4000
REM     RAM
REM         specifies that the system should only allocate 64Kb address
REM         space from the Upper Memory Block(UMB) area for EMM page frames
REM         and leave the rests(if available) to be used by DOS to support
REM         loadhigh and devicehigh commands. The system, by default, would
REM         allocate all possible and available UMB for page frames.
REM
REM     The EMM size is determined by pif file(either the one associated
REM     with your application or _default.pif). If the size from PIF file
REM     is zero, EMM will be disabled and the EMM line will be ignored.
REM
dos=high, umb
device=%SystemRoot%\system32\himem.sys
files=40

So, I can add "emm=ram" to this to activate EMS.
But just launching a DOS program from Start/Run doesn't do it.
It still needs a PIF, the file C:\Windows\_default.pif references these locations.

Edited by Asp, 23 June 2013 - 09:55 PM.


#10
jaclaz

jaclaz

    The Finder

  • Developer
  • 15,634 posts
  • Joined 23-July 04
  • OS:none specified
  • Country: Country Flag

But just launching a DOS program from Start/Run doesn't do it.
It still needs a PIF, the file C:\Windows\_default.pif references these locations.

Yes and no. :unsure:

Meaning that it depends if command.com is started or cmd.exe is.
By default cmd.exe is started, I am not sure if when a dos app is started directly (like form Start/Run) this also happens.

But if you open a command.com prompt and from it run the DOS app you should need not a .pif

If you prefer, the cmd.exe command processor ignores config.nt and autoexec.nt, whilst the command.com command processor reads them.

More:
http://support.micro...kb/314106/en-us

#11
Asp

Asp

    Member

  • Member
  • PipPip
  • 156 posts
  • Joined 17-April 05
  • OS:XP Pro x86
  • Country: Country Flag

But if you open a command.com prompt and from it run the DOS app you should need not a .pif


I had tried "Run" with both cmd and command, with emm in the default config.nt.
Neither had any EMS (as reported by "mem").


http://support.microsoft.com/kb/314106/en-us

This says:

Right-click the desktop, point to New, and then click Shortcut.
In the Type the location of the item box, type the full path to the file that you want to run, and then click Next.
In the Type a name for this shortcut box, type the name for the shortcut, and then click Finish. This creates a new shortcut on the desktop.
Right-click the new shortcut, and then click Properties.
On the Program tab, click Windows to open a dialog box for the path to the Autoexec and Config files.
Type the full path to the files that you created, and then click OK in both dialog boxes.


This only works if you select a DOS exe, then it creates a pif (which uses the default .nt files) .
If you choose a batch file you get a standard shortcut, with no "program" tab.
You can create a pif to a DOS file and then change the "cmd line" to any other file though, and thus also have the "Memory" tab to set EMS max.

Anyway, all educational, but the PIF is still required if you need EMS.

Edited by Asp, 24 June 2013 - 01:45 AM.


#12
dencorso

dencorso

    Iuvat plus qui nihil obstat

  • Supervisor
  • 5,935 posts
  • Joined 07-April 07
  • OS:98SE
  • Country: Country Flag

Donator

I saw and replied to Jaclaz's post, but you seem to have deleted it.

You asked a mod to split the thread. I went ahead and did it.
You managed to click on "add reply" exactly while the thread was being split... so your reply fell through the "memory hole"... and disappeared in the ether!
It's not your fault nor mine. And probably neither one of us will ever see that happen again, but that's Murphy's Law at its best!!! :P

#13
jaclaz

jaclaz

    The Finder

  • Developer
  • 15,634 posts
  • Joined 23-July 04
  • OS:none specified
  • Country: Country Flag
@Asp
Try doing this:

REM ECHOCONFIG
REM By default, no information is displayed when the MS-DOS environment
REM is initialized. To display CONFIG.NT/AUTOEXEC.NT information, add
REM the command echoconfig to CONFIG.NT or other startup file.


Or more simply.
Go to Start/run and try starting command.com.
In it run:
SET
Go to Start/run and try starting cmd.exe.
In it run:
SET

You will see how the environment variables are different.
As an example I have an old DOS program that I need to run from time to time that (Clipper based) and I have a variable CLIPPER=F253 ONLY when running command.com (and NOT when running cmd.exe), it is possible that EMS behaves differently, but it would be strange.

jaclaz

#14
submix8c

submix8c

    Inconceivable!

  • Patrons
  • 4,548 posts
  • Joined 14-September 05
  • OS:none specified
  • Country: Country Flag
:wacko:
This thread appears to be VERY similar to the Win9x methodology (Pure DOS vs Command Line "DOS"), which is ALSO confusing. DOS games/pgms vs Windows games/pgms requiring some sort of "special" BAT entries (depending on).
:whistle:

Just saying (only SLIGHTLY O/T)...

Edited by submix8c, 24 June 2013 - 08:56 AM.

Someday the tyrants will be unthroned... Jason "Jay" Chasteen; RIP, bro!

Posted Image





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users