SUNPC(1) — USER COMMANDS
NAME
sunpc − OpenWindows application to run MS-DOS applications
SYNOPSIS
sunpc [ −h ] [ −a ] [ −n ] [ −p properties_file ] [ −f ] [ −demo ] [ −Oc disk_file ] [ −Od disk_file ] [ −c command ]
AVAILABILITY
Available on Sun desktop SPARC systems running SunOS 4.1.x and OpenWindows 3.0 or greater.
DESCRIPTION
SunPC allows you to run MS-DOS applications in a window on your Sun desktop workstation. SunPC looks and acts like an IBM PC-AT or compatible 80286-based computer running MS-DOS 4.01. With the addition of the optional SunPC Accelerator 80486 SBus card, SunPC emulates an 80486-based PC. The Sun workstation’s keyboard, mouse, and display are used by SunPC to emulate their PC counterparts. SunPC software is ideal for running most MS-DOS applications that require 12 mhz 80286 PC performance. The SunPC Accelerator is ideal for applications that can take advantage of greater CPU or graphics horsepower, such as Microsoft Windows. In addition to running MS-DOS applications, SunPC also provides integration of these applications with the Sun environment. For example, you can copy and paste text between MS-DOS and SunOS windows as well as share network resources, such as file systems, printers, and SunCD drives. SunPC supports VGA, Video 7 SuperVGA, and Hercules video modes. VGA video is not supported on monochrome systems. CGA and EGA emulation are available as fully functional subsets of VGA emulation. Shrinking or expanding the window will not change the contents to accommodate the new size because the window size is determined by the video mode in being used. The SunPC window will automatically adjust to the correct size according to what video mode the MS-DOS application is using. SunPC provides 1 megabyte of main PC memory plus up to 16 megabytes of extended memory. Expanded memory can also be configured, using the provided expanded memory driver. Because SunPC software emulates a 80286 CPU, it can run applications which require 80286 protected mode or extended memory. The SunPC Accelerator provides 80386/80486 protected mode. Multiple SunPC windows can be run to the extent that sufficient swap space is available but the SunPC Accelerator card can be used by only one window at a time.
USAGE
Edit
The edit menu button allows the user to ‘Copy’, ‘Paste’, or ‘Copy then Paste’ text between SunPC and SunOS windows. Copying of text in a SunPC window is only supported while in text mode emulation.
Devices
The devices menu button allows the user control over: Mouse Emulation
The ‘Attach Mouse’, ‘Detach Mouse’ toggle menu item allows you to control whether the mouse operates like a Microsoft or compatible mouse or in the normal OpenWindows fashion. The keyboard accelerator, Meta+m where both the ‘Meta’ key and the ‘m’ key are pressed simultaneously may also be used to control the mouse operational mode. (Check SunPC User’s Guide for instructions on enabling Microsoft mouse driver software. The mouse driver is enabled be default). When the mouse is operating like a Microsoft or compatible mouse, the right footer area of the SunPC window will contain the status message ‘Mouse’.
Serial Communications Emulation
‘Attach COM1’, ‘Detach COM1’ and, ‘Attach COM2’, ‘Detach COM2’ toggle menu items control whether the specified IBM-PC COM port is attached for use by MS-DOS applications, or detached and unavailable for MS-DOS applications. An attached COM port may not be used by another SunPC window or SunOS application. The COM port attach state is indicated in the right footer area by the status messages ‘COM1:’ or ‘COM2:’ when the IBM-PC COM port is attached and available for use by MS-DOS applications. The IBM-PC COM port output is directed to a SunOS device such as one of your two external serial ports. The SunPC COM port output assignment is controlled via the ‘Com Ports’ Properties form.
Sending of Print Jobs
The ‘Send to LPT’ menu item allows you to manually send queued print jobs to the print spooler for one or more of the MS-DOS parallel printer ports ‘LPT1’, ‘LPT2’ or, ‘LPT3’. Normally the MS-DOS printer output is automatically sent to the assigned SunOS output device after the port has been inactive for a specified length of time. The MS-DOS printer output is directed to either a SunOS file or a suitable SunOS network printer program. The SunPC printer output assignment and automatic queued printer send interval is controlled via the ‘LPT Printer Ports’ properties form.
Diskette Drive Eject
The ‘Eject A:’ option allows you to eject the contents of the internal diskette drive while the drive is attached to that SunPC window. While SunPC has the internal diskette drive attached, the drive cannot be ejected using the normal SunOS eject(1) command. You must use the SunPC eject features. External SCSI diskette drives must be manually ejected.
CPU Control
The ‘Pause’ and ‘Run’ toggle menu item allows you to either ‘Pause’ the emulated IBM-PC session, reducing your system load, or to ‘Run’ the emulated IBM-PC session. Normally the SunPC window will automatically pause the emulated IBM-PC session when there is no useful work being done. This is referred to as ‘Auto Pause’. When the emulation is manually put into the paused state the left window footer indicates this state with the ‘Paused ...’ status message. You can control whether ‘Auto Pause’ is on or off via the ‘Miscellaneous’ properties form. Typing into the SunPC window or selecting ‘Run’ or selecting ‘Reboot’ will automatically bring the window back into the running state.
Reboot
‘Reboot’ allows you to perform a cold reboot of the IBM PC-AT emulation. ‘Reboot’ is equivalent to restarting the window or power cycling an IBM PC/AT. A warm restart of the SunPC window can be accomplished by pressing the CONTROL, ALT, and DEL keys simultaneously.
Properties
The ‘Properties’ menu button allows the user access to all of the SunPC configuration items. Each property form allows the user to view, edit and apply changes in configuration information. All non-default changes via ‘Apply’ are saved in the current configuration file, normally ~/pc/.sunpcrc. The ‘Defaults’ button will reset the specific properties form to the original factory default settings. ‘Defaults’ is equivalent to hand editing each entry back to the factory default settings and then selecting ‘Apply’. The ‘Reset’ option allows the user to unedit all changes since the last ‘Apply’ or ‘Defaults’ selection and redisplay the current operational configuration values for that SunPC session. No changes in configuration state will be made until all of the current changes are validated. All entries that have been modified display a change bar indicating that they have been edited but not yet applied to the current sessions configuration. Some of the configuration items will directly affect the PC emulation such that in order for the change to take affect the MS-DOS session will need to be cold booted. In these cases a confirmer will ask you if it is okay to reboot the session. Selecting ‘Cancel’ will abort the operation and leave all changes unapplied. ‘LPT Port Properties’
The ‘LPT Port Properties’ assigns the three MS-DOS parallel printer designations: LPT1:, LPT2:, and LPT3: to a specified SunOS output device. The default settings are: files sent to LPT1: go to the default system printer via the SunOS printer program lpr(1). Files sent to LPT2: are appended to the file ~/pc/lpt-2 in your home pc directory. Epson-compatible print jobs can be sent to LPT2: to yield Epson FX-80 quality output on a Postscript printer, by changing the LPT2: printer output setting from ‘File’ to ‘Printer’. Files sent to LPT3: are appended to the file ~/pc/lpt-3 in your home pc directory. PostScript compatible jobs can be set to LPT3: by changing the LPT3: printer output setting from ‘File’ to ‘Printer’. The ‘Printer’ setting sends MS-DOS printer output the standard input of the specified SunOS program. Normally lpr(1) is used to direct the MS-DOS printer output to the specified SunOS printer. The ‘File’ setting directs the MS-DOS printer output to the specified SunOS file. File output is always appended to the specified file. If the specified file does not exist, one will be created for you. The ‘Send’ settings controls the time at which output is actually sent to the specified SunOS output device. A value of ‘Off’ specifies that output be sent only at user controlled intervals by using the ‘Send to LPT’ menu option or the C:\SUNPC3\FLUSH1, C:\SUNPC3\FLUSH2 or, C:\SUNPC3\FLUSH3 extended MS-DOS commands which may be accessed under programatic control. When the ‘Send’ setting is set to ‘On’ the time interval value is used. The time interval value is used to send the output of a specified MS-DOS printer port when that port has been inactive for the specified amount of time. An interval of 0 seconds means to send each character as it is printed by MS-DOS. This setting is useful for advanced MS-DOS to SunOS interprocess communication. Normally the send interval should be set to a large number of seconds (usually several minutes) so that the printer output is not split into multiple SunOS printer jobs.
‘COM Port Properties’
The ‘COM Port Properties’ assigns the two MS-DOS serial ports designations: COM1: and, COM2: to the specified SunOS character device. Normally this is one of the two supplied internal serial port devices /dev/ttya or /dev/ttyb . The ‘Hardware Xon/Xoff’ setting controls whether hardware flow control is to be used. Most communication packages expect to use software flow control so that this setting is normally set to ‘Disabled’.
‘Drives’
The ‘Drives’ properties form assigns the MS-DOS diskette drives A: and B: to the specified SunOS character device and the MS-DOS hard drives C: and D: to the specified SunPC virtual hard drive file. Normally drive A: is assigned to the internal SunOS diskette drive /dev/rfd0 while drive C: is assigned to the automatically created 20 Megabyte hard drive file ~/pc/C.sunpc3. Changing the assignment of a virtual hard drive file will cause the window to be cold booted. When a drive is assigned, the drive button on the main window will become active. When the drive is unassigned, the drive button on the main window will be inactive or grayed out. The ‘Drives’ properties form also allows the user to gain access to the hard disk editor which can be used to create and assign new virtual hard drives of a user specified size. The hard disk editor will automatically run the MS-DOS utilities FDISK and FORMAT, along with the SunPC extended command, to install the SunPC MS-DOS software on a newly created virtual hard drive to create an instantly usable, bootable MS-DOS 4.0.1 SunPC virtual hard drive file. The virtual drive gets all of its installation software from $SUNPCHOME/defaults/4.01 . Drive A is assigned to the Sun Sparc internal 3.5-inch diskette drive, used for reading PC format diskettes onto the hard disk and writing data to be stored on floppy. Drive A is not accessible across a network. The MS-DOS command FORMAT A: /S works only if the current working directory contains MS-DOS files. This is usually Drive C and sometimes Drive A. Drive B can be assigned to an optional 3.5-inch or 5.25-inch external SCSI diskette drive. It has the same restrictions as Drive A. Drive C is assigned to a virtual disk normally stored in the ~/pc/C.sunpc3 file. Files written to Drive C cannot be accessed from the SunOS operating system. Drive C is generally intended for storage of applications and copy protected software but not data. To MS-DOS, drive C is a 20-megabyte drive. You can install copy-protected software on drive C (or D), but not on other drives. Drive D is an optional virtual disk drive. It has the same restrictions as Drive C. Normally Drive D is created and assigned through the hard disk editor accessed from the ‘Drives’ Properties form.
‘Display’
The ‘Type’ field allows the user to control whether the emulated PC display adapter is an IBM Hercules monochrome graphics card or a Video 7 Super VGA card with 256 colors. Changing the display adapter ‘Type’ requires the user to confirm a cold reboot of the SunPC window. VGA emulation is not supported on monochrome systems. SunPC will automatically switch the display type to ‘Hercules’ on systems with monochrome monitors. The ‘Size’ field allows the user to have the display output rendered with either the PC aspect ratio on the ‘Regular’ setting or to double the aspect ration with the ‘Large’ setting. Note that some extended VGA video modes will not fit on the screen while in the ‘Large’ aspect ratio. Changing the aspect ratio does not require a SunPC session reboot.
‘Miscellaneous’
‘Auto Pause’ controls whether the CPU emulation employs idle detection heuristics to determine if the SunPC emulated CPU is doing useful work or not. Note, however, that some applications are able to fool the heuristic into either believing the CPU is idle when it is really not or to make the heuristic think the CPU is performing useful work when it really isn’t. Turning the setting to ‘On’ will allow the SunPC emulation to best utilize system resources, freeing them when the emulated CPU appears to be idle or doing non-useful work. A setting of ‘Off’ will cause the SunPC emulation to constantly use all required resources unless manually set inactive with the ‘Pause’ option. The ‘Memory’ setting controls the amount of physical memory that gets supplied with your emulated PC in 1 Megabyte increments. This memory may be used by the MS-DOS session for either extended or expanded memory. See the documentation supplied with your specific application for your specific memory requirements. The hardware accelerated session can only supply memory in powers of 2 Megabytes. The hardware accelerated memory selection is rounded down to the nearest power of 2. Thus 5, 6 and 7 Megabytes is rounded down so that that actual amount supplied will be 4 Megabytes. 9 through 15 Megabytes is rounded down to 8 Megabytes, etc. Changing the amount of memory is equivalent to powering down a PC and changing the amount of system RAM. Changing the amount of emulated system RAM requires the user to confirm a cold reboot of the session. ‘Sound’ controls the volume of sounds from the SunPC window. Sound volume is a global workstation value, thus changing the sound volume from within SunPC will change the sound output of other applications. However the sound volume will not affect the window bell or beep sound as this is controlled via a buzzer in the keyboard. The ‘SunOS Output to:’ item controls whether the output generated using the MS-DOS extended command C:\SUNPC3\UNIX <command> is directed into the SunPC window or a SunOS window. If the SunPC window was started using the root menu or the .openwin-init start-up file, SunOS output will appear in the console window, otherwise SunOS output will appear in the window from which SunPC was initiated.
Drives A: B: C: and D:
The drive buttons allow you to control access for drives A:, B:, C:, and D:. A drive button can have three states. When the drive button is grayed out or inactive, the drive does not have an MS-DOS to SunOS assignment. Assignments for drives may be modified using the ‘Drives’ properties form. When the drive is attached or available for use with the current MS-DOS session, the drive button is active or darkened (pushed in). When the drive is assigned but not usable for the current session, it is non-active or lighter in color (pulled out). When drives A: or B: are attached, they may not be used by other SunPC or SunOS applications. When drives C: or D: are attached, they can be accessed as read-only from other SunPC sessions. When SunPC first starts or reboots, it silently attempts to gain exclusive access for drives A:, B:, C: and D: if they are assigned.
Operations Menu
The operations menu available in the MS-DOS display area by pressing the right mouse button allows various controls over the work in the window. The operations menu is a combination of both the ‘Edit’ and ‘Devices’ menus. It exists solely for convenience purposes. It is most useful while in Microsoft mouse mode because you can’t access the ‘Edit’ or ‘Devices’ menu.
File Sharing between SunOS and MS-DOS Systems.
Drives E through Z. Equivalents of the SunOS operating system directories. They can be accessed from either the MS-DOS or SunOS operating systems, and can contain any number of files and other directories. The SunOS directories referenced by MS-DOS drives other than E, F, H, and R (described below) are user-defined (using the MS-DOS NET USE command). Drive E. The current working directory from which the user started SunPC. Drive F. The $SUNPCHOME/dos area where all network accessible SunPC supplied MS-DOS 4.01 and SunPC 3.0 commands are found. Drive H. The home directory of the user who opened the window. May subsequently be changed to any directory in the user’s home directory tree. Drive R. Initially equivalent to the root directory of the SunOS operating system. File names under MS-DOS consist of 8 characters, a period, and a 3 character extension. When a SunOS file name does not comply with these rules, its name is modified by placing a tilde (~) in an appropriate location so that the file name conforms to MS-DOS specifications while remaining unique. It is recommended that file names conform to MS-DOS requirements for files to be used in both the SunOS and MS-DOS operating systems. Because the SunOS and MS-DOS operating systems use different conventions for RETURN characters, dos2unix and unix2dos are provided to convert text files between the two formats.
Command Sharing between SunOS and MS-DOS Systems
The $SUNPCHOME/unix directory contains a list of SunOS commands accessible from MS-DOS. Other SunOS commands not in this list can be executed from MS-DOS with the command ‘unix command’. SunOS commands always use SunOS file name conventions and MS-DOS commands always use MS-DOS file name conventions, regardless of whether the command is executed from the SunOS or MS-DOS operating system. Only MS-DOS commands can be used on drives A, B, C, and D.
OPTIONS
−h Prints the complete list of command options and exits. This option will not open a SunPC window.
−a Starts session with the SunPC Accelerator Card attached. If a SunPC Accelerator Card is not available, does not start a session.
−n Starts software-only session, even if the SunPC Accelerator Card is available.
−p properties_file
Loads an alternate configuration file instead of ~/pc/.sunpcrc.
−f Normally SunPC ejects any diskettes in the diskette drive. This prevents the SunPC window from attempting to boot off of a SunOS formatted diskette or a non-bootable MS-DOS diskette. Use of this switch prevents SunPC from ejecting the diskette in the drive so that SunPC can boot off of it.
−demo
Starts a SunPC demo mode session. Using this switch will inhibit SunPC from attempting to check out a license from your SNL server. Demo mode is a fully functional SunPC session that runs for a limited amount of time.
−Oc disk_file
−Od disk_file
Overrides the current C: or D: virtual drive file specified in the configuration file. This switch is used to start SunPC sessions using a specified hard drive file from the filemgr(1) SunOS desktop application.
−c command
Executes the given MS-DOS command in the newly opened window. If you use the −c option, −c and the command that follows it must be the last items on the command line.
ENVIRONMENT
DOS_LOCKING This environment variable determines which locking service is used to lock drive C for write access. If it is set to on, MS-DOS uses the locking service on the server where the home directory is located. This locks drive C for access from any MS-DOS window on the network. If it is set to off, MS-DOS uses the local system’s locking service. This locks drive C only for access from MS-DOS windows running on the local system. The default is on. Some servers (for example, some VAX/Ultrix systems) do not provide an NFS locking service. For home directories stored on these servers, set the variable to off to avoid an error message when a MS-DOS window starts up.
$SUNPCHOME/defaults/.sunpcrc
Default .sunpcrc file copied into a user’s home MS-DOS directory (~/pc) the first time a SunPC window is started. Not used by MS-DOS in this location.
$SUNPCHOME/defaults/C.sunpc3
Default drive C file copied into a user’s home PC directory the first time a SunPC window is started. Data for drive C is installed from $SUNPCHOME/defaults/4.01.
~/pc/autoexec.bat
Contains drive assignments, search paths, and other startup commands. Searched after C:AUTOEXEC.BAT and E:AUTOEXEC.BAT. This file can be accessed from MS-DOS as H:\PC\AUTOEXEC.BAT.
C:AUTOEXEC.BAT
Contains default SunPC drive assignments, search paths, and other startup commands. You should not need to change the AUTOEXEC.BAT on drive C. Put your changes in the AUTOEXEC.BAT on drive H (in your home directory). C:AUTOEXEC.BAT is not accessible from the SunOS system.
E:AUTOEXEC.BAT
Contains drive assignments, search paths, and other startup commands. Drive E:, by default, is assigned to the current working directory from which you started SunPC. If you start SunPC from your ~/.openwin-init file when you start OpenWindows or from the OpenWindows root menu, drive E: will be set to the working directory from which you invoked OpenWindows.
C:CONFIG.SYS
Specifies device drivers and other system parameters. C:CONFIG.SYS is not accessible from the SunOS system.
~/pc/.sunpcrc Defines printers, standard PC devices, drive C. One or more of these files may exist, under various names which you assign. Contains only non-default settings. This file should not be edited by hand but should be accessed only via SunPC ‘Properties’ forms.
~/pc/C.sunpc3
A user’s personal copy of drive C.
DIAGNOSTICS
All diagnostics and error messages for SunPC are displayed in the SunPC error window. For more information on diagnostics for the SunPC Accelerator card, see the SunPC Accelerator Users Guide.
SEE ALSO
SunPC Users Guide
SunPC Commands Guide
Sun Release 4.1 — Last change: 26 February 1992