Chapter 4. Setting up SoftWindows

This chapter describes how to build a PC to the specification you want, using SoftWindows's emulation of a real PC's memory, disks, and display.

You set up SoftWindows emulation using the functions on the SoftWindows Options menu.

Figure 4-1. SoftWindows Options Menu


Use Memory… to set up the amount of memory you want to use.

Use Disk Drives to specify how the PC hard disk drives are emulated on the workstation.

Use Display… to choose SoftWindows emulation of a PC display adapter.

These functions are described in greater detail on the following pages.

Restarting SoftWindows

You must restart SoftWindows when you change any of the preferences in the Options menu.

The following dialog box is displayed to warn you and give you the option of canceling the change.

Figure 4-2. Warning Dialog Box


Setting up memory

SoftWindows allows you to set the main memory size to between 1 Mbyte and 255 Mbytes. The initial setting is 8 Mbytes, which is the minimum recommended value for running Windows.

Allocating more memory will improve the performance of Windows up to a certain point. However, allocating excessive memory may reduce the performance of your workstation and other Unix programs.

If your application specifies that it needs expanded memory, also referred to as LIM or EMS (Lotus, Intel, Microsoft Expanded Memory Specification), you can allocate some of the memory to expanded memory using the EMM386 expanded memory emulator. For example, to use 2 Kbytes of extended memory as expanded memory include this line in the CONFIG.SYS file:

DEVICE=EMM386.EXE 2048

However, it is recommended that you use extended memory in preference to expanded memory wherever possible.

To specify the PC memory

  1. Choose Memory… from the Options menu.

    The following dialog box shows the amount of memory and allows you to change it:

    Figure 4-3. Memory Dialog Box


  2. Select the amount of memory by dragging the slider until the value you want is shown above the slider.

  3. Choose OK to restart SoftWindows with the memory configuration you have selected.

The upper limit of the Memory dialog box can be set to any value up to 255 Mbytes. By default, the Memory dialog box only goes up to 32 Mbytes. To make this number higher, modify your system defaults. To do this, edit the MEMORY_EXTENDED_MAX_SIZE field in “sys.swinconfig” under /usr/lib/SoftWindows2. This field will say “32”. Type in a number greater than 32, but less than 255.

Setting up drives

PCs identify the different types of disk drives using the drive letters A: to Z:.

The following table shows the significance of the different drive letters and how they are set up when you first install SoftWindows.

You use the Open Drive… function on the Disk Drives cascade menu on the Options menu to set up the floppy disk drives A: and B:, the hard disk drives C: and D:, the FSA drives E: to Z:, and the CD–ROM drive F:.

Figure 4-4. Disk Drives Menu


Table 4-1. Drive Letters Setup

Drive

Default

Description

A:

Empty

The floppy disk drive

B:

Empty

Additional floppy disk drive

C:

WIN311-username.hdf

The start-up, or boot, hard disk drive

D:

Empty

Additional hard disk drive

E:

$HOME

Your Unix home directory

F:

/CDROM

FSA access to the CD–ROM drive

G:

$SWIN2HOME/windows

Windows shared Installation files

H:

$HOME

Your Unix home directory

K:

/floppy

FSA access to the floptical drive


Setting up hard disk files

SoftWindows emulates PC hard disks using single files in the Unix file system with the extension “.hdf”. The individual MS–DOS files within SoftWindows hard disk files are accessible only from within SoftWindows and cannot be listed using Unix commands.

SoftWindows hard disk files can be attached to and detached from either of the PC drives C: and D: without affecting the information stored within the hard disk file.

SoftWindows will always use drive C: to start up unless a floppy disk is in an attached A: disk drive. You must therefore always have a bootable SoftWindows hard disk file attached to drive C:. This must include the MS–DOS start-up files which are installed when the hard disk file is created.

To create a new D: drive

  1. First ensure that you have enough hard disk space for the file you are creating. You can use the Unix “df” command to check this.

  2. Choose New Drive… from the Disk Drives cascade menu on the Options menu.

    This dialog box appears:

    Figure 4-5. Disk Drives Menu


  3. Enter a name for the new hard disk file. It is recommended you give this a “.hdf” extension.

  4. Choose the size by dragging the slider until the size you want is shown above the slider.

  5. Choose OK to create the hard disk file you have specified.

If you choose the “DOS and Windows installed” option in the “New Hard Disk” dialog box, then SoftWindows formats the drive and installs the MS–DOS and Insignia utility files you will need if you want to use the drive as a boot drive on C:.

It also installs the files needed to run Windows in a network configuration. For further information about configuring Windows, and details of how to install a standard Windows configuration, refer to Chapter 5, “Windows configuration”.


