home *** CD-ROM | disk | FTP | other *** search
- ********************************************************************************
- * GLE for OS/2 *
- * *
- * ported by Axel Rohde *
- ********************************************************************************
-
- A little bit history:
- ---------------------
-
- 32 bit DOS version of GLE by Axel Rohde
- ---------------------------------------
-
- Introduction: (By Chris)
- For a long time I have been explaining to people that a 32bit
- dos version of GLE was not possible with currently available
- compilers and libraries.
- Clearly Axel has no appreciation for the impossible and has gone
- ahead and compiled a version anyway (with absolutely no assistance
- from me). On any 386 or better machine this version of GLE should
- run without problems, it's main features are these:
- 1) No 640K memory restrictions.
- 2) Much faster.
- .
- .
- .
- .
- .
-
-
-
- This happened a few month ago, after compiling GLE under Linux in october
- 1993. GLE 32 for DOS was released in January 1994. Now, it's:
-
- GLE for OS/2
- ------------
-
- --------------------------------------------------------------------------------
-
-
- Installation
- ------------
- Since GLE for OS/2 uses Presentation Manager calls to display output,
- you only have to set the environment variable GLE_TOP in OS/2's CONFIG.SYS,
- include the directory, where the executables are in the PATH environment
- and the directory, where the DLL's of EMX are in the LIBPATH environment.
-
- set GLE_TOP=c:\glepm
- set PATH=......;c:\glepm
- set LIBPATH=......;c:\glepm\dll
-
- I used Eberhard Mattes nice port of GNU C to compile GLE. Therefore,
- a small number of Dynamic Link Libraries (DLL's) is needed to run GLE.
- If you have already installed them or a newer version, you may erase
- all the DLL's in the GLE\DLL directory to save disk space. If your DLL's
- are older (than EMX 0.8h fix 08), it should be safe to replace them.
-
-
- Notes for those, who use both, GLE 32 for DOS and GLE for OS/2
- -----------------------------------------------------------------
-
- It is possible, to use all programs of this package under DOS, too,
- except GLE_PM and SURF_PM. EMX/GCC comes with a DOS extender called
- EMX.EXE. EMX.EXE requires the DOS-extender-standard VCPI. VCPI is
- established, if you have the following entries in DOS's CONFIG.SYS:
-
- device=c:\dos\himem.sys
- device=c:\dos\emm386.exe RAM 2048
-
- the switch <RAM 2048> for EMM386 creates 2MB EMS memory, which can be
- accessed by EMX.EXE.
-
- A math co-processor (i387xx), a 486DX or a Pentium is required, to use
- EMX.EXE under DOS. If you don't have such a CPU or if you want to run
- GLE in an OS/2 or Windows DOS-Box, you might use another DOS-extender
- called RSX or RSX32. It does not require a co-processor but an
- DPMI-server (Dos Protected Mode Interface). Both DOS-emulations of OS/2
- and Windows serve DPMI, but not plain MS DOS 5 and 6.x. Other products
- like Quarterdeck's QEMM/QDPMI or Qualitas 386ToTheMax serve DPMI, too.
- Note, that GLE 32 for DOS has a co-processor emulator and runs under
- DPMI (except GLE_VGA and SURF_VGA), too.
-
- To make GLE for OS/2 use RSX or RSX32 under DOS or in a DOS-Box, set
- the following environment in your autoexec.bat:
-
- set EMX=c:\gle\RSX32.exe
-
-
- I recommend running GLE for OS/2 + RSX under OS/2 and it's DOS-Box and
- GLE 32 for DOS under *PLAIN* DOS. The display drivers run only on
- OS/2's PM or under plain DOS.
-
- There is no Windows version of a display driver and I will NOT spend any
- time to implement one, unless Windows is (nearly) full 32 bit, runs on an
- 8 MB equipped PC and has a text-mode (as Windows NT has). A compiler (GCC!)
- and a toolkit for Windows are required, too.
-
-
-
- Differences between GLE for OS/2, for DOS and for UNIX/X-Window-System
- ----------------------------------------------------------------------
- and some hints for using
- ------------------------
-
- If GLE_VGA (DOS) draws a graph onto the screen, it switches from text- to
- the graphics-mode. The editor of GLE_X (X-Windows) runs in text-mode, too.
- If it draws a graph, it forces the X-Windows server to create a new window
- on a specified display and draws into it. Under OS/2, it is possible
- to run a OS/2 text-mode program in a PM Window, but it's impossible (or
- not documented), to force the PM to create a new window and to draw into it.
- Since OS/2 programs are marked as FullScreen (text-mode, only in fullscreen
- mode), WindowCompatible (text-mode, windowable) or WindowAPI (PM program),
- and I did not want to rewrite the text-mode part of GLE to use a
- 'Vio Presentation Space' (since EMX has no Borland-compatible text-mode
- library, I rewrote some text-mode calls using EMX calls, though), the
- editor of GLE runs in text-mode as usual. GLE_PM and SURF_PM are marked
- WindowCompatible. If GLE draws onto the PM, it writes the text being edited
- into a temporary file (gleos2.tmp) and starts ITSELF again. It is possible
- to start a WindowCompat marked program as a PM program using the following
- command (is it a bug? I hope, it will never be fixed!):
-
- start /PM program
-
- GLE_PM and SURF_PM use the API call DosStartSession() to do this. GLE and
- SURFACE determine what to do from their commandline-arguments. The switch
- into displaying mode, when they get the DRAW option:
-
- start /pm gle_pm /draw gleos2.tmp
- start /pm surf_pm surfos2.tmp /d /o something.sur
-
- YOU should not do this.
- If the drawing is finished, GLE normally prints error messages to the
- screen, if there are any. Since I don't now, how to make the editor-
- and the drawing-instance communicate with each other (shared memory,
- pipes, semaphores... all these IBMisms. I don't have a cookbook for
- OS/2 programming, only the referenes. Chris Pugmire, the author of GLE,
- might not be able to regcognize his source.), the drawing instance of
- GLE_PM displays a message on it's title bar, if there were errors, warnings
- or messages during compilation. You can go back to the editor instance of
- GLE_PM using the keystroke ALT+TAB and then pressing F5 to display these
- messages. GLE_PM writes them into the file GLEOS2.ERR. SURF_PM behaves a
- little bit different. You won't see any graphics window, if there are
- errors, since it does not display anything if errors happen. If no
- graphics window appears after pressing F10, you should press F5 and
- take a look at the error messages.
-
- The graphics instances are *replaced* (killed using DosStopSession()), if
- there is one open and you press F10 again.
-
- The graphics portion of GLE_PM draws into a 'normal Presentation Space'.
- This enables the redrawing of the window contents, if it was hidden behind
- another window. The redrawing is slow compared to a BitBlit operation
- from a 'memory Presentation Space' to a Presentation Space on the screen.
- Since it is useful to see, *where* an error occurs, I didn't implemented
- drawing into an invisible bitmap and blitting it to screen after completion.
-
- After realising, that drawing thick lines in a PM window is slow (see below)
- and those thick lines aren't really thick, I removed the code that switches
- between line-widths. I implemented Shades and Grid patterns (see shade.gle
- or wallx.gle). They look different compared to the output of GLE_PS +
- Ghostscript (a postscript emulator) + Ink Printer, but look very much
- better than the output of GLE_VGA and GLE_X. They draw solid black instead.
- There are only 8 different line-styles available using GpiSetLineStyle(). It
- is not possible, to define new line-styles.
-
-
- Speed
- -----
- GLE_PM is significantly **SLOWER** than GLE 32 for DOS and GLE_X under
- Linux / XFree86 2.1.1 on the *same* Hardware.
- There are different reasons:
-
- 1) Those people at IBM are unable to implement a good HardDisk cache.
- 2) PM Speed is not really high with some functions.
- 3) OS/2 is RAM wasting.
-
- My 'benchmarks' are wallx.gle and adphas.gle (directory kill-gle.16).
- wallx is an example for a large number of fonts, markers, line-styles,
- colors grids and shades. Fonts are loaded from disk and this requires
- caching for high speed.
- adphas calculates and displays a set of curves with small steps and
- loads and displays 5000 lines data (small steps, too). Due to short
- line segments, accelerated graphics boards don't gain much. A high
- bus speed makes more effect.
-
- My equipment: 486DX 50MHz, 8 MB RAM, not really slow disks, S3 805
- VESA Local Bus graphics board (with 0 Wait at 50MHz !).
-
- Configuration:
- DOS:
- 3 MB HD cache, NON-accelerated graphics driver.
-
- OS/2:
- 1.5 MB HD cache, HPFS, Workplace Shell is OFF!!!
- PM driver accelerated, 1024x768, 256 colours.
-
- Linux:
- not fixed cache size, extended file system II,
- kernel 1.1, accelerated X-server XFree86S3 Ver. 2.1.1,
- 1096x850, 256 colours.
-
-
- 1.5 MB is absolutely enough to load 270 kB program and 200 kB Data.
- The RAM-wasting Workplace Shell is disabled to free RAM and replaced
- by a clone of a popular commander.....
-
-
- Compiler: ALL programs were compiled with GNU C!!! Porgrams, that only
- compute, run at the same speed under DOS, OS/2 and Linux!
-
- Procedure: execute
- GLE_VGA /draw <file> under DOS
- GLE_X /draw <file> under Linux
- start /PM GLE_PM /draw <file> under OS/2
-
- twice, to load the programs and the data into HD-cache. Time
- was stopped for the *second* run. There were no other progs
- running.
-
-
- Times in seconds:
-
- OS adphas wallx
- ---------------------------------------------------------
-
- Linux 2.5 2
-
- DOS 3.5 3
-
- DOS w/o cache 6 8
-
- OS/2 6 9.5
-
-
-
- Hey IBM! 32 Bit alone is NOT enough....... Do your homework!!!
-
-
-
- RESTRICTIONS and BUGS
- ---------------------
-
- 1) The vector-fonts of the GLE for OS/2 are compatible to those from
- GLE 32 for DOS and Linux. They are not compatible to 16 bit fonts
- that come with the 16 bit release of GLE for DOS (by Chris Pugmire).
- They may be compatible to fonts that were created
- under other (small endian!) 32-bit operating-systems.
- If you use GLE under Linux, too, it may be a good idea to mount the
- DOS-partition, that contains GLE 32 or GLE for OS/2 (including fonts)
- and create a link:
-
- ln -s /dospartition-mount-directory/gle32/font /usr/local/gle/font
-
- If there is GLE 32 for DOS somewhere on a DOS partition (for exmaple f:),
- simply erase the fonts in the GLE for OS/2 directory and set
- GLE_TOP=f:/gle32/.
-
- This will save approximately 900 kB harddisk space.
-
- 2) Makefmt and fbuild are missing because EMX's library lacks ecvt().
- Both programs are used to calculate vector-fonts in the Unix-version
- of the source-distribution. Both programs are NOT included in the
- 16-bit DOS-version of GLE, too. This package includes ALL (allready
- calculated) fonts from the Unix-source distribution. They were calculated
- under Linux.
-
- 3) SURF_PM doesn't erase all temporary files.
-
-
-
- Suggestions
- -----------
-
- You should get Ghostscript from a ftp site! Especially, if you own
- a supported color-printer (HP Deskjet 500c, 550c). Ghostscript prints
- Postscript output on non-postscript-capable devices. It can convert
- Postscript to various bitmap-formats. The current version is 2.6.1.
- There's a PM interface called GVPM.
- Ghostscript is free usable (GNU Public License), fast and reliable.
-
-
-
- Access to the DJGPP patches for the Source
- ------------------------------------------
-
- The complete sources are at least available from Chris Pugmire's
- FTP-server (tui.marc.cri.nz). GLE for OS/2 should be available
- from ftp.informatik.tu-muenchen.de (131.159.0.198),
- ftp.uni-stuttgart.de and ftp.cdrom.com.
-
-
- Postscript documentation
- ------------------------
-
- The complete Postscript documentaion of GLE 3.2 is in the directory
- glepm\postscri.doc. I made diff-files to patch them into a
- Ghostscript-printable state. For further information, take
- a look into the file gle32\postscri.doc\readme.pat. The GNU 'patch'
- utility is included in this package.
-
-
-
- LEGAL STUFF
-
- Copyright-holders are:
-
- GLE: Please ask Chris Pugmire.
-
- MS-DOS, Windows: Microsoft Corporation.
-
- QEMM386, QDPMI: Quarterdeck.
-
- 386ToTheMAX: Qualitas.
-
- i386SX, i386DX, i486SX, i486DX, Pentium: INTEL.
-
- OS/2: IBM Corporation.
-
- HP Deskjet: Hewlett Packard.
-
- Ghostscript: Aladdin Enterprises.
-
-
-
- Legal stuff (selfprotection)
- ----------------------------
-
- LIKE ANYTHING ELSE THAT'S FREE, GLE FOR OS/2 AND ITS ASSOCIATED UTILITIES ARE
- PROVIDED AS IS AND COME WITH NO WARRANTY OF ANY KIND, EITHER EXPRESSED OR
- IMPLIED. IN NO EVENT WILL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY DAMAGES
- RESULTING FROM THE USE OF THIS SOFTWARE.
-
- These programs are distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-
-
-
- Reporting bugs
- --------------
-
- Bug-reports are wellcome (to me and Chris Pugmire). It can not be guaranteed
- that they can be fixed. You should report bugs, that seem to be unique to
- GLE 32 and GLE for OS/2, to me.
-
-
- Axel Rohde
- email: exp109@physik.uni-kiel.d400.de
-
- Chris Pugmire's email adress: in%"srghcxp@grv.dsir.govt.nz"
- srghcxp@grv.dsir.govt.nz
-
-
-
- Thanks to:
- ----------
-
- Chris Pugmire for creating GLE.
-
-
- Eberhard Mattes for porting GCC to OS/2 (and DOS), and for emTeX,
- of course.
-
- All the GCC and Gnu people and all other people, who write free software.
-
- Lars Petersen for OS/2 documentation.
-
- Hartmut Schirmer for BCC2GRX and help with GLE 32.
-
- Queensrÿche, Megadeth, Fates Warning, Dire Straits and many other bands.
- They protected me against the noise of 'OS/2 swapping
- on the HardDisk'. Linux isn't such a RAM-hog.
-
-
-
-
- Happy GLEing,
- Axel Rohde
- July 1994
-