Project: MGL Dualmode Library


Overview

The purpose of the Dualmode library is to allow developers to write applications which can switch between full screen graphics modes and windowed DIVE graphics. The Dualmode API is designed to make these transitions completely transparent to the application. The application doesn't know, and doesn't have to know if it is running full screen or not.

The links for this project have been updated. You can now retrieve the latest publically available releases of the DualMode library (R6) and MGLServer (R5).

Current project

Currently, I am assisting Bartosz Tomasik in porting the video subsystem of SDL (Simple DirectMedia Layer) to OS/2. Bart has taken care of porting most of the rest of SDL and I am working on adapting the DualMode library to provide the functionality for the video in SDL. After completing this port, I will attempt to add audio support to SDL on OS/2 also.

The following features are supported by the Dualmode library:
  • Graphics format conversion
    The application can have its graphics in any format that it wants regardless of the current desktop video mode. The Dualmode library will convert the color format appropriately automatically.
  • Viewport control
    Allows the developer to set a given portion of a buffer as a "viewport" rather than blitting the entire image. The viewport can be panned on the fly.
  • Keyboard support
    The Dualmode library has its own keyboard interface which is independent of whether the application is operating in full screen mode or in a window.
  • Mouse support
    Mouse interaction is fully supported by the Dualmode library through its own set of API calls, allowing relative or absolute position queries whether operating full screen or in a window.
  • Frame rate regulation
    The Dualmode library includes its own API set for frame rate regulation. You can set how often frame skip occurs, how many frames per second are desired, and which method is used for frame rate timing (Timer0 or polling).
  • WM_TOGGLEFS
    Any window created with the Dualmode library will respond to a WM_TOGGLEFS message which will switch between full screen and windowed operation when the message is received.
  • Built-in screen capture function
    Any window created with the Dualmode library will respond to a WM_CLIPCAPTURE message which will copy the contents of its window (or video buffer if running full screen) to the PM clipboard to be used by other applications.

Requirements:
  • An appropriate release of MGLServer
    This is used for the full screen aspect of the Dualmode library.
    It must reside in the same directory as your Dualmode application or be able to be located on the PATH.
  • Scitech MGL support package
    Containing:
    • SDDHelp.sys
      This must be loaded with a DEVICE= statement in your Config.sys.
    • Graphics.Bpd
      Binary portable driver for VESA graphics.
      Needed for systems that do not use SDD as their display driver.
      This should be located in a subdirectory named "drivers" under the directory where your Dualmode application is located.
    • SDDDaem.Exe
      Process needed to access VESA BIOS.
      Needed for systems that do not use SDD as their display driver.
      This should be located in a subdirectory named "drivers" under the directory where your Dualmode application is located.
  • Latest EMX .9d runtime libraries
  • OS/2 Warp 3 (with a recent fixpack), Warp 4 (fixpack 6 or above), Warp 4.5x or eCS

Project Navigation