Note: If you intend to install a standard Windows configuration on your new drive you should ensure that the hard disk size is at least 80 Mbytes.

SoftWindows will then be restarted with the new hard disk file set up as drive D:.

To create a new C: drive

  1. Follow the procedure for creating a new D: drive; refer to “To create a new D: drive.”

  2. When the D: drive has been created choose Open Drive… from the Disk Drives cascade menu on the Options menu.

  3. Remove the Hard Disk Drive C: File Name… entry and replace it with the Hard Disk Drive D: File Name… entry.

  4. Remove the Hard Disk Drive D: File Name… entry.

To choose the hard disk file for C: or D:

  1. Choose Open Drive… from the Disk Drives cascade menu on the Options menu.

    The following dialog box shows the hard disk files assigned to drives C: and D:.

    Figure 4-6. Open Disk Drives Menu


  2. Type the name you require in the Hard Disk Drive C: File Name… or Hard Disk Drive D: File Name… text box.

  • Alternatively, click Hard Disk Drive C: File Name… or Hard Disk Drive D: File Name… to change the hard disk file used for drive C: or D:, respectively.

The following dialog box lets you select the hard disk file to use:

Figure 4-7. Drive File Name Selection


  1. Choose the name of the file you want to use and click OK to restart SoftWindows with the drive configuration you have specified.

To remove the hard disk file from D:

  1. Choose Open Drive… from the Disk Drives cascade menu on the Options menu to show the hard disk files attached to C: and D:.

  2. Delete the name of the hard disk file in the Hard Disk Drive D: File Name… text box.

    Figure 4-8. Open Disk Drives Menu


  3. Click OK to restart SoftWindows with the drive configuration you have specified.

  4. To permanently remove the hard disk file for D:, use the Unix “rm” command.

To increase the size of the C: drive

The following instructions explain how to increase the size of an existing C: drive by creating a new hard disk file, and then copying your files to the new drive.


Note: You must have sufficient space on your Unix file system for this to work. These instructions assume you are using the default hard disk file and you are running as root (or as a user with write permission to $SWIN2HOME).


  1. Start SoftWindows in the usual way.

  2. Choose New Drive from the Disk Drives cascade menu on the Options menu, and specify the name of the drive as:

    $SWIN2HOME/new.hdf
    

  3. Use the slider bar to set the size for the new hard disk file.

    Make the file as large as you want the new C: drive to be.

  4. Choose OK to create the hard disk file, and restart SoftWindows.

  5. At the C:\> prompt, type the following command:

    attrib -r d:\command.com
    

  6. This removes the read-only flag from the file command.com to allow you to replace it in the next step.

  7. At the C:\> prompt, type the following command:

    xcopy C:\ D:\ /s /e
    

    This copies all the files from your original C: drive to the new D: drive.

    If you get a line similar to:

    Overwrite D:AUTOEXEC.BAT (Yes/No/All)?
    

    enter A.

  8. Choose Open Drive from the Disk Drives cascade menu on the Options menu, and remove $SWIN2HOME/new.hdf from the Hard Disk Drive D: File Name text box.

    This will restart SoftWindows.

  9. Choose Exit from the SoftWindows File menu.

  10. Rename the original C: drive file and move the new larger C: drive file into its place, by typing the following commands at the Unix prompt:

    cd $SWIN2HOME
    mv WIN311-username.hdf WIN311-username.hdf.old
    mv new.hdf WIN311-username.hdf
    

  11. Restart SoftWindows again.

  12. Once you have successfully booted from your new larger C: drive, you may wish to remove the file WIN311-username.hdf.old.

Setting up FSA drives

SoftWindows allows you to share files between MS-DOS and Unix by setting up selected Unix directories as MS-DOS drives. The drives are set up using the MS-DOS File Sharing Architecture, and are referred to as FSA drives.

You can set up FSA drives using the Open Disk Drives dialog box.

Alternatively, you can set up FSA drives using the MS-DOS NET USE command.

Drive letters

The number of drives available is determined by the value of LASTDRIVE in the CONFIG.SYS file. The default setting, LASTDRIVE=K, makes drives up to K: available.

The FSADRIVE command specifies which drives you want to use as FSA drives. By default drives E:, G:, and H: are made available as FSA drives. If you need additional shared folders, you should increase the value of LASTDRIVE. To do this, edit the LASTDRIVE value in the CONFIG.SYS file. Reboot after you've changed, saved, and closed the file.

To view the Unix directories set up as FSA drives

