Asp Posted June 22, 2013 Posted June 22, 2013 (edited) 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 offlh %SystemRoot%\system32\mscdexnt.exeset BLASTER=A220 I5 D1 P330 T3config.ntdos=high, umbemm=ramdevice=%SystemRoot%\system32\himem.sysfiles=40So 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 June 22, 2013 by Asp
dencorso Posted June 22, 2013 Posted June 22, 2013 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 updateA 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 siteThe 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.
Asp Posted June 22, 2013 Author Posted June 22, 2013 (edited) 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 AreaThere 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 Area16 MB EMS, 64 MB XMS Edited June 22, 2013 by Asp
dencorso Posted June 22, 2013 Posted June 22, 2013 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.
Asp Posted June 23, 2013 Author Posted June 23, 2013 (edited) 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 June 23, 2013 by Asp
jaclaz Posted June 23, 2013 Posted June 23, 2013 (edited) No, XP ignores the config.sys.Sure , but the program produced config.nt and autoexec.nt@AspWHY was config.nt copied as config.sys?You have to somehow provide environment parameters to the NTVDM:http://en.wikipedia.org/wiki/Virtual_DOS_machine running 16 bit apps, don't you?JFYI:http://support.microsoft.com/kb/324767/en-ushttp://home.earthlink.net/~infernosadventures/configuringdosemulation.htmjaclaz Edited June 23, 2013 by jaclaz
Asp Posted June 24, 2013 Author Posted June 24, 2013 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.
dencorso Posted June 24, 2013 Posted June 24, 2013 Done! 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?
Asp Posted June 24, 2013 Author Posted June 24, 2013 (edited) Done! 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? 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:@AspWHY 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.ntREM Windows MS-DOS Startup FileREMREM CONFIG.SYS vs CONFIG.NTREM CONFIG.SYS is not used to initialize the MS-DOS environment.REM CONFIG.NT is used to initialize the MS-DOS environment unless aREM different startup file is specified in an application's PIF.REMREM ECHOCONFIGREM By default, no information is displayed when the MS-DOS environmentREM is initialized. To display CONFIG.NT/AUTOEXEC.NT information, addREM the command echoconfig to CONFIG.NT or other startup file.REMREM NTCMDPROMPTREM When you return to the command prompt from a TSR or while running anREM MS-DOS-based application, Windows runs COMMAND.COM. This allows theREM TSR to remain active. To run CMD.EXE, the Windows command prompt,REM rather than COMMAND.COM, add the command ntcmdprompt to CONFIG.NT orREM other startup file.REMREM DOSONLYREM By default, you can start any type of application when runningREM COMMAND.COM. If you start an application other than an MS-DOS-basedREM application, any running TSR may be disrupted. To ensure that onlyREM MS-DOS-based applications can be started, add the command dosonly toREM CONFIG.NT or other startup file.REMREM EMMREM You can use EMM command line to configure EMM(Expanded Memory Manager).REM The syntax is:REMREM EMM = [A=AltRegSets] [B=BaseSegment] [RAM]REMREM AltRegSetsREM specifies the total Alternative Mapping Register Sets youREM want the system to support. 1 <= AltRegSets <= 255. TheREM default value is 8.REM BaseSegmentREM specifies the starting segment address in the Dos conventionalREM 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 toREM 16KB boundary. The default value is 0x4000REM RAMREM specifies that the system should only allocate 64Kb addressREM space from the Upper Memory Block(UMB) area for EMM page framesREM and leave the rests(if available) to be used by DOS to supportREM loadhigh and devicehigh commands. The system, by default, wouldREM allocate all possible and available UMB for page frames.REMREM The EMM size is determined by pif file(either the one associatedREM with your application or _default.pif). If the size from PIF fileREM is zero, EMM will be disabled and the EMM line will be ignored.REMdos=high, umbdevice=%SystemRoot%\system32\himem.sysfiles=40So, 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 June 24, 2013 by Asp
jaclaz Posted June 24, 2013 Posted June 24, 2013 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. 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 .pifIf you prefer, the cmd.exe command processor ignores config.nt and autoexec.nt, whilst the command.com command processor reads them.More:http://support.microsoft.com/kb/314106/en-us
Asp Posted June 24, 2013 Author Posted June 24, 2013 (edited) But if you open a command.com prompt and from it run the DOS app you should need not a .pifI 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-usThis 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 June 24, 2013 by Asp
dencorso Posted June 24, 2013 Posted June 24, 2013 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!!!
jaclaz Posted June 24, 2013 Posted June 24, 2013 @AspTry doing this:REM ECHOCONFIGREM By default, no information is displayed when the MS-DOS environmentREM is initialized. To display CONFIG.NT/AUTOEXEC.NT information, addREM 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:SETGo to Start/run and try starting cmd.exe.In it run:SETYou 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
submix8c Posted June 24, 2013 Posted June 24, 2013 (edited) 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). Just saying (only SLIGHTLY O/T)... Edited June 24, 2013 by submix8c
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now