Lugaru's Epsilon
Programmer's
Editor

Context:
Epsilon User's Manual and Reference
   Commands by Topic
      . . .
      Fixing Mistakes
         Undoing
         Interrupting a Command
      The Screen
         . . .
         Setting Colors
         Code Coloring
         Video Display Modes
         Window Borders
         The Bell
      Buffers and Files
         Buffers
         Files
         Internet Support
         . . .
         Buffer List Editing
      . . .

Previous   Up    Next
Code Coloring  Commands by Topic   Window Borders


Epsilon User's Manual and Reference > Commands by Topic > The Screen >

Video Display Modes

Under DOS and OS/2, Epsilon supports the special video display modes available with EGA and VGA boards. These allow you to display more characters on the screen than the standard 80 columns and 25 lines. The next-video command on Ctrl-F5 switches to a different video mode, if it can. It will eventually cycle through all the video modes. The set-video command on Alt-F5 asks for the name of a particular video mode, providing completion. Video modes have names like 80x25.

On EGA boards, Epsilon for DOS provides 80x25, 80x35, and 80x43 modes. On VGA boards, Epsilon provides 80x25, 80x28, 80x35, 80x40, and 80x50 modes. Most VGA boards can switch to 80x43 mode as well, but some can't. Under DOS, Epsilon will assume that your VGA board can't do 80x43 mode, unless you set the variable vga43 to a nonzero value.

Under OS/2, complications caused by incompatible boards don't occur. Epsilon provides 80x25 and 80x43 to EGA users, and 80x25, 80x30, 80x43, 80x50, and 80x60 to VGA users.

Epsilon can also support any additional video modes provided by a VESA Super VGA TSR or BIOS. Super VGA display boards often come with VESA support built in, or supplied as a TSR program you can load in your config.sys or autoexec.bat file. You can set the variable extra-video-modes to 3 to let Epsilon look for any video modes the Super VGA program provides, and add them to the list of available modes. Typically these include 132 column modes. (You can see the full list by pressing Alt-F5, then pressing "?".) Epsilon only checks for video modes when it starts, so you must set this variable, save it using the write-state command on Alt-F3, exit Epsilon and restart to begin using these modes.

Epsilon also detects and supports the Ultravision TSR by Personics Corporation. The video modes it provides replace those built into Epsilon. If an Ultravision TSR and a VESA Super VGA TSR are both present, the Ultravision TSR takes precedence. For Epsilon to use the Ultravision TSR, it must be version 1.20 or later, and you must set extra-video-modes as above.

If you need to disable Epsilon's support of VESA SVGA or Ultravision TSR's for any reason, you can set the variable extra-video-modes back to 0. Epsilon needs to load the file vidextra.b to support these additional modes. If it cannot find this file in the current directory or along the EPSPATH, it will not be able to switch to any of the additional modes.

You can use the command list-svga-modes to see a list of modes that were added. For VESA modes, the command displays additional information about each mode provided by the VESA driver.

For OS/2, run the command list-svga-modes just once to add modes; it will prompt for the location of the file SVGADATA.PMI, which is normally in your main \OS2 directory. This is a text file which describes all the available modes for your video board. If the file doesn't exist or is out of date, you can rebuild it by running the OS/2 command SVGA ON in a full-screen DOS session. See your OS/2 documentation for more information on this program.

The list-svga-modes command scans the file SVGADATA.PMI to determine which video modes are supported by the display board, and creates an Epsilon definition for each one. It also displays a list of all the modes it adds. You can delete modes you don't want using the delete-name command: type "video-mode-os2" at its prompt and then press "?", and you'll see the list of video modes. When you're satisfied with the list of video modes, you should save them using the write-state command on Ctrl-F3.

Unlike the DOS version of the list-svga-modes command, the OS/2 version not only lists the new modes, but also defines them for Epsilon. You must run the OS/2 version of this command before Epsilon can use the extra modes. Under DOS, on the other hand, Epsilon loads the new modes automatically each time it starts, so you don't have to run the list-svga-modes command unless you want to see the new modes.

If your video board offers additional video modes beyond the standard ones described above, but there is no VESA SVGA driver available for it, you can add support for the new modes yourself. The rest of this section describes how to make Epsilon support these additional modes.

First, Epsilon for DOS can support only text modes, not graphics modes. The ROM BIOS must support cursor positioning in that mode, as well. Epsilon for OS/2 doesn't have these restrictions: if the operating system supports the mode, you can make Epsilon use it.

The simplest way to use a new mode assumes that the board's manufacturer provides a program that puts the board in the new mode. Run that program before you start Epsilon. Epsilon should automatically notice and use the screen's new dimensions. If not, you can tell Epsilon with the -vl and -vc switches (see Epsilon Command Line). (When you start Epsilon, put the name of a file on its command line. If you don't include a file name, Epsilon will try to restore a previous session, including video mode, and won't use the new screen dimensions.)

Now suppose you want to use the commands described above to switch in and out of the new mode from within Epsilon.

Under DOS, you can define a new mode without using EEL. If a numeric variable with a name like "video-mode-132x60" exists, Epsilon assumes that it contains the value of a BIOS mode number, and that asking the ROM BIOS to switch to that mode number will make the screen have those dimensions. For example, one EGA-compatible video board will go into 132 by 60 mode when you switch to mode 99. If you define a variable with the above name and give it the value 99, Epsilon will switch in and out of that mode just as it does with the standard 80 by 43 mode that all EGA boards support.

If this variable technique doesn't work (for example, under OS/2, or if the BIOS doesn't support the mode), you must write the screen-switching function in EEL. Generally, you can do this by defining an EEL subroutine with a name like "video-mode-132x60". (In an EEL program, you would write the name "video_mode_132x60()". This tells Epsilon that it can use a mode with 132 columns and 60 lines, and Epsilon will call the subroutine when it wants to use that mode. You should examine the screen-switching functions provided in the file video.e to see how to do that. For OS/2, screen-switching functions have names like "video-mode-os2-132x60".

A screen-switching function takes a numeric parameter that says what to do. A value of 1 indicates that the function should switch the board into the appropriate mode, then return 1. A value of 0 indicates that the function should prepare to switch the board out of that mode, prior to switching to another mode, then return 1. In either case, the function should return zero if it cannot do the mode change. A parameter value of 2 indicates the function should return 1 (available) or 0 (unavailable) to indicate the current availability of the mode. It shouldn't actually change the mode.

Standard bindings:

  Ctrl-F5  next-video
 Alt-F5  set-video
   list-svga-modes
 



Previous   Up    Next
Code Coloring  Commands by Topic   Window Borders


Lugaru Copyright (C) 1984, 2020 by Lugaru Software Ltd. All rights reserved.