There are two ways to list, or view Unix directories attached to drives.

  • Use the Open Disk Drives dialog box from the SoftWindows Options menu.

  • Type NET USE in at the MS-DOS prompt.

Details follow:

Using the Open Disk Drives dialog box to view FSA drives

  1. Choose Open Drive… from the Disk Drives cascade menu on the Options menu.

    The Open Disk Drives dialog box shows the Unix directory assigned to the first available FSA drive, drive E:.

  2. Click the up-arrow or down-arrow to step through the available FSA drives:

    Figure 4-9. Open Disk Drives Menu


In each case the text box shows the directory assigned to the selected drive.

Using NET USE to list FSA drives

  • Type the following command at the C:\> prompt:

NET USE

This will list the PC drive letter of each FSA drive, and the pathname of the directory to which it has been attached. If the command is given with a drive letter, it will show the current selection for that drive.

The not sharing message indicates that the drive does not support MS-DOS file sharing and locking because the underlying Unix file system does not support it.

To change the Unix directory assigned to an FSA drive

  1. Click the up-arrow or down-arrow to select the FSA drive you want to change.

  2. Type the directory you want to use into the text box, or click Directory Name….

    This dialog box allows you to select the Unix directory to use as the FSA drive:

    Figure 4-10. FSA Directory Selection Menu


  3. Locate the directory you want to use and choose OK.

  4. Choose OK to exit from the Open Disk Drives dialog box with the drive configuration you have specified.

To set up Unix directories as FSA drives using NET USE

  • Type the following command at the C:\> prompt:

    NET USE X: dir
    

where X: is the letter of the PC drive you want to assign to the Unix directory, and dir is the full Unix pathname of the directory (using / characters as separators).

For example, to assign J: to the directory dos in your home Unix directory, give the command:

NET USE J: $HOME/dos 

The drive can be any letter from E: to Z: (subject to the setting of LASTDRIVE), drives A: to D: being predefined by MS–DOS. The CONFIG.SYS file on the hard disk supplied with SoftWindows sets LASTDRIVE to K.

When the NET USE command is used to configure an FSA drive, the new configuration is immediately reflected in the Open Disk Drives dialog box, and will be saved permanently if the configuration is saved upon exiting from SoftWindows.

If you set up a hard disk with more than one MS–DOS FAT partition, and assign the first partition as drive D:, MS–DOS will use drive E: for the second partition, drive F: for the third, and so on. In this case you need to use subsequent letters for any FSA drives you set up.

To remove a Unix directory from a drive

  • Type the following command at the C:\> prompt:

    NET USE X: /D 
    

Where X: is the letter of the PC drive you want to remove.

To set up a temporary FSA drive

If you want to use the NET USE command to temporarily assign an FSA drive while you run your program, you can deassign the FSA drive when the program has run.

For example, to configure an FSA drive only while running the program MY_PROG.EXE, you could use a batch file containing the following lines:

REM Drive I: is originally unassigned
NET USE I: $HOME/my_data
MY_PROG.EXE
NET USE I: /D

To list the Unix directories attached to drives

  1. Type the following command at the C:\> prompt:

    NET USE
    

This will list the PC drive letter of each FSA drive, and the pathname of the directory to which it has been attached. If the command is given with a drive letter, it will show the current selection for that drive.

The not sharing message indicates that the drive does not support MS-DOS file sharing and locking because the underlying Unix file system does not support it.

Filename mapping

File naming and directory naming conventions used in Unix are different from those used in MS–DOS.

In MS-DOS, filenames consist of a name of up to eight characters, followed by an optional extension of up to three characters separated from the name by a dot (period). This is referred to as 8.3 format.

MS-DOS filenames are not case-sensitive, so upper and lower case letters are treated as equivalent. You may enter filenames in either upper case or lower case, or a mixture of the two, and MS-DOS applications may display filenames in either upper case or lower case.

In Unix, the maximum length allowed for filenames depends on the Unix file system. It will generally be at least 14 characters, and is usually much longer. In addition, filenames are case-sensitive; for example, My_File and my_file refer to different files.

Because of these differences, SoftWindows maps Unix filenames, accessed using an FSA drive, to filenames that are valid to MS-DOS. The mapping takes place as follows:

  • If the filename is in lower case and can be represented in 8.3 format, it is not mapped.

  • If the name is in upper case and there is no corresponding name in lower case, it is left unchanged.

  • Otherwise the name is mapped using the first eight characters of the Unix filename, followed by an extension of three letters to ensure that the name is unique.

The following table shows some examples of Unix filenames and the corresponding filenames in MS-DOS:

Table 4-2. Examples of Unix Filenames

Unix filename

