| Background Processing |
| Creating Your Own Background Processes |
| @ATTACK - @Index.Time |
| How Indexes Are Updated |
| SecureUser |
| VERBatim - V25 |
| @ATTACK - @Files.System |
| Advanced Revelation Initialisation Sequence (Overview) by Mike Pope |
| REVMEDIA Revisted |
| Reader's Clinic - Screen Width |
| Screen Grabber |
| Reader's Clinic - Slow Multivalued Screen Display |
| Utility Diskette # 4 |
| Reader's Clinic - Functions and Subroutines |
| Argument passing - Subroutines and Functions - Mike Pope |
| Reader's Clinic - Functions and Subroutines |
| Reader's Letters - Jim Owen |
| Playing with Scan Codes |
| Argument passing - Subroutines and Functions - Mike Pope |
| VERBatim - V119 |
| VERBatim - V125 |
| VERBatim - V118 |
| Advanced Revelation Assembler Interface Module - Yves Pattyn, Technical Manager, Distribase, France |
| QTIPS - DOSTime |
| VERBatim - V11 |
| @ATTACK - @Backgrnd.Time |
| @ATTACK - @Index.Time |
| QTIPS - Time-outs in Windows |
| @ATTACK - @CrtHigh |
| @ATTACK - @CrtMaxHigh |
| A RevTechie Replies - And Miscellaneous Jottings - Mike Pope - Revelation Technologies (UK) Ltd |
| QTIPS - Inconsistent @Variable Behaviour |
| Viewer |
| VERBatim - V65 |
| QTIPS - Using INIT.VIEW with Printers |
| REVMEDIA Revisited |
| QTIPS - Sub-Headings in RLIST (Revisited) |
| Reader's Clinic - Template Name at Pre-Init |
| Video Control |
RevMedia FKB
| Document | V4I3A5 |
| Title | Video Control |
| Keywords | VIDEO VCARD GET_VID_INFO VIDEOCONFIG VIDCTRL @CTRHIGH @CTRMAXHIGH INIT.STATUS VIDEO.RW |
| Text | WITH the advent of more sophisticated video control (with 43 and 50 line support) and WITH yet more sophistication to come (with the rumoured 132 column support) it is instructive to examine the system routines and control records provided for the manipulation of the video screen One thing that it is timeous to point out is that whilst some of these routines (such as VCARD) provide information that is accessible elsewhere the use of CALLS to standardised routines (such as GET_VID_INFO) is encouraged by RevTI as it permits the construction of software "black boxes" which can be radically changed on the inside without CHANGING the result returned to the calling program VIDEOCONFIG There is a record in the SYSTEM file which contains the setup information required when configuring the video mode It has five multi valued fields as follows < 1 > Video Mode this is the numeric value used by VIDCTRL (q v ) when resetting the video mode < 2 > Description of the video mode < 3 > Screen width in this mode < 4 > Screen depth in this mode < 5 > Type of card mode will work WITH SETTING a VGA card to an EGA mode and vice versa does not work This value records the kind of video card (as returned by VCARD (q v ) which the video mode is designed for VCARD Called subroutine taking (and returning) one parameter the kind of video card installed CALLING syntax is X = "" ; CALL VCARD(X) Types identified in Technical Bulletin 74 are 0 MDA 1 CGA 2 EGA 3 PGA 4 VGA 5 MCGA 6 Unknown GET_VID_INFO This is a function taking one parameter the branch returning a result of the information being asked for The branches and returned results are as follows 1 Video mode 0 Normal text mode 1 25 line EGA Mode 2 43 line EGA mode 3 25 line VGA mode 4 43 line VGA mode 5 50 line VGA mode 6 16 line VGA mode 2 CRT Width 3 CRT Height 4 Video Card type same as results of VCARD 5 Unknown always returns 0 on test machine 6 Starting address of Video RAM returned as a two byte number in low byte high byte order Normally this would return CHAR(0) : CHAR(184) in other words (0 + 256 * 184) = 47104=B800 VIDCTRL This assembler subroutine controls the video SETTING of the screen and can be used to "flip" modes in real time It takes 5 parameters of which only the first two and the last one seem to be used As it is an assembler routine it is difficult to be able to state WITH any confidence exactly what all CALLS do however there seem to be three major kinds of call WITH each kind taking a specific action modifier The CALLING sequence is therefore VidCtrl( Action Mode UK1 UK2 Flag) where Action Is the action to take having the value of the video card type for modes 0 and 2 and the video mode to change to for mode 1 Mode Is the type of operation to be performed 0 RESET video card to default settings 1 Change video mode 2 Possibly initialise card does not seem to be required UK Unknown Flag Result of operation Using this routine permits the programmer to RESET the screen into an alternative video mode Note that when this is done there are several caveats to be aware of : CHANGING the screen size necessitates the CHANGING of the status line location This is done by resetting @CRTHIGH and @CRTMAXHIGH to the appropriate size and the CALLING the system routine INIT STATUS When video modes change the screen is left blank A background must therefore be filled in USING Video RW In the CODE that follows the default BACKGROUND of \B01B\ is used If you do not use the default and you wish to construct a generic routine you will have to EXTRACT the correct settings FROM the ENVIRONMENT As mentioned in the discussion of VIDEOCONFIG certain video modes do not work WITH certain video cards The PROGRAM following makes no allowance for this but for genericism it could be coded to check the CURRENT video card against the requested mode by examining the VIDEOCONFIG record As we wish to return to the normal status line when leaving the temporarily chosen mode it is necessary to CAPTURE the screen IMAGE before the new mode is invoked and restore this image upon return The code following represents a generic routine for CALLING a WINDOW FROM a menu and having that window appear in a non default video mode It may be called DIRECTLY as a subroutine or via CATALYST USING * to separate the arguments The ARGUMENTS are the window NAME and the mode to use The mode can be the number or the text equivalent Subroutine Call_Window(Window Mode) Declare Subroutine VidCtrl Catalyst Video Rw Declare Function GUAR_ASSIGN Get_Vid_Info Mode = Guar_Assign(Mode) If Index(Window "*" 1) Then Mode = Window[ 1 "B*"] Window = Window[1 "*"] End VidCard = "" ; Call VCard(VidCard) ModeNums = "0 1 2 3 4 5 6" NAMES = "TEXT EGA25 EGA43 VGA25 VGA45 VGA50 VGA16" ModeHigh = "25 25 43 25 45 50 16" GoSub Save LOCATE Mode In ModeNums USING " " SETTING Pos Then DoIt = 1 End Else Locate Mode In NAMES USING " " SETTING Pos Then DoIt = 1 End End If DoIt Then GoSub SetUp Catalyst("W" Window) GoSub Restore End Return SetUp: Flag = "" ; VidCtrl(VidCard 0 "" "" Flag) Flag = "" VidCtrl(Field(ModeNums " " Pos) 1 "" "" Flag) @CRTMAXHIGH = Field(ModeHigh " " Pos) @CrtHigh = @CrtMaxHigh Video RW(0 0 (@CrtWide 1) (@CrtHigh 1) "C" \B01B\) Call Init Status Return Save: SaveMode = Get_Vid_Info(1) SaveHigh = @CrtHigh SaveMaxHigh = @CrtMaxHigh Video RW(0 0 @CRTWIDE 1 @CrtMaxHigh 1 "R" Image) Return Restore: Flag = "" ; VidCtrl(VidCard 0 "" "" Flag) Flag = "" ; VidCtrl(SaveMode 1 "" "" Flag) @CrtMaxHigh = SaveMaxHigh @CrtHigh = SaveHigh Call Init Status Video RW(0 0 @CrtWide 1 @CrtMaxHigh 1 "W" Image) Return (Volume 4 Issue 3 Pages 8 10) |
Page last modified: 31/01/03