running alphaplus software on windows 64

Upload: francisco-bone-tenorio

Post on 13-Oct-2015

234 views

Category:

Documents


13 download

TRANSCRIPT

Running AlphaPlus software on Windows 64-bit operating systems

Elster Solutions

Running AlphaPLus on Windows 64-bit

Running AlphaPlus software on Windows 64-bit operating systems

Table of Contents

21.Using DOSBox to run AlphaPlus

22.Disclaimer

23.Requirements

34.Alternative Solutions

35.Installing DOSBox

56.Setting up DOSBox and AlphaPlus

5Preparing Media

5Configuring DOSBox

97.Installing AlphaPlus under DOSBox

108.Final Customization

119.Alternative Settings and Enhancements

1210.Troubleshooting

1311.Information for End Users

1412.Screenshots

1. Using DOSBox to run AlphaPlusDOSBox is a popular free emulator that is capable of running DOS programs on a variety of hardware and operating systems. DOSBox provides both PC hardware emulation and operating system emulation, therefore no separate Microsoft license is necessary. As the tool has timing-compatible serial ports, it can be used for running AlphaPlus on platforms that do not have direct support for DOS 16-bit executable format, such as Windows 7 64-bit or Windows Vista 64-bit.

All current 32-bit versions of Windows are capable of running AlphaPlus directly, and they do not need DOSBox.

2. Disclaimer

Elster does not provide any direct support of the solution described here, which is for information only. By DOSBox license that is GPL2, Elster cannot package DOSBox together with AlphaPlus and redistribute such package outside the company, but it is allowed for everyone to have DOSBox downloaded and exposed on a network share if a link to http://www.dosbox.com is provided - the place where an interested person can download and build DOSBox from source code for one's favorite platform.

3. Requirements

This installation manual is for experienced computer users. If you are not fluent with command line, or do not know what an environment variable is or how to edit it, please ask someone else to set up DOSBox and AlphaPlus for you. After installation, the usage of AlphaPlus is almost the same as its use under operating systems that support 16-bit executables directly. Extra information dedicated to AlphaPlus end users is available at the end of the manual.

Availability of AlphaPlus under DOSBox is only restricted by presence of DOSBox and a serial port/modem on the target platform. DOSBox itself is limited by the multiplatform capabilities of the SDL library that it utilizes for emulation. According to the contents of the SDL library page, SDL fully supports Linux, Windows, Windows CE, BeOS, MacOS, Mac OS X, FreeBSD, NetBSD, OpenBSD, BSD/OS, Solaris, IRIX, and QNX.The biggest demand for running AlphaPlus under the emulation environment exists among customers who utilize one of the current 64-bit Windows operating systems, as there is no support for 16-bit executables present on these 64-bit platforms. These platforms are not only the ultimate future, but already the present, as about half of licenses sold today are for Windows 64-bit versions. For these, DOSBox provides a complete and easy to use solution.

4. Alternative Solutions

Many current virtual machines such as VMWare are capable of running MS/DOS operating system or 32-bit version of Windows, under which AlphaPlus can run. If such solution is chosen, Windows XP SP3 should be preferred, as this operating system can be set up to easily share its disk with the host operating system. However to our opinion, the presented DOSBox solution is easier to configure and control, it is more lightweight, and there is no necessity of purchasing an extra license for the virtualized operating system. When DOSBox is used, the subdirectory with AlphaPlus installation will be directly visible by the host operating system, and the users can manipulate it from host as they would do when having AlphaPlus run directly from 32-bit Windows.

5. Installing DOSBox

To install DOSBox on Windows, download the Windows installer (Win32 Installer) directly from the Downloads page at http://www.dosbox.com.The latest stable version of DOSBox is recommended, at present it is 0.74Double-click on the installer executable and follow the steps:

select the components to install: Core files, Desktop shortcut

select Destination Folder (default is typically desired), and click Install.After installation, an icon is displayed on the desktop

A bare DOSBox command prompt can be run from Start menu.

DOSBox download page also has binaries and source code distribution for the other operating systems such as MacOS or Linux. In case of free operating systems (Linux, BSD), there are simpler ways of getting DOSBox installed, which is through software distribution package managers available in these platforms.