MS-DOS filename

faxdoc18.asc

FAXDOC18.ASC

INFILE

INFILE

OutFile

OUTFILE.4$V

test_results

TEST_RES.IOL

test_results2

TEST_RES.D#1



Note: When a new file is created in MS-DOS, it is created in the Unix file system with a lower case name.


FSA performance considerations

For Unix directories which are used frequently for FSA access, maximum performance will be achieved if you use only lower case filenames limited to an 8.3 format.

If you prefer to use Unix filenames which are in upper case, or the files are actually stored on a non-Unix filesystem, you should consider using one of the optional parameters to the NET USE command; refer to Chapter 11, “NET USE”.

Setting up floppy disk drives

You can set up SoftWindows to use the internal or external 3.5-inch floppy disk drives on your workstation as the PC drives A: and/or B: to work with MS–DOS format 3.5-inch floppy disks.

To set up the floppy disk drives A: and B:

  1. Choose Open Drive… from the Disk Drives cascade menu on the Options menu.

    This dialog box shows the devices assigned to the floppy disk drives A: and B:.

    Figure 4-11. Open Disk Drives Menu


  2. Type the floppy disk drive device name into the appropriate text box labeled Floppy Drive A: Device File Name or Floppy Drive B: Device File Name.

    The table below shows the floppy disk drive device names to use.

    Table 4-3. To Assign a Floppy Disk Drive

    Device name

    Example

    Indigo (top slot):

    /dev/rdsk/fds0d3.3.5hi

    Indigo (middle slot):

    /dev/rdsk/fds0d2.3.5hi

    Indy:

    /dev/rdsk/fds0d2.3.5hi

    Indigo2:

    /dev/rdsk/fds0d2.3.5hi

    In the above table, the Device Name fds0d2.3.5hi, the 0 is the SCSI controller number and the 2 is the SCSI

  3. Choose OK to reset SoftWindows with the drive configuration you have specified.

To deassign a floppy disk drive

  • Delete the device name from the text box labeled Floppy Drive A: Device File Name or Floppy Drive B: Device File Name, as appropriate.

Setting up the CD-ROM

SoftWindows allows you to read CD–ROMs which are compatible with the Microsoft CD–ROM Extensions (MSCDEX) as MS–DOS drives.

The CD–ROMs can be read by MS–DOS commands, if appropriate, or by executing the relevant application programs (which are often on the CD–ROM itself).

To set up the CD–ROM drive

  1. Choose Open Drive… from the Disk Drives cascade menu on the Options menu.

    The Open Disk Drives dialog box shows the device assigned to the CD–ROM drive.

  2. Type the CD–ROM drive device name into the CD–ROM Device File Name text box.

    Figure 4-12. Open Disk Drives Menu


To list your CD-ROM device file name, open a Unix Shell and type

hinv|grep CDROM

For example,

gump 2% hinv|grep CDROM
CDROM: unit 4 on SCSI controller 0

In this example, 4 is the unit number that follows the “d” in the device file name, and 0 is the SCSI controller number that follows the “s”. So, the CD-ROM Drive Device File Name in this example is “/dev/rdsk/dks0d4vol.”

To use the CD–ROM with SoftWindows refer to the SoftWindows 2.0 for Unix User's Guide.

MS–DOS configuration

USECD executes the following command to assign the CD–ROM to drive F:.

MSCDEX /D:CDROM$$$ /L:F

To use the USECD command:

  1. Quit other media applications, such as CDman and cdplayer.

  2. At the MS-DOS prompt, type

    NET USE F: /D
    

    to make the F: drive available for the CD-ROM.

  3. Kill mediad, or remove the CD-ROM from the mediad scan list. See Chapter 4, “To access the CD-ROM by disabling mediad” in the SoftWindows for Unix User Guide.

  4. Type USECD at the MS-DOS prompt.

MSCDEX options

The MSCDEX command can accept the following parameters:

Table 4-4. MSCDEX Command Parameters

Parameter

Function

/D: device

Specifies the device driver to be used. For SoftWindows this is CDROM$$$.

/M: buffers

Sets the number of buffers. This should be at least 5, but a larger value (such as 20) will improve performance.

/E:

Uses expanded memory if it is installed and available.

/V:

Displays additional information about memory usage during initialization.

/L: drive

Assigns the drive to the specified drive letter rather than the next available.


Setting up the display

SoftWindows provides emulation of the standard Super VGA display adapter.

It also emulates the Hercules display adapter type, which is the recommended option if you have a monochrome display.

