Replaying a typical dos game in xp

Source: Internet
Author: User
Tags xms
Token provides support for all types of programs in the system, including 32-bit and 16-bit! The correct 16-bit DOS command window is provided by command.exe. In WinXP, the file is located in the System Disk \ Windows \ hosts process to provide support for DOS Virtual machines (NT Virtual DOS Machine (NTVDM) under NT ). Therefore, we can say that Win × P has completely escaped the 16-bit DOS dependency. The so-called DOS program running environment on this system is just a completely virtual PC! It is important to understand this, because it indicates that this virtual "PC" has nothing to do with your real hardware. All hardware environments are virtualized, so they can achieve better compatibility.

How does a virtual machine imitate the Startup Process of a real DOS system? All users familiar with DOS will be familiar with Config. sys and Autoexec. bat files are so excited and painful-they are very important to system configuration. When starting DOS, they will first press Config. sys configure the driver and then execute Autoexec. bat commands. Can I find them in NTVDM? Since it is "real virtual", of course, there should be: they are located under Windows \ system32 by default, but their names have been slightly changed, namely Config. nt. And Autoexec. nt. You can use NotePad to open these two files for editing, but it is best to back up the files before editing to prevent accidents.

After understanding this, we can start to try to solve the actual problem.

Memory problems

The reason why most old games cannot run properly is that the memory is "not enough". Users who haven't come from the DOS era will doubt the word "not enough". In fact, it is not enough. DOS has a unique memory usage solution. This solution is actually complicated, but it is crucial to solve the problem. However, we do not need to understand it here. If special memory management tools are not loaded, DOS can only recognize 1 MB of Memory at most, and KB of Memory will be retained for use such as the system, hard disk controller, and video Memory. It is called the Upper Memory (Upper Memory Block, UMB (short for UMB), the remaining 640KB is called the Conventional Memory. These 640kB are not all empty, and will be occupied after the system is started, in this way, the general program can only use the remaining (Free) part of the regular memory. understanding this is very important.

However, the Memory size provided by virtual machines absolutely exceeds 1 MB. This part is called extended Memory. Because it must follow extend Memory Standard, it is referred to as XMS, to use XMS, it must be in Config, sys (now Config. nt) Load Himem. sys driver. Of course, the bottom layer of the extended memory is close to the 1 MB mentioned just now, with a capacity of nearly 64 KB. DOS can be accessed without the XMS standard, this Memory Area is called the High Memory Area, where DOS often resident a portion of its Memory in this Area (MS-DOS resident in High Memory Area ), to free up the regular memory as much as possible for the application.

The last concept of Memory expansion EMS (abbreviated as Expanded Memory Standard) is very important but difficult to understand. In short, it is the CPU executor! CPU "looks like" It is in UMB (within 1 MB, can be used freely), but in fact it is part or whole of XMS in XMS, in this way, the program can effectively use extended memory other than 1 MB. However, to enable the CPU to identify the extended memory, you must go to Autoexec. bat (now Autoexec. EMM (Expanded Memory Manager) is loaded in nt, and emm1_exe is generally used in DOS. It should be noted that, because EMS occupies XMS space, the Available (Available) part of XMS will be reduced. The old DOS is a very free system. running the game on it allows you to decide whether to use EMS or even how many EMS you want. Otherwise, you will ...... Hey, strike.

From the above point of view, there are two pieces of memory closely related to our topic: Regular memory and extended memory. These two also happen to be the "killer" of countless DOS running in the new system ", fortunately, we now know that we are ready to fight. The following instances are available in WinXP Pro SP1.

Correctly configure the extended memory EMS

Instance 1 Zhongguancun revelation

There is a Play. bat under the game installation directory h \ dosgame \ ZGC

You can double-click the batch processing file to execute it. However, the result of this execution is a flash in the black window-but how can such a famous game be easily put aside, you must find out exactly what it is. So in Play. right-click the corresponding bat icon and select "edit". The system will call notepad to open the file. Two commands are displayed: runqbj and go, which correspond to Ruqbj.com and Go under the same directory respectively. bat, apparently Go. bat is still a batch processing file. After opening it in notepad, it finds three other commands: univbe, game, And univbe/u, which correspond to two executable files: univbe.exeand game.exe. To locate the cause, run the runqbj, univbe, and game commands one by one.

In the "Start" → "run" dialog box, enter "command" and press Enter. In the "Command" window that opens, change the directory to the game installation directory, and enter three lines of commands one by one, after the Univbe command is executed, the system prompts that the supported video card cannot be found, so ignore it temporarily. After the last command Game is executed, a line of words is displayed on the screen: EMS memory

Manager not found (EMS memory manager cannot be found ). Is it because the NTVDM of WinXP does not load EMM by default? This is exactly the case. In the Config. in the description of EMS in the nt file, we found that the size of EMS is determined by the Pif file. This Pif file is either a shortcut of the DOS program, either the default value is _ default in the Windows directory of the system disk. pif. If EMS is set to "O" in the Pif File Settings, EMM will not load.

Everyone is familiar with Pif files and their icons. Since the Win3X era, in order to provide custom memory configurations for DOS programs on the Windows interface, microsoft has designed a concept of "Pif". It seems that this Pif is only a shortcut of the original program. In fact, you can perform a lot of custom settings in it. Because no Pif file is found in the game installation directory, double-clicking the file will call the settings in _ default. pif. So we found _ default, pif, and right-click it and select "properties" in the pop-up menu. In the displayed dialog box, click the "Memory" tab card, the EMS was suddenly set to "NONE" | the "Zhongguancun revelation" operation requires EMS support, which of course will cause errors. The Command and com just run comply with this principle, and the memory pages of the attribute dialog box are identical.

You must have thought of the solution. Since WinXP cannot configure the memory for the bat file, you can:

1. Modify the memory configuration in the _ default. pif attribute: 2. Modify the memory configuration of Command.com and run Play. bat in its window. But modify _ default. the pif file is obviously not available because it will be the default Pif configuration file for all DOS programs. Some programs do not need EMS, and some cannot even run as long as there is EMS. Then we try to set the EMS and XMS items in the Command.com memory configuration to "automatic", run the Command window again, locate the installation directory and enter the "Play" Command, after you press enter, you are pleasantly surprised to see the Starting Screen of the game.

So what is automatic? Enter the Command window again □and execute the Command line "mem". This Command can be used to view the current Memory Allocation and usage, by default, the original "automatic" function is allocated with 4 mb EMS and 19 MB XMS (only 15 MB is available ). By the way, the 1st rows shown above are the general memory of 3rd kb. The rows are very important, indicating the remaining space of the general memory after NTVDM is started, of course, that is, the maximum executable program size (Largest executable progaram size ).

When (metadata is not a batchfile volume, right-click the file icon in runqbj.exe and choose "properties" to set the Memory Page and EMS and XMS to automatic (of course, it can also be set to a value greater than 4 MB ), after confirmation, Runqbj is generated in the current directory. double-click Play. bat can smoothly enter the stream play.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.