A couple of extra front-end applications are available for DOSBox with the main purpose to simplify configuration and management of different profiles. Those are not described here, and some are available in the download page. This guide does not make any use of these front-ends, concentrates on the DOSBox original capabilities. The users are free to try front-ends if they find them useful.

6. Setting up DOSBox and AlphaPlus

Here is a step-by-step sequence on how to have AlphaPlus running under DOSBox. The instructions are given for Windows operating system, while the actions for the other operating systems are very similar.

Preparing Media

This defines what will be the system disk C: under DOSBox.

Create an easily accessible location in the directory hierarchy. Preferred but not required is if the whole directory path complies with DOS rules, such as it shall not have blanks or non-ASCII (non-English) characters, and no directory name shall be bigger than eight characters. For example, C:\DOSBOX is a nice directory name for the purpose. This directory name will be used in the text below. Please replace it with yours if another directory is chosen for installation.

Under this newly created directory, create a subdirectory with the name C, which will be the disk C: of DOSBox. The result full directory path is C:\DOSBOX\C.

Configuring DOSBox

This will configure DOSBox for convenient and transparent use of AlphaPlus.

Add DOSBox installation directory to the end of PATH environment variable. Default location of DOSBox version 0.74 in 64-bit Windows will typically be C:\Program Files (x86)\DOSBox-0.74. The environment variable editor is located in the Control Panel -> System (instructions are Windows version dependent). For Windows 7, select System Properties -> Advanced, and add to the Path. At this moment, we are going to create DOSBox configuration file. From Windows Start Menu, select DOSBox | Options | DOSBox 0.74 Options. The exact location and name of this command will depend on DOSBox version. If the menu item is not available in the target operating system, enter the following at the command prompt: dosbox -editconf notepad, where notepad can be replaced by any text editor available.

Text editor with the default DOSBox configuration file will be shown.

The file has a simple ini format, and it is well-commented so every option is described in detail. The default location of the configuration file will be in the user's application data directory, not easily reachable by means other than running DOSBox 0.74 Options. We strongly recommend saving the contents of the opened editor into the already created DOSBOX directory. Do it by executing editor's File | Save As..., and saving the file into C:\DOSBOX\aplus.ini.

Now we will be editing this DOSBox configuration file. At this time, it is not recommended to change the various options of the configuration, rather we do only the changes absolutely necessary for AlphaPlus to run. First, disable mouse autolock mode. Find [sdl] section, and change autolock=true to autolock=false:

The # represents a comment in the configuration file.

Next, find the section [serial] and edit serial ports 1 and 2 (serial1, serial2) since the default settings in AlphaPlus are COM1 for the Communications Serial Probe Connector and COM2 for the Communication Port for the Modem.

The following illustration shows the default Alpha Plus Communication Options:

The following illustration shows the default Alpha Plus Modem Options:

In order to configure the serial ports in the aplus.ini file, the port that the optical probe or modem is using must be known. This can be determined by viewing the Device Manager [Control Panel -> System -> Hardware -> Device Manager -> Ports]

In the specific example above, the Elster Unicom III USB Optical Probe is connected via COM3 on the host machine and an external modem is connected via COM2. The resulting configuration in the aplus.ini file is:

Due to the way AlphaPlus uses serial ports, the directserial option should always be used, even for modem. Remember that due to DOS restrictions, you will not be able to use serial port 1 together with port 3, nor serial port 2 together with 4. Therefore, unless you have more than two serial devices, keep serial3 and serial4 set to disabled. 7. Installing AlphaPlus under DOSBox

It is time to run DOSBox. Open the command line prompt; navigate to directory C:\DOSBOX and from that location type:

dosbox -conf c:/dosbox/aplus.ini c:/dosbox/c

The parameters are the path of the ini file created, and the absolute directory for disk 'C' of DOSBox. DOSBox is somewhat picky at names given as parameters. Please make sure the forward slashes are used, and all letters are in lowercase. Two windows will appear as illustrated below. One window will hold the log, and another will present a regular DOS command line prompt. The log reading shall confirm that the custom configuration file aplus.ini is loaded without errors, and the command prompt shall be C:>. If the disk Z: shows up, the parameters or configuration were not correct.

Next step is to mount AlphaPlus setup as a disk in DOSBox. Have AlphaPlus installation media accessible in the host computer. If taken from Metercat installation CD, US version of AlphaPlus setup will have directory name 100G030R03, and international version is the directory 100G032R03. Under DOSBox command prompt, type:

