[Main | NexGen]

NexGen Utilities: DOS CPU Identifier, Windows CPU Identifier, Game Assistant, and Flash Update

The (re-)sources of these tools and instructions how to build them can be found at the end of this page.

The PCI Troubleshooting Guide also contains info on these utilities.

DOS CPU Identifier

This utility just executes the NXOP function 0Eh, subfunctions 03h and 04h. IDON uses subfunction 03h to enable EFL.AC toggle and enable alternate instructions (i.e. emulation of some user-mode 80486 instructions). IDOFF uses subfunction 04h to disable EFL.AC toggle and disable alternate instructions. The flag EFL.AC is "Alignment Check" and is only writeable since the 80486, and Intel officially described this for detection of the 80486.

Note: Setting "Alternate instructions" to "ON" in the BIOS is not equivalent to running IDON. The BIOS setting just enables alternate instructions but does not enable EFL.AC toggle!


Windows CPU Identifier

This utility does the same as DOS CPU Identifier. In addition, it hooks the Win16 API function GetWinFlags() where it sets the WF_CPU486 flag, thereby signalling programs they run on an 80486 class CPU.


Game Assistant

The utility "Game Assistant" was described as: "minor conflict with implementing DOS extenders".

This utility runs only on VLB systems and just executes the NXOP function 0Eh, subfunction 05h. In register CL it hands over the value 1 for EXTON and 0 for EXTOFF. This switches on/off the emulation of the MOV reg/mem to/from segreg opcode.


Flash Update

There is a separate Flash Update utility for each motherboard type (VLB or PCI). And there have been several versions of both. As they have quite some code in common, they are all handled here in one package.


Build the utilities from source

Download this ZIP archive (76 KiB). It contains the assembler and C sources plus a makefile and a batch file for each tool. If you set some environment variables containing paths to the assembler/compiler you can use the batch file directly without modification, otherwise you have to adapt the batch file according to your setup locations. It also contains the original binary file, and the makefile contains commands to compare the build result with the original file(s). The batch file gen.bat is used this way: gen generates the utility for all known versions and compares the result against the original binary files. gen clean removes all generated files.

The version numbers of the assembler and compiler given in the following are the ones that I use. It may be that other versions also work, but I haven't tried them.

The DOS CPU Identifier (IDONOFF), the Game Assistant (EXTONOFF) and the Flash Update programs (Flash) all need Microsoft Macro Assembler 6.11c, which is included with the Windows 95 and NT 3.5 DDKs available here. The environment variable to set is MASM611C_DIR, and it should point to the base directory (where the subdirectories "bin", "binr" and so on are).

The Windows CPU Identifier (WINID20) needs the PROCHOOK package, which was once published on the "Microsoft Software Library". A copy is available here. Just unpack the content of this into the subdirectory PROCHOOK. For building, the Microsoft Visual C++ V1.5 is needed, which is available here or here. The environment variable to set is MSVC15_DIR, and it should also point to the base directory.

In addition, you should set environment variable DPATH to the default path, i.e. the value that the PATH variable has before any batch is manipulating it. This is used in my batch files to clean up the path at the end.


Environment

In a 16 or 32 bit Windows environment, you can do the installation of the assembler/compiler and the build operation in a console window ("DOS box"). On a 64 bit Windows, or on Linux or MAC OS, you have to use either a virtual machine running DOS or an old 16 / 32 bit Windows, or you have to use DOSbox. The latter embeds more nicely into the file system, but setting it up is a bit of work:

Get it here and install it. Then go (on Windows) to C:\Users\<user>\AppData\Local\DOSBox and copy the *.conf file to a suitable place, and maybe name it nx.conf. Now edit the configuration file. In section [cpu], set "cycles=max" because we do not want delays. In the [autoexec] section, enter lines like this (you have to adapt the paths to your situation):

VER set 6 20
MOUNT C D:\Projects
C:
set CC=C:\CC
set PATH=%CC%;%PATH%
set DPATH=%PATH%

set TASM50_DIR=%CC%\TASM5
set MASM611C_DIR=%CC%\Masm6.11c
set MSVC15_DIR=%CC%\MSVC15
cd NexGen

Now create a NexGen-specific link to DOSbox using our newly created configuration file:

"C:\Program Files (x86)\DOSBox-0.74-3\DOSBox.exe" -noconsole -conf "D:\Projects\CC\nx.conf"

We're almost done. DOSbox itself knows some commands like "copy" and "del", but not the full set. My makefile needs "fc.exe" for file comparison and "deltree.exe" for cleaning up, and both are not available in DOSbox. So we pick these tools from MSDOS 6.20 available here. Unzip expand.exe, deltree.ex_ and fc.ex_ and then use expand.exe to expand deltree.ex_ to deltree.exe and fc.ex_ to fc.exe. Put these somewhere where the PATH in DOSbox finds it. The line "VER set 6 20" in the DOSbox configuration is especially for these tools, because otherwise they don't feel comfortable.

Phew! That's it!


Author: Herbert Oppmann (email adress) updated: 2022-11-13