To specify the display adapter

  1. Choose Display… from the Options menu.

    This dialog box shows the display adapter currently selected:

    Figure 4-13. Display Adapter Menu


  2. Choose the Display Adapter Type you want to use by clicking the appropriate button.

To specify the number of colors for Windows

  • Choose 16 or 256 in the Display dialog box.

Selecting 16 leaves more colors free for use by your other applications. If only 16 colors are available, the 256 option will be grayed out.


Note: With 256 colors selected you may experience color flashing when moving between SoftWindows and Unix due to palette limitations.


To specify when to resize the Windows desktop

  1. Choose Always if you want to be prompted to resize the Windows desktop each time you run Windows.

  2. Choose Next to be prompted once, the next time you run Windows; the option will automatically change to Never once you have resized the desktop.

  3. Choose OK to reset SoftWindows with the display settings you have chosen.

Setting up keyboards

When you install SoftWindows the installation procedure automatically sets up MS–DOS for the keyboard type you specify. You will only need to change the configuration if you are changing the type of keyboard you are using or want to use the same copy of SoftWindows on workstations with different keyboards.

Some MS–DOS programs, such as Windows, look at the PC hardware directly rather than at the MS–DOS settings and will ignore the keyboard assignment.

To configure SoftWindows for a different keyboard

  1. Add the appropriate KEYB command, as shown in the tables on the following pages, to the AUTOEXEC.BAT file.

    For French and German keyboard types it is recommended that you also set up SoftWindows to use codepage 850 so that all the characters on these keyboards are displayed correctly. Refer to the “Microsoft MS–DOS User's Guide and Reference” (not supplied) for details.

  2. Choose Keyboard… from the Options menu. This dialog box appears:

    Figure 4-14. Keyboard Options Menu


  3. Select the appropriate keyboard mapping file, as shown in the tables on the following pages.

The Unix keyboard mapping files are provided in $SWIN2HOME/keyboard.

To set up a keyboard for Windows

  1. Type the following commands at the MS–DOS C:\> prompt:

    G: 
    CD \ 
    SETUP 
    

  2. Select Keyboard layout and choose the keyboard layout you want to use.

  3. Select Keyboard type and choose the keyboard type you want to use.

  4. Select Complete changes and press Enter to confirm the changes you have made.

Keyboard configuration

Table 4-5. Keyboard Configuration Table SGI

Keyboard type file

KEYB command

Keyboard mapping

SGI FR

KEYB FR,850,C:\DOS\KEYBOARD.SYS

SG.kbd

SGI GR

KEYB GR,850,C:\DOS\KEYBOARD.SYS

SG.kbd

SGI UK

KEYB UK,850,C:\DOS\KEYBOARD.SYS

SG.kbd

SGI US

SG.kbd

SGI FR INDY

KEYB FR,850,C:\DOS\KEYBOARD.SYS

SGINDYfr.kbd

SGI GR INDY

KEYB GR,850,C:\DOS\KEYBOARD.SYS

SGINDYgr.kbd

SGI UK INDY

KEYB UK,850,C:\DOS\KEYBOARD.SYS

SGINDYuk.kbd

SGI US INDY

SGINDYus.kbd


MS-DOS configuration

The AUTOEXEC.BAT and CONFIG.SYS files determine the configuration of MS-DOS in SoftWindows.

AUTOEXEC.BAT

The following listing shows the AUTOEXEC.BAT file:

@Echo Off
Prompt $p$g
C:\INSIGNIAƒSADrive
Path C:\WINDOWS;C:\Insignia;C:\;G:\;C: OS
C:\INSIGNIA\Mouse
REM  Remove the following REM to enable DOS application licencing
REM  C:\INSIGNIA OSLIC.EXE
Mode COM1:9600,n,8,1
Ver
Set TEMP=C: OS
C: OS\NLSFUNC
MODE CON CP PREP=((437 850)C: OS\EGA.CPI)

CHCP 437
C:\INSIGNIA EVLOD C:\INSIGNIA\CDROM.SYS
IF EXIST G:\SWDOCK.BAT CALL G:\SWDOCK.BAT
Echo Type WIN and press ENTER to start Windows.

CONFIG.SYS

The following listing shows the CONFIG.SYS file:

DEVICE=C:\DOS\SETVER.EXE
rem DEVICE=C:\DOS\HIMEM.SYS /TESTMEM:OFF
DEVICE=C:\DOS\HIMEM.SYS
DOS=HIGH
FILES=30
DEVICE=C:\INSIGNIA\HOST.SYS
LASTDRIVE=K
BUFFERS=15
STACKS=9,256
FCBS=20,20

DEVICE=C:\DOS\DISPLAY.SYS CON=(EGA,437,4)