C:\> mount d e:/path/to/alphaplus/setup/Metercat/100G030R03

Replace the example path with the real one. The given command will mount the disk D: into DOSBox, from which setup can be run. Remember that after mounting, DOSBox does not understand long Windows file names, so instead of directory name AlphaPlus one will see ALPHAP~1 and so on. Proceed with installing AlphaPlus normally by running INSTALL.EXE from the mounted location:

C:\> d: D:\> cd ALPHAP~1

D:\ALPHAP~1> install

Use default installation path C:\APLUS\, choose options as desired. Run AlphaPlus as usual:

D:\> c:

C:\> cd APLUS

C:\> APLUS.bat

and configure it to use serial ports, as written in the ini file. Then make sure you can read the meters with the installed AlphaPlus through these serial interfaces.

8. Final Customization

At this moment, it is time to make the bundle of DOSBox and AlphaPlus so that AlphaPlus is launched automatically when DOSBox is started.

Leave AlphaPlus and DOSBox by typing exit at command prompt.

Open aplus.ini, and scroll down to its last section [autoexec]. The commands in this section will get executed at DOSBox start. Here is a recommended set of options that get AlphaPlus executed at startup of DOSBox:

[autoexec] # Lines in this section will be run at startup.xx # You can put your MOUNT lines here. mount c c:/dosbox/c c: cd APLUS APLUS.BATAs mounting of disk C: is already done in autoexec, running such installation requires only the -conf option. dosbox -conf c:/dosbox/aplus.ini

To further simplify usage, it is a good idea to create a bat file that contains the command above. If this is 64-bit Windows and Metercat is installed, to launch AlphaPlus, one needs to name this bat file APLUS.bat. Here is the contents of such C:\DOSBOX\APLUS.bat, assuming DOSBox is present in PATH environment variable:

dosbox -conf c:/dosbox/aplus.ini

This bat file can be added to Windows Start menu. To allow launching AlphaPlus from Metercat, go to Metercat's Tools | Machine settings menu and change the location of APLUS.BAT to the one just created.

It is worth mentioning that there are two APLUS.BAT files. One is the one created in as suggested above (C:\DOSBOX\APLUS.bat), and another is the original AlphaPlus file C:\DOSBOX\C\APLUS\APLUS.BAT. 9. Alternative Settings and Enhancements

This guide is made for what is believed to be a usable and simple solution, however the advanced users may choose different options. Some of these items were not tested vigorously. 64-bit Windows is assumed, while many of these apply to other operating systems.

1. It is not a requirement for DOSBox to have a subdirectory as its disk C. Many will prefer to have their real disk C:\ to be the DOSBox root disk, and install AlphaPlus at its regular place, C:\APLUS. This will immediately open the whole Windows directory tree to DOS programs. Different from the original DOS, DOSBox does not have any restrictions on the size of the disk C:.

2. DOSBox can configure more than one disk, and the alternative to the above is adding extra disks with DOSBox-specific command mount. Host operating system's directory or the whole disk can be mounted. Running mount without parameters gives the currently mounted disks, while mount d e:\workdir is going to create disk d: under DOSBox prompt.

3. Instead of installing a fresh AlphaPlus, users might consider moving their existing APLUS installation directory under DOSBox. Serial port configuration can be tuned in the ini file to match the installed configuration.

4. If the computer can boot into more than one operating system, or if it employs virtual machines, AlphaPlus installation can be shared among these OS instances if the disk is shared. DOSBox shall be installed on these OSes separately, and very likely, different configuration files will have to be used - case when serial port mapping is different on all these OSes.

5. Advanced users can create roaming/portable installation of DOSBox and AlphaPlus that work directly from an USB stick. Editing the configuration file will be necessary if any of the host computers have different sets of serial ports. Here is the page for such DOSBox installation:

http://portableapps.com/apps/games/dosbox_portable

By GPL2 license of DOSBox, anyone can build a bundle of DOSBox and AlphaPlus, but one shall not redistribute it outside the company, as this would require opening source code of AlphaPlus

10. Troubleshooting

DOSBox original pages are the main source of troubleshooting information:

Here is the project wiki pages: http://www.dosbox.com/wiki/Main_Page

And this is a very useful DOSBox forum: http://vogons.zetafleet.com/index.php?c=7

The following are some extra common problems and their possible solutions:

1. AlphaPlus complains it cannot open serial port.

1. Verify you are not running the second copy of DOSBox, because the first one will keep the port allocated.

2. Verify the ports are not opened by some other application at the time DOSBox runs.

3. Exit DOSBox and verify you can use the host computer's serial port from Metercat or another application. Exit application before retrying with AlphaPlus.

4. Make sure the custom configuration file aplus.ini is used, not a generic default DOSBox conf file. One can see which file is loaded in the DOSBox log window.

5. Verify serial port configuration in aplus.ini. Make sure the mapping is correct, and directserial is used even for modem port.

2. Serial ports are not accessible to host computer applications after running AlphaPlus.

1. Make sure there is no DOSBox still running somewhere in the background window

2. Look at the list of Processes in Task Manager if there is a process with name DOSBox.exe, and kill it.

3. AlphaPlus application "Thresholds" captured the mouse, one cannot move the mouse out of DOS window.

1. Press to release mouse. If it works, this is a workaround, and the solution is in the items below:

2. Make sure the custom configuration file aplus.ini is used, not a generic default DOSBox conf file. One can see which file is loaded in the DOSBox log window.

3. Make sure aplus.ini has [sdl] option autolock=false.

11. Information for End Users

Short Introduction to DOSBox

The guide sets up the environment in such a way so that the end users of AlphaPlus do not have to deal with DOSBox directly. However, some advanced users might need to install extra DOS software, or access DOS-like features of DOSBox. Since DOSBox has excellent documentation already, this chapter is mostly about where to find it:

DOSBox wiki pages are located here: http://www.dosbox.com/wiki/Main_Page

When DOSBox runs, it shows a regular DOS-like prompt, and there is a special command info, which gives a short introduction to DOSBox.

DOS-like Help system is also available. To get the list of all supported commands, one says HELP /all. Help on a particular command is got by adding /? to the command, such as CD /?. Largely, DOSBox commands are compatible with MS/DOS.

Under Windows, install directory has a text file with the manual, with the link available through Windows Start menu. In 64-bit Windows, DOSBox installation is defaulted to c:\Program Files (x86)\DOSBox-0.74.

Under the operating systems that have their roots in UNIX, such as Apple MacOS or Linux, there is a man page dosbox.

DOSBox reports DOS version 5.00 with its command VER.

The subdirectory C:\DOSBOX\C\APLUS under host operating system will hold the contents visible from within DOSBox as C:\APLUS. One can manipulate the contents of this directory from either DOSBox or from the host operating system. Prefer host, as it gives you a more current working environment with extra features and conveniences.

Use to switch between full screen mode and window mode of DOSBox. This is similar to command prompt window of Windows.

Differences from regular Win32 Installation

There is an obvious difference as in Windows there is an extra DOS window shown to present the log to the user. This window is helpful for troubleshooting, and can simply be ignored by ordinary users. Other operating systems such as Linux incorporate log into its command line window directly. The log window will periodically show errors or warnings of various kinds. They can be ignored if AlphaPlus continues working as usual.

Different from regular AlphaPlus, while DOSBox is open, even if there is no AlphaPlus running, serial ports configured for its use will always be allocated, unavailable to Metercat or other applications. Exit DOSBox to reuse serial ports from Windows.

DOSBox is compatible with regular MS/DOS, therefore it does not understand Windows long paths, and it will shorten them into "tilda format". For example, a file AlphaPlus.txt will become visible under DOSBox as ALPHAP~1.TXT.

The following DOSBox imperfect behaviors were observed, and should be considered normal:

Screen would flicker sometime to show random cubism-like paintings. This relates to imperfect implementation of display mode switching.

The log window would complain about some unsupported modes or errors of serial port. It appears that these errors do not prevent AlphaPlus from communicating with devices.

When running AlphaPlus graphic application Thresholds, Windows Vista and Windows 7 will complain sometimes about DOSBox compatibility, and switch their interface to compatibility mode - the one without animations and the other candies. They will switch back as soon as DOSBox exits.

12. Screenshots

The following is AlphaPlus running under DOSBox under 64-bit version of Windows 7. As one can see, the log window shows various serial port errors, however the communication proceeds normally.

PAGE 1