home *** CD-ROM | disk | FTP | other *** search
/ C++ Games Programming / CPPGAMES.ISO / fgl / fglight / manuals.arj / USERAPP.DOC < prev   
Text File  |  1995-02-06  |  84KB  |  1,611 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7. Appendix A
  8.  
  9.  
  10.  
  11.  
  12.  
  13. Fastgraph Utilities                                                            
  14. 356   Fastgraph User's Guide
  15.  
  16.  
  17. Overview
  18.  
  19.      This appendix describes the utility programs supplied with Fastgraph. By
  20. default, the Fastgraph installation procedure places these utilities in the
  21. \FG directory. To use these utilities, you must either (1) copy the EXE file
  22. from \FG to your current directory, (2) make \FG your current directory, or
  23. (3) include the \FG directory in your DOS path specification.
  24.  
  25.  
  26. SNAPSHOT Utility
  27.  
  28.      The SNAPSHOT utility is a terminate and stay resident program (TSR) to
  29. capture graphic images. It stores the image in Fastgraph's standard pixel run
  30. (SPR) format. To load SNAPSHOT, just enter the command SNAPSHOT at the DOS
  31. prompt, and you'll see messages similar to the following if SNAPSHOT loads
  32. successfully.
  33.  
  34.  
  35.          C> SNAPSHOT
  36.  
  37.          SNAPSHOT  Version 1.04
  38.          Copyright (c) 1993 Ted Gruber Software.  All Rights Reserved.
  39.  
  40.          Press <alt>-<left shift> to activate.
  41.  
  42.  
  43.      After SNAPSHOT loads, control returns to the DOS prompt. At this point,
  44. you can use any method whatsoever to display a graphic image and then press
  45. the Alt and left shift keys at the same time to capture the image. You don't
  46. need to load SNAPSHOT for each image capture, just once per system boot.
  47. SNAPSHOT uses about 24,000 bytes of conventional memory once loaded.
  48.  
  49.      To illustrate the use of SNAPSHOT, suppose you have drawn and saved an
  50. image with a commercial paint program, and you want to incorporate this image
  51. into a Fastgraph application. Once you load SNAPSHOT, start the paint program
  52. and retrieve your image. Then press the Alt and left shift keys simultaneously
  53. and wait for the success tone (three quick medium-pitched sounds). Finally,
  54. exit the paint program to return to the DOS prompt.
  55.  
  56.      The sequence described in the preceding paragraph will store the captured
  57. image in Fastgraph's standard pixel run format, in a file named SNAPSHOT.nnn
  58. in the current directory. The file type nnn will be the first sequence of
  59. digits that does not result in a duplicate file name. That is, if there are no
  60. captured image files in the current directory, SNAPSHOT will use the file name
  61. SNAPSHOT.000. The next time you capture an image, SNAPSHOT will store it in
  62. SNAPSHOT.001, then SNAPSHOT.002, and so forth. If you rename or delete one of
  63. these files, SNAPSHOT will again use that file name. For example, if you
  64. delete SNAPSHOT.000 but keep SNAPSHOT.001, SNAPSHOT will store the next image
  65. it captures in SNAPSHOT.000.
  66.  
  67.      If SNAPSHOT is unable to capture the image, it will produce its error
  68. tone (a single low-pitched sound). The most common cause of this is trying to
  69. capture an image from a text video mode, but it also will occur if there is
  70. not enough disk space or if all 1,000 image file names are already being used. 
  71.                                         Appendix A:  Fastgraph Utilities   357
  72.  
  73.  
  74. CLIP Utility
  75.  
  76.      The SNAPSHOT utility described in the previous section captures the
  77. entire screen. While this might be desirable in some cases, other times you'll
  78. just need a portion of the screen. CLIP is an interactive utility that you can
  79. use to reduce the size of any image stored in Fastgraph's standard or packed
  80. pixel run format. The syntax of the command for invoking the CLIP utility from
  81. the DOS prompt is
  82.  
  83.                       CLIP input_file output_file options
  84.  
  85. where input_file is the name of the original image file, and output_file is
  86. the name of the new image file. CLIP does not modify the input_file in any
  87. way, but it will overwrite the output_file if an identically named file exists
  88. in the current directory. The options list specifies one or more optional
  89. switches as shown here:
  90.  
  91. option         meaning
  92.  
  93. /M:mode   Specifies the video mode number in which to display the image. The
  94.           mode value must be an integer between 0 and 29. If that video mode
  95.           is a text mode, an unsupported graphics mode, or an unavailable
  96.           graphics mode, CLIP displays an error message stating this. If the
  97.           /M switch is not present, CLIP uses the first available video mode
  98.           from the list 18, 16, 15, 19, 13, 9, 4, 12.
  99.  
  100. /P        Indicates the input_file is in Fastgraph's packed pixel run format.
  101.           If the /P switch is not present, CLIP assumes it is in standard
  102.           pixel run format. The output_file will be in the same format as the
  103.           input_file.
  104.  
  105. /W:width  Specifies the image width in pixels. The width value must be an
  106.           integer between 1 and the horizontal resolution of the selected
  107.           video mode. If the /W switch is not present, CLIP uses the
  108.           horizontal resolution of the selected video mode.
  109.  
  110. For example, if you wanted to create the image file PARTIAL.PPR from the
  111. packed pixel run file SCREEN.PPR, and use the native 320x200 EGA graphics
  112. video mode (mode 13), you would start CLIP with the following command.
  113.  
  114.                      CLIP PARTIAL.PPR SCREEN.PPR /P /M:13
  115.  
  116. Because no /W switch appears in the above command and the horizontal
  117. resolution of mode 13 is 320 pixels, CLIP assumes the image width is 320
  118. pixels.
  119.  
  120.      When CLIP displays the image and the plus-shaped cursor, you are ready to
  121. define one corner of the clipping region (that part of the image used to
  122. create the output_file). To do this, use the directional keys on the numeric
  123. keypad to move the cursor to the desired position, then press the Enter key.
  124. You are then ready to define the clipping region's opposite corner. Again, use
  125. the directional keys to move the cursor to the desired position. When defining
  126. the second corner, however, CLIP uses a rectangular box instead of the plus-
  127. shaped cursor to simplify marking the clipping region's boundaries. After you
  128. press Enter to define the second corner, CLIP creates the output_file and      
  129. 358   Fastgraph User's Guide
  130.  
  131. displays the resulting image width and the number of pixel runs the image
  132. contains.
  133.  
  134.      CLIP includes other features to help define the clipping region. You can
  135. change the distance the cursor moves in response to the directional keys,
  136. display the current (x,y) pixel coordinates of the cursor, and change the
  137. cursor color. The following table explains the keystrokes that CLIP recognizes
  138. when you are defining the clipping region.
  139.  
  140. key       meaning
  141.  
  142. F1        Displays the (x,y) coordinate bar at the top of the screen. If the
  143.           coordinate bar is already on, F1 removes it.
  144. F2        Displays the (x,y) coordinate bar at the bottom of the screen. If
  145.           the coordinate bar is already on, F2 removes it.
  146. F3        Changes the cursor or box color from white to black, or from black
  147.           to white.
  148. F4        Displays a summary of the keys CLIP recognizes when defining the
  149.           clipping region.
  150. KP1       Moves the cursor one unit down and to the left.
  151. KP2       Moves the cursor one unit down.
  152. KP3       Moves the cursor one unit down and to the right.
  153. KP4       Moves the cursor one unit to the left.
  154. KP6       Moves the cursor one unit to the right.
  155. KP7       Moves the cursor one unit up and to the left.
  156. KP8       Moves the cursor one unit up.
  157. KP9       Moves the cursor one unit up and to the right.
  158. +         Increases the unit of cursor movement by one pixel. The default
  159.           cursor movement is one pixel.
  160. -         Decreases the unit of cursor movement by one pixel.
  161. Enter     Defines a corner of the clipping region at the cursor position.
  162. Esc       Exits to DOS without creating the output_file. CLIP will first issue
  163.           an "Exit to DOS?" prompt in case you pressed the Esc key
  164.           accidentally.
  165.  
  166.  
  167. CONVERT Utility
  168.  
  169.      The CONVERT utility lets you translate files between Fastgraph's SPR and
  170. PPR image file formats. The syntax of the command for invoking CONVERT from
  171. the DOS prompt is
  172.  
  173.                         CONVERT input_file output_file
  174.  
  175. where input_file is the name of the original image file, and output_file is
  176. the name of the new translated image file. CONVERT does not modify the
  177. input_file in any way, but it will overwrite the output_file if an identically
  178. named file exists in the current directory.
  179.  
  180.      By default, the file type of the input_file and output_file determine the
  181. image format of that file. If the file type is PPR, CONVERT assumes the image
  182. is in Fastgraph's packed pixel run format. If the file type is SPR, CONVERT
  183. assumes it is in the Fastgraph's standard pixel run format. If your image
  184. files use other file types, you can explicitly specify the file's image format
  185. by appending one of the switches /PPR or /SPR to the file name. The input_file 
  186.                                         Appendix A:  Fastgraph Utilities   359
  187.  
  188. and output_file must not both specify the same image format (CONVERT will
  189. display an error message if this is so).
  190.  
  191.      The following command will translate the standard pixel run file
  192. PICTURE.SPR to packed format. The packed image will be stored in the file
  193. PICTURE.IMG, so we must append the switch /PPR to tell CONVERT that it will be
  194. a packed file.
  195.  
  196.                       CONVERT PICTURE.SPR PICTURE.IMG/PPR
  197.  
  198.  
  199. EDITSPR Utility
  200.  
  201.      The EDITSPR utility changes all pixel runs of one color to another color
  202. in an image file stored in Fastgraph's standard pixel run (SPR) format. The
  203. syntax of the command for invoking the EDITSPR utility from the DOS command
  204. prompt is
  205.  
  206.                         EDITSPR input_file output_file
  207.  
  208. where input_file is the name of the original image file, and output_file is
  209. the name of the new image file. EDITSPR does not modify the input_file in any
  210. way, but it will overwrite the output_file if an identically named file exists
  211. in the current directory.
  212.  
  213.      After it reads the pixel runs from the input_file, EDITSPR will perform
  214. the requested color changes. It does this iteratively by asking for an old
  215. color value followed by a new color value (each value must be between 0 and
  216. 255). EDITSPR then finds the pixel runs of the old color value and changes
  217. them to the new color value. Following this, EDITSPR displays a message
  218. stating how many pixel runs it changed. This process repeats until you enter a
  219. negative number for either color value.
  220.  
  221.      EDITSPR will next combine adjacent pixel runs of like colors. For
  222. example, suppose the original image file contained a color 1 pixel run of
  223. length 50, followed by a color 2 pixel run of length 20, followed by another
  224. color 1 pixel run of length 10. If you changed all color 2 pixel runs to color
  225. 1, EDITSPR will combine these three pixel runs into a single run of length 80.
  226.  
  227.  
  228. GrabRGB Utility
  229.  
  230.      The GrabRGB utility is a terminate and stay resident program (TSR) to
  231. capture the current red, green, and blue color components of video DAC
  232. registers in 256-color graphics modes. You can use GrabRGB together with
  233. Fastgraph's SNAPSHOT utility to preserve the original colors of a captured
  234. image.
  235.  
  236.      To load GrabRGB, just enter the command GRABRGB at the DOS prompt. After
  237. GrabRGB loads, control returns to the DOS prompt. At this point, you can use
  238. any method whatsoever to display a 256-color graphic image and then press the
  239. Alt and right shift keys at the same time to capture the current DAC values.
  240. You don't need to load GrabRGB for each image, just once per system boot.
  241. GrabRGB uses about 28,000 bytes of conventional memory once loaded.            
  242. 360   Fastgraph User's Guide
  243.  
  244.      To illustrate the use of GrabRGB, suppose you have drawn and saved a 256-
  245. color image with a commercial paint program, and you want to incorporate this
  246. image into a Fastgraph application. Once you load SNAPSHOT and GrabRGB, start
  247. the paint program and retrieve your image. Then press the Alt and left shift
  248. keys to capture the image with SNAPSHOT. After SNAPSHOT's success tone (three
  249. quick medium-pitched sounds), press Alt and right shift to capture the RGB
  250. components of each DAC register with GrabRGB, and wait for GrabRGB's success
  251. tone. Finally, exit the paint program and return to the DOS prompt.
  252.  
  253.      The sequence described in the preceding paragraph will write the RGB
  254. color components for each DAC register to a file named GRABRGB.nnn in the
  255. current directory. The file type nnn will be the first sequence of digits that
  256. does not result in a duplicate file name. That is, if there are no GrabRGB
  257. output files in the current directory, GrabRGB will use the file name
  258. GRABRGB.000. The next time you use GrabRGB, it will store the RGB information
  259. in GRABRGB.001, then GRABRGB.002, and so forth. If you rename or delete one of
  260. these files, GrabRGB will again use that file name. For example, if you delete
  261. GRABRGB.000 but keep GRABRGB.001, GrabRGB will next use the file name
  262. GRABRGB.000.
  263.  
  264.      If GrabRGB is unable to obtain the RGB components of each DAC register,
  265. it will produce its error tone (a single low-pitched sound). The most common
  266. cause of this is trying to capture an image from a text video mode, or from a
  267. graphics video mode with fewer than 256 colors. It also will occur if there is
  268. not enough disk space or if all 1,000 output file names are already being
  269. used.
  270.  
  271.      Each line in the output file created by GrabRGB is of the form
  272.  
  273.                                  nnn,rr,gg,bb,
  274.  
  275. where nnn is a DAC register index (between 0 and 255), rr is the red component
  276. of that DAC register, gg is the green component, and bb is the blue component.
  277. Each color component is between 0 and 63. You can edit and reformat these
  278. lines as necessary for inclusion in a C or C++ initializer list, a BASIC or
  279. FORTRAN data statement, or a Pascal array-type constant list. Such an array of
  280. RGB components, but without the nnn indices, is in the format expected by
  281. fg_setdacs.
  282.  
  283.      By default, GrabRGB captures information for all 256 DAC registers. If
  284. you want to consider only the DAC registers with color components different
  285. from their default values, just include the /D option when you load GrabRGB
  286. (that is, use the command GRABRGB /D). If you specify the /D option and all
  287. 256 DACs use their default values, the output file will contain a message
  288. stating this.
  289.  
  290.  
  291. HERCFIX Utility
  292.  
  293.      The HERCFIX utility allows you to use SNAPSHOT (and possibly other TSRs)
  294. with programs that do not update the BIOS data area when establishing the
  295. 720x348 Hercules graphics mode. If you use SNAPSHOT with such a program, it
  296. will think the monochrome text mode (video mode 7) is active and will produce
  297. its low-pitched error tone when activated.                                     
  298.                                         Appendix A:  Fastgraph Utilities   361
  299.  
  300.      If this occurs, use HERCFIX to load the application from which you are
  301. trying to capture the image. To do this, enter
  302.  
  303.                                 HERCFIX command
  304.  
  305. at the DOS prompt, where command is the command that starts the application.
  306. For example, suppose you use the command PAINTER /H to run a commercial paint
  307. program in Hercules graphics mode. To load the paint program with HERCFIX, you
  308. would enter the command HERCFIX PAINTER /H.
  309.  
  310.  
  311. PCXHEAD Utility
  312.  
  313.      The PCXHEAD utility displays the most important information from the
  314. header of a PCX file. This consists of the PCX version number, the number of
  315. bits per pixel, the number of bit planes, the scan line width, and the image
  316. dimensions and screen position. It also proposes the optimal video mode for
  317. displaying the PCX file. By optimal, we mean the compatible video mode having
  318. the lowest resolution larger than or equal to the image dimensions. For 256-
  319. color PCX images, PCXHEAD displays the extended color palette if one is
  320. present.
  321.  
  322.      The syntax of the command for invoking the PCXHEAD utility from the DOS
  323. command prompt is
  324.  
  325.                                PCXHEAD pcx_file
  326.  
  327. where pcx_file is the name of the PCX file to examine. PCXHEAD does not modify
  328. the pcx_file in any way. If the PCX file includes an extended color palette,
  329. you may prefer to direct the PCXHEAD output to a file using the DOS
  330. redirection operator (>).                                                      
  331. 362   Fastgraph User's Guide                                                   
  332.  
  333.  
  334.  
  335.  
  336.  
  337. Appendix B
  338.  
  339.  
  340.  
  341.  
  342.  
  343. Using Fastgraph
  344. from Assembly Language                                                         
  345. 364   Fastgraph User's Guide
  346.  
  347.  
  348.      The information in this appendix provides information about calling
  349. Fastgraph routines from assembly language programs. It is not intended to be a
  350. complete tutorial on the subject, but it should provide experienced assembly
  351. language programmers with enough details to call Fastgraph routines in their
  352. applications.
  353.  
  354.      Fastgraph uses the same naming and stack-based calling conventions used
  355. by Borland, Microsoft, and other companies in their C and C++ compilers. The
  356. details of these conventions important to assembly language programming are
  357. summarized below. If you're calling Fastgraph routines from an assembly
  358. language program, the program must follow these conventions.
  359.  
  360.            *   All arrays and pointers are passed by reference.
  361.            *   All other items are passed by value.
  362.            *   Arguments are pushed onto the stack in reverse
  363.                order.
  364.            *   The calling program is responsible for removing
  365.                the arguments from the stack.
  366.            *   16-bit function values are returned in the AX
  367.                register.
  368.            *   32-bit function values are returned in the DX:AX
  369.                register pair in 16-bit environments, or the EAX
  370.                register in 32-bit environments.
  371.            *   Fastgraph routine names are prefixed with an
  372.                underscore.
  373.  
  374. The small and medium model real mode Fastgraph libraries pass arrays and
  375. pointers by near reference (an offset into DGROUP), while the large model and
  376. 16-bit protected mode libraries do so by far reference (a segment:offset or
  377. selector:offset pair). The 32-bit protected mode libraries use a flat model
  378. architecture, meaning arrays and pointers are passed as 32-bit offsets into
  379. DGROUP. This is consistent with the conventions and run-time libraries for the
  380. supported compilers.
  381.  
  382.      All Fastgraph routines preserve the (E)BP, (E)DI, (E)SI, and DS
  383. registers. In the 32-bit protected mode libraries, the EBX and ES registers
  384. are also preserved. The contents of any other registers are unknown upon
  385. return from a Fastgraph routine (except for the (E)AX register, which will
  386. either contain zero or the routine's return value).
  387.  
  388.      Example B-1 calls fg_getmode, fg_setmode, fg_reset, and fg_version from
  389. an assembly language program. The fg_getmode routine returns its function
  390. value in the (E)AX register. The fg_setmode routine has a single argument,
  391. while fg_reset has no arguments. The fg_version routine has two arguments,
  392. both passed by reference. Notice how they are pushed on the stack in reverse
  393. order. This example is written for the medium memory model. To make it work
  394. with the large model libraries, add 8 instead of 4 to the (E)SP register
  395. following the call to fg_version (because large model items passed by
  396. reference are 32-bit segmented values). To make it work with the small model
  397. library, change the word "far" to "near" in the EXTRN declarations, and change
  398. the name of the code segment from "main_TEXT" to "_TEXT".
  399.  
  400.      This example is in the file BB-01.ASM in the \FG\EXAMPLES directory. The
  401. following commands show how to use MASM or TASM to assemble this program and
  402. link it with the medium model real mode Fastgraph library.                     
  403.                      Appendix B:  Using Fastgraph from Assembly Language   365
  404.  
  405.  
  406.      Microsoft Macro Assembler (MASM) version 5:
  407.           MASM BB-01.ASM;
  408.           LINK /CP:4096 BB-01,,NUL,FGM;
  409.  
  410.      Microsoft Macro Assembler (MASM) version 6:
  411.           ML /c /Cx /Zm BB-01.ASM
  412.           LINK /CP:4096 BB-01,,NUL,FGM;
  413.  
  414.      Turbo Assembler (TASM):
  415.           TASM BB-01.ASM
  416.           TLINK BB-01.OBJ FGM.LIB
  417.  
  418.                                  Example B-1.
  419.  
  420.                 EXTRN   _fg_getmode:far  ; Fastgraph's GETMODE routine
  421.                 EXTRN   _fg_reset:far    ; Fastgraph's RESET routine
  422.                 EXTRN   _fg_setmode:far  ; Fastgraph's SETMODE routine
  423.                 EXTRN   _fg_version:far  ; Fastgraph's VERSION routine
  424.  
  425.       stackseg  SEGMENT stack
  426.                 db      1024 dup (?)  ; use a 1K stack
  427.       stackseg  ENDS
  428.  
  429.       _DATA     SEGMENT word public 'DATA'
  430.       major     dw      ?             ; major version number
  431.       minor     dw      ?             ; minor version number
  432.       old_mode  dw      ?             ; original video mode
  433.       _DATA     ENDS
  434.  
  435.       dgroup    GROUP   _DATA
  436.                 ASSUME  cs:main_TEXT,ds:dgroup
  437.  
  438.       main_TEXT SEGMENT byte public 'CODE'
  439.  
  440.       start:    mov     ax,_DATA      ; load segment location
  441.                 mov     ds,ax         ; into DS register
  442.  
  443.                 call    _fg_getmode   ; AX = current video mode
  444.                 mov     old_mode,ax   ; save it
  445.  
  446.                 mov     ax,4          ; use video mode 4
  447.                 push    ax            ; pass argument fg_setmode
  448.                 call    _fg_setmode   ; establish CGA four-color mode
  449.                 add     sp,2          ; remove fg_setmode argument
  450.  
  451.                 push    old_mode      ; pass argument to fg_setmode
  452.                 call    _fg_setmode   ; restore original video mode
  453.                 add     sp,2          ; remove fg_setmode argument
  454.  
  455.                 call    _fg_reset     ; restore screen attributes
  456.  
  457.                 lea     ax,minor      ; get address of minor variable
  458.                 push    ax            ; pass argument #2 to fg_version
  459.                 lea     ax,major      ; get address of major variable
  460.                 push    ax            ; pass argument #1 to fg_version         
  461. 366   Fastgraph User's Guide
  462.  
  463.                 call    _fg_version   ; get the Fastgraph version number
  464.                 add     sp,4          ; remove fg_version arguments
  465.  
  466.                 mov     ah,76         ; function 76: terminate process
  467.                 xor     al,al         ; errorlevel 0
  468.                 int     21h           ; exit to DOS
  469.  
  470.       main_TEXT ENDS
  471.                 END     start                                                  
  472.  
  473.  
  474.  
  475.  
  476.  
  477.  
  478. Appendix C
  479.  
  480.  
  481.  
  482.  
  483.  
  484. Interrupts and Fastgraph                                                       
  485. 368   Fastgraph User's Guide
  486.  
  487.  
  488. Interrupts Used by Fastgraph
  489.  
  490.      DOS maintains an interrupt vector table where it stores the addresses of
  491. 256 interrupt handlers, or routines, that perform various functions. The
  492. handlers are usually referenced by their hexadecimal interrupt number, between
  493. 00 and FF. Of these, only interrupts 60 through 66 and F1 through FF are not
  494. used by DOS, the ROM BIOS, or other software and are thus available for user
  495. applications.
  496.  
  497.      Certain Fastgraph routines use some of the available interrupts. All
  498. Fastgraph/Light routines use interrupt 62. In addition, Fastgraph's low-level
  499. keyboard handler replaces interrupt 09. If your program defines its own
  500. interrupt handlers, it must not use any interrupts reserved for Fastgraph
  501. (unless, of course, it doesn't use any Fastgraph routines that would create a
  502. conflict).
  503.  
  504.  
  505. Extending the Time-of-Day Interrupt
  506.  
  507.      As mentioned in Chapter 16, the BIOS time-of-day clock is incremented by
  508. an interrupt handler. The routine that does this is interrupt 08, a hardware
  509. interrupt automatically activated 18.2 times per second. After incrementing
  510. the clock, interrupt 08 invokes interrupt 1C, which by default references a
  511. "do-nothing" interrupt handler. While changing interrupt 08 can be tricky, it
  512. is fairly straightforward to define our own handler for interrupt 1C. This
  513. handler also will be executed automatically 18.2 times per second. Example C-1
  514. illustrates how to do this.
  515.  
  516.      When we discussed joysticks in Chapter 14, we said there were two ways to
  517. monitor joystick button status. One is to intersperse calls to fg_button at
  518. strategic places in your program and then take necessary action depending on
  519. the button status. However, the problem with this scheme is the chance of
  520. missing a button press -- if you press the joystick button and then release it
  521. between calls to fg_button, the program will not detect the joystick activity.
  522. A preferable method is to call fg_button from a handler for interrupt 1C,
  523. which essentially provides continuous monitoring of the joystick buttons. When
  524. we need the button status within our program, all we need to do is examine a
  525. global variable.
  526.  
  527.      Example C-1 consists of a main program (written in C) and an assembly
  528. language subroutine named int1C (suitable for the real mode medium memory
  529. model). The main program calls int1C to define a handler for interrupt 1C. In
  530. response to any keystroke (except Escape), the program displays the button
  531. press information for each joystick since the previous keystroke (refer to the
  532. discussion of fg_button for the meanings of the status values). When you press
  533. the Escape key, the program exits to DOS, but not before calling int1C to
  534. restore the original interrupt 1C handler.
  535.  
  536.                           Example C-1 (main program).
  537.  
  538.                #include <fastgraf.h>
  539.                #include <stdio.h>
  540.                void main(void);
  541.  
  542.                #define ESC 27                                                  
  543.                                    Appendix C:  Interrupts and Fastgraph   369
  544.  
  545.  
  546.                int status1, status2;
  547.  
  548.                void main()
  549.                {
  550.                   unsigned char key, aux;
  551.  
  552.                   int1C(1);
  553.  
  554.                   status1 = 0;
  555.                   status2 = 0;
  556.  
  557.                   do {
  558.                      printf("\n");
  559.                      printf("Joystick 1 status: %d\n",status1);
  560.                      printf("Joystick 2 status: %d\n",status2);
  561.                      status1 = 0;
  562.                      status2 = 0;
  563.                      fg_getkey(&key,&aux);
  564.                      }
  565.                   while (key != ESC);
  566.  
  567.                   int1C(0);
  568.                }
  569.  
  570.  
  571.      We'll now examine the int1C assembly language subroutine. It actually
  572. consists of three parts: a portion to enable our interrupt handler, our
  573. handler itself, and a portion to disable the handler. When we call int1C with
  574. a nonzero argument, it saves the original data segment (so we can access the
  575. global variables within the handler), saves the original handler's address
  576. (called the vector) for interrupt 1C, and then enables our handler, which
  577. takes the form of a far procedure.
  578.  
  579.      The handler routine then begins to be activated 18.2 times per second.
  580. After saving all the important registers, the handler calls the Fastgraph
  581. routine fg_button twice, once for each joystick. The return values are
  582. logically ORed with the status1 and status2 C global variables to update the
  583. button status information. Finally, the handler restores the original
  584. registers and returns control to the point of the interrupt.
  585.  
  586.      Before the main program exits, it calls int1C with a zero argument to
  587. restore the original handler for interrupt 1C. No provision is made in the
  588. program to check if we had previously defined our own handler (and hence saved
  589. the original interrupt 1C vector), but this could be added with little
  590. difficulty.
  591.  
  592.                   Example C-1 (assembly language subroutine).
  593.  
  594.            EXTRN   _status1:word ; C global variable for button 1 status
  595.            EXTRN   _status2:word ; C global variable for button 2 status
  596.            EXTRN   _fg_button:far ; Fastgraph routine
  597.  
  598. int1C_TEXT SEGMENT byte public 'CODE'
  599.            ASSUME  cs:int1C_TEXT                                               
  600. 370   Fastgraph User's Guide
  601.  
  602. int1C_CS   dw      ?             ; holds original INT 1C segment address
  603. int1C_IP   dw      ?             ; holds original INT 1C offset
  604. orig_DS    dw      ?             ; holds original data segment
  605.  
  606. _int1C     PROC    far
  607.            PUBLIC  _int1C
  608.  
  609.            push    bp            ; save caller's BP register
  610.            mov     bp,sp         ; make BP point to argument list
  611.            push    si            ; save caller's SI register
  612.            push    di            ; save caller's DI register
  613.  
  614.            mov     dx,[bp+6]     ; get the flag parameter
  615.            or      dx,dx         ; replace the old interrupt handler?
  616.            jz      replace       ; yes, branch to that processing
  617.  
  618. ; define a new handler for INT 1C
  619.  
  620. define:    mov     ax,ds         ; put current data segment in AX
  621.            mov     cs:orig_DS,ax ; save it in the control information area
  622.  
  623.            mov     al,1Ch        ; interrupt vector to save
  624.            mov     ah,53         ; function 53: get interrupt vector
  625.            int     21h           ; get the interrupt vector
  626.            mov     cs:int1C_CS,es; save the segment
  627.            mov     cs:int1C_IP,bx; save the offset
  628.  
  629.            push    ds            ; save our DS register
  630.            mov     dx,offset handler ; get offset of interrupt handler
  631.            mov     ax,seg handler; get segment of interrupt handler
  632.            mov     ds,ax         ; put it in DS
  633.            mov     al,1Ch        ; interrupt vector to change
  634.            mov     ah,37         ; function 37: set interrupt vector
  635.            int     21h           ; change the INT 1C vector to our handler
  636.            pop     ds            ; restore our DS register
  637.  
  638.            jmp     short return  ; return to the caller
  639.  
  640. ; replace the original handler for INT 1C
  641.  
  642. replace:   push    ds            ; save our DS register
  643.            mov     dx,cs:int1C_IP; put original INT 1C offset in DX
  644.            mov     ds,cs:int1C_CS; put original INT 1C segment in DS
  645.            mov     ah,37         ; function 37: set interrupt vector
  646.            mov     al,1Ch        ; interrupt vector 1C
  647.            int     21h           ; restore original INT 1C vector
  648.            pop     ds            ; restore our DS register
  649.  
  650. return:    xor     ax,ax         ; in case int1C was called as a function
  651.            pop     di            ; restore our DI register
  652.            pop     si            ; restore our SI register
  653.            pop     bp            ; restore our BP register
  654.            ret
  655.  
  656. _int1C     ENDP                                                                
  657.                                    Appendix C:  Interrupts and Fastgraph   371
  658.  
  659.  
  660. handler    PROC    far           ; interrupt handler that replaces INT 1C
  661.  
  662.            cli                   ; disable interrupts while handler active
  663.            push    ax            ; save registers that may be altered
  664.            push    bx
  665.            push    cx
  666.            push    dx
  667.            push    di
  668.            push    si
  669.            push    ds
  670.            push    es
  671.  
  672.            mov     ds,cs:orig_DS ; retrieve the original data segment
  673.  
  674.            mov     ax,1          ; use joystick 1
  675.            push    ax            ; pass joystick number to button routine
  676.            call    _fg_button    ; AX = button status for joystick 1
  677.            add     sp,2          ; remove the argument
  678.            or      _status1,ax   ; update status variable for joystick 1
  679.  
  680.            mov     ax,2          ; use joystick 2
  681.            push    ax            ; pass joystick number to button routine
  682.            call    _fg_button    ; AX = button status for joystick 2
  683.            add     sp,2          ; remove the argument
  684.            or      _status2,ax   ; update status variable for joystick 2
  685.  
  686.            pop     es            ; restore altered registers
  687.            pop     ds
  688.            pop     si
  689.            pop     di
  690.            pop     dx
  691.            pop     cx
  692.            pop     bx
  693.            pop     ax
  694.            iret                  ; return from the interrupt routine
  695.  
  696. handler    ENDP
  697.  
  698. int1C_TEXT ENDS
  699.            END
  700.  
  701.      The example just presented is not meant to be a tutorial on interrupts;
  702. there are many good references on DOS that explain them in detail. However, an
  703. example specific to Fastgraph should be helpful.                               
  704. 372   Fastgraph User's Guide                                                   
  705.  
  706.  
  707.  
  708.  
  709.  
  710. Appendix D
  711.  
  712.  
  713.  
  714.  
  715.  
  716. Contents of the
  717. Compiler-Specific Libraries                                                    
  718. 374   Fastgraph User's Guide
  719.  
  720.  
  721.      For most compilers, Fastgraph provides a compiler-specific library (also
  722. called the auxiliary Fastgraph library) that contains the following routines:
  723.  
  724.      fg_boxw             fg_drawxw           fg_panw             fg_setsize
  725.      fg_boxxw            fg_drectw           fg_pointw           fg_setsizew
  726.      fg_circlew          fg_ellipsew         fg_pointxw          fg_setworld
  727.      fg_circlefw         fg_ellipsfw         fg_polygonw         fg_swchar
  728.      fg_clprectw         fg_floodw           fg_rectw            fg_swlength
  729.      fg_dashrw           fg_getworld         fg_restorew         fg_swtext
  730.      fg_dashw            fg_initw            fg_savew            fg_xscreen
  731.      fg_drawrw           fg_moverw           fg_setangle         fg_xworld
  732.      fg_drawrxw          fg_movew            fg_setclipw         fg_yscreen
  733.      fg_draww            fg_paintw           fg_setratio         fg_yworld
  734.  
  735. These routines use the world space coordinate system, either directly or
  736. internally. None of them are included in Fastgraph/Light.
  737.  
  738.      As mentioned in Chapter 1, if your program uses any of these routines,
  739. you must link it with the general Fastgraph library and the corresponding
  740. auxiliary Fastgraph library. Some compilers, such as Microsoft Visual C++ 32-
  741. bit Edition, Microsoft FORTRAN PowerStation, and Fastgraph's supported BASIC
  742. compilers do not require an auxiliary library because the routines listed
  743. above are included directly in the Fastgraph library for those compilers.      
  744.  
  745.  
  746.  
  747.  
  748.  
  749.  
  750. Appendix E
  751.  
  752.  
  753.  
  754.  
  755.  
  756. Contents of the
  757. Pascal Unit Files                                                              
  758. 376   Fastgraph User's Guide
  759.  
  760.  
  761.      Borland Pascal and Turbo Pascal restrict the total size of all code
  762. segments in a unit file 65,520 bytes. Because the size of Fastgraph's code
  763. exceeds this amount, the Fastgraph functions are split among several unit
  764. files. This appendix lists the contents of each Pascal unit file.
  765.  
  766. Fastgraph routines in FGBITMAP
  767.      fg_clipmap          fg_flpimage         fg_pack             fg_scale
  768.      fg_clipmask         fg_getblock         fg_print            fg_shear
  769.      fg_clpimage         fg_getimage         fg_printc           fg_text
  770.      fg_drawmap          fg_getmap           fg_putblock         fg_textc
  771.      fg_drawmask         fg_imagebuf         fg_putimage         fg_unpack
  772.      fg_drwimage         fg_imagesiz         fg_revimage
  773.      fg_flipmask         fg_invert           fg_revmask
  774.  
  775. Fastgraph routines in FGFLIC
  776.      fg_flicdone         fg_flicmode         fg_flicplay         fg_flicskip
  777.      fg_flichead         fg_flicopen         fg_flicsize         fg_showflic
  778.  
  779. Fastgraph routines in FGGIF
  780.      fg_gifhead          fg_gifpal           fg_makegif          fg_showgif
  781.      fg_gifmode          fg_gifrange
  782.  
  783. Fastgraph routines in FGMISC
  784.      fg_button           fg_kbinit           fg_mousemov         fg_setcaps
  785.      fg_capslock         fg_kblast           fg_mousepos         fg_setnum
  786.      fg_cursor           fg_kbreset          fg_mouseptr         fg_sound
  787.      fg_getclock         fg_kbtest           fg_mousespd         fg_sounds
  788.      fg_getkey           fg_measure          fg_mousevis         fg_suspend
  789.      fg_getxjoy          fg_memavail         fg_music            fg_voice
  790.      fg_getyjoy          fg_mouse256         fg_musicb           fg_voices
  791.      fg_hush             fg_mousebut         fg_numlock          fg_waitfor
  792.      fg_hushnext         fg_mousecur         fg_playing          fg_waitkey
  793.      fg_initjoy          fg_mousefin         fg_quiet
  794.      fg_intjoy           fg_mouseini         fg_resume
  795.      fg_intkey           fg_mouselim         fg_scrlock
  796.  
  797. Fastgraph routines in FGPCX
  798.      fg_loadpcx          fg_pcxhead          fg_pcxpal           fg_showpcx
  799.      fg_makepcx          fg_pcxmode          fg_pcxrange
  800.  
  801. Fastgraph routines in FGPR
  802.      fg_dispfile         fg_displayp         fg_makespr          fg_showspr
  803.      fg_display          fg_makeppr          fg_showppr
  804.  
  805. Fastgraph routines in FGSVGA
  806.      fg_defpages         fg_memory           fg_svgainit         fg_svgaver
  807.      fg_getbanks         fg_setbanks         fg_svgastat
  808.  
  809. Fastgraph routines in FGVB
  810.      fg_vbaddr           fg_vbcut            fg_vbinit           fg_vbundef
  811.      fg_vballoc          fg_vbdefine         fg_vbopen
  812.      fg_vbclose          fg_vbfree           fg_vbpaste
  813.      fg_vbcopy           fg_vbhandle         fg_vbtcxfer                       
  814.                           Appendix E:  Contents of the Pascal Unit FIles   377
  815.  
  816. The world space routines listed in Appendix D are in the FGWORLD unit. Any
  817. other Fastgraph routine NOT listed in this appendix is in the FGMAIN unit.
  818.  
  819. As mentioned in Chapter 1, Pascal programs must include a uses statement
  820. listing all units referenced in the program. The fgmain unit is always
  821. required in all programs, as is the WinAPI unit in 16-bit protected mode
  822. programs. Other unit files are needed when you call the Fastgraph routines
  823. they contain.                                                                  
  824. 378   Fastgraph User's Guide                                                   
  825.  
  826.  
  827.  
  828.  
  829.  
  830. Appendix F
  831.  
  832.  
  833.  
  834.  
  835.  
  836. Integrating Fastgraph With
  837. Other Graphics Software                                                        
  838. 380   Fastgraph User's Guide
  839.  
  840.  
  841.      Sometimes you may want to use Fastgraph with other graphics software,
  842. such as when converting an existing graphics application to Fastgraph. This
  843. appendix may clarify some points about doing this.
  844.  
  845.      First, let the other graphics software establish the video mode, then
  846. initialize Fastgraph for that mode by calling fg_setmode(-1). Passing -1 to
  847. fg_setmode does not physically change video modes but merely initializes
  848. Fastgraph's internal parameters for the current video mode.
  849.  
  850.      Second, if you're using the EGA/VGA/SVGA 16-color graphics modes (modes
  851. 13 to 18, 28, and 29), you'll probably need to explicitly define the value of
  852. the EGA/VGA Enable Set/Reset register (port address 03CE hex, index 01).
  853. Fastgraph's functions expect this register to have the value 0F hex; this
  854. allows Fastgraph take advantage of a more efficient variant available in
  855. EGA/VGA write mode 0. The default value for the Enable Set/Reset register is
  856. zero.
  857.  
  858.      After you've called fg_setmode(-1) and need to call a third party
  859. graphics function, set the Enable Set/Reset register to its default value by
  860. including the following statement just before calling the third party
  861. function:
  862.  
  863. outport(0x03CE,0x0001);       Borland C++, Turbo C/C++, or Power C
  864. outpw(0x03CE,0x0001);         Microsoft C/C++, QuickC, WATCOM C/C++
  865. OUT &h03CE,1 : OUT &h03CF,0   QuickBASIC, BASIC PDS, or Visual Basic
  866.  
  867. Just before you call the next Fastgraph function, restore the Enable Set/Reset
  868. register value with the following statement:
  869.  
  870. outport(0x03CE,0x0F01);       Borland C++, Turbo C/C++, or Power C
  871. outpw(0x03CE,0x0F01);         Microsoft C/C++, QuickC, WATCOM C/C++
  872. OUT &h03CE,1 : OUT &h03CF,15  QuickBASIC, BASIC PDS, or Visual Basic           
  873.  
  874.  
  875.  
  876.  
  877.  
  878.  
  879. Appendix G
  880.  
  881.  
  882.  
  883.  
  884.  
  885. Converting Programs
  886. to Protected Mode                                                              
  887. 382   Fastgraph User's Guide
  888.  
  889.  
  890.      In this appendix we'll describe the steps necessary for porting real mode
  891. Fastgraph applications to protected mode. We'll also cover common changes
  892. required when converting 16-bit applications to 32-bit protected mode.
  893.  
  894.  
  895. Protected Mode Initialization
  896.  
  897.      The first and most obvious step when converting programs to protected
  898. mode is to call fg_initpm. This routine sets up protected mode features for
  899. each supported DOS extender and must be called before any other Fastgraph
  900. routine in protected mode programs. Failure to do this will result in a
  901. protection fault, usually immediately after setting the video mode. The
  902. fg_initpm routine has no arguments and no return value. It is included in the
  903. extender-specific support libraries (for example, in FG16DPMI.LIB) if
  904. Fastgraph supports more than one DOS extender for a given compiler.
  905.  
  906.  
  907. Considerations for Logical Pages
  908.  
  909.      In real mode, Fastgraph lets you create logical pages in conventional
  910. memory (with fg_alloccms), expanded memory (with fg_allocems), or extended
  911. memory (with fg_allocxms). In protected mode, the distinction between
  912. conventional, expanded, and extended memory disappears because DOS extenders
  913. essentially treat all system memory as conventional memory. For this reason,
  914. the fg_initems and fg_initxms routines are not meaningful and thus always
  915. return -1 in the protected mode Fastgraph libraries. This effectively disables
  916. the fg_allocems and fg_allocxms routines, so you must create logical pages
  917. with fg_alloccms in protected mode.
  918.  
  919.      If you have real mode Fastgraph applications that use logical pages, it's
  920. very simple to convert them to protected mode -- just change all fg_allocems
  921. and fg_allocxms calls to fg_alloccms.
  922.  
  923.  
  924. Considerations for Virtual Buffers
  925.  
  926.      Chapter 8 describes the various methods available for allocating memory
  927. for virtual buffers. Because some real mode compilers have limited support for
  928. huge arrays (blocks of memory greater than 64K bytes), Fastgraph's fg_vballoc
  929. and fg_vbfree routines are provided for allocating and releasing memory
  930. suitable for virtual buffers. All protected mode compilers provide full
  931. support for huge arrays, so these two functions aren't needed (in fact,
  932. they're not even included in the protected mode libraries). Thus, you must
  933. replace the fg_vballoc and fg_vbfree calls with your compiler's corresponding
  934. memory management functions as listed in Chapter 8 and use fg_vbdefine to
  935. create the virtual buffer.
  936.  
  937.  
  938. Mouse Cursor Definition
  939.  
  940.      The fg_mouseptr routine expects the screen and cursor masks to reside in
  941. a 32-element array of 16-bit values. If you're converting a C or C++ Fastgraph
  942. application from a 16-bit to a 32-bit environment, you must change the data
  943. type of the screen/cursor mask array passed to fg_mouseptr from int to short.  
  944.                       Appendix G:  Converting Programs to Protected Mode   383
  945.  
  946. FORTRAN programmers should be sure to pass an INTEGER*2 array instead of an
  947. ordinary INTEGER array.
  948.  
  949.  
  950. FORTRAN Data Types
  951.  
  952.      When converting FORTRAN programs to 32-bit protected mode, any INTEGER*2
  953. quantities passed to Fastgraph functions must be changed to four-byte
  954. integers. For maximum portability, we recommend changing them to type INTEGER,
  955. which is equivalent to INTEGER*2 in 16-bit environments and equivalent to
  956. INTEGER*4 in 32-bit environments.
  957.  
  958.  
  959. Incompatible Real Mode Behavior
  960.  
  961.      After you've added the fg_initpm call and made the other changes
  962. described so far, you should test your program to see if it runs in protected
  963. mode. Most high-level language programs will work at this point with no
  964. further changes required.
  965.  
  966.      However, some programs include features that are acceptable in real mode
  967. but not in protected mode (often this behavior is unintentional). These
  968. practices include loading physical addresses in segment registers, using
  969. physical segment addresses in far pointers, writing data to a code segment,
  970. referencing unspecified command line arguments, accessing memory beyond a
  971. segment's limit, and dereferencing null pointers. When a protected mode
  972. program encounters one of these problems during execution, it exits to DOS
  973. with a general protection fault, or GPF.
  974.  
  975.      The documentation shipped with your DOS extender will likely provide
  976. information on isolating protection faults and offer suggestions on how to fix
  977. them. Two other references, Extending DOS edited by Ray Duncan (Addison-
  978. Wesley, 1992) and DOS and Windows Protected Mode by Al Williams (Addison-
  979. Wesley, 1993) are valuable resources for protected mode programming. Both
  980. books include detailed information about the differences between real mode and
  981. protected mode and discuss common protected mode programming problems and
  982. solutions.                                                                     
  983. 384   Fastgraph User's Guide                                                   
  984.  
  985.  
  986.  
  987.  
  988.  
  989. Appendix H
  990.  
  991.  
  992.  
  993.  
  994.  
  995. Image File Header Formats                                                      
  996. 386   Fastgraph User's Guide
  997.  
  998.  
  999.      PCX, GIF, and FLI/FLC images include file headers that define the image
  1000. size, number of colors, and other information needed to display the image.
  1001. Fastgraph provides routines for reading the image headers and retrieving their
  1002. more useful items. However, there may be times when you need additional
  1003. information stored in the file header. This appendix provides full details
  1004. about the structure of the PCX, GIF, and flic file headers. In the tables that
  1005. follow, we'll assume all offsets start at zero, all field sizes are in bytes,
  1006. and all integer values are stored with the least significant byte first.
  1007.  
  1008. PCX files begin with a 128-byte header:
  1009.  
  1010.      offset  size   description
  1011.  
  1012.         0      1    manufacturer byte, must be 10 decimal
  1013.         1      1    PCX version number
  1014.                       0 = PC Paintbrush version 2.5
  1015.                       2 = PC Paintbrush 2.8 with palette information
  1016.                       3 = PC Paintbrush 2.8 without palette information
  1017.                       4 = PC Paintbrush for Windows
  1018.                       5 = PC Paintbrush 3.0 or later, PC Paintbrush Plus
  1019.         2      1    run length encoding byte, must be 1
  1020.         3      1    number of bits per pixel per bit plane
  1021.         4      8    image limits in pixels: Xmin, Ymin, Xmax, Ymax
  1022.        12      2    horizontal dots per inch when printed (unreliable)
  1023.        14      2    vertical dots per inch when printed (unreliable)
  1024.        16     48    16-color palette (16 RGB triples between 0-255)
  1025.        64      1    reserved, must be zero
  1026.        65      1    number of bit planes
  1027.        66      2    video memory bytes per image row
  1028.        68      2    16-color palette interpretation (unreliable)
  1029.                       0 = color or b&w, 1 = grayscale
  1030.        70      2    horizontal screen resolution - 1 (unreliable)
  1031.        72      2    vertical screen resolution - 1 (unreliable)
  1032.        74     54    reserved, must be zero
  1033.  
  1034. GIF files begin with a 13-byte global header and a 10-byte local header:
  1035.  
  1036.      offset  size   description
  1037.  
  1038.         0      6    GIF signature, must be GIF87a or GIF89a
  1039.         6      2    horizontal resolution of creating video mode (unreliable)
  1040.         8      2    vertical resolution of creating video mode (unreliable)
  1041.        10      1    global flag byte
  1042.                       bit 7 is set if global color map is present
  1043.                       bits 0-3 are the number of colors (2**(n+1))
  1044.        11      1    background color
  1045.        12      1    for GIF87a, must be zero
  1046.                     for GIF89a, aspect ratio
  1047.        13      0    reserved, must be 44 decimal (ASCII comma)
  1048.        14      2    left edge of image in pixels
  1049.        16      2    top edge of image in pixels
  1050.        18      2    image width in pixels
  1051.        20      2    image height in pixels
  1052.        22      1    local flag byte
  1053.                       bit 7 is set if local color map is present               
  1054.                                   Appendix H:  Image File Header Formats   387
  1055.  
  1056.                       bit 6 is set if image is interlaced
  1057.                       bits 0-3 are the number of colors (2**(n+1))
  1058.  
  1059.  
  1060. FLI and FLC files begin with a 128-byte header:
  1061.  
  1062.      offset  size   description
  1063.  
  1064.         0      4    file size in bytes
  1065.         4      2    signature, AF11 hex for FLI files, AF12 hex for FLC files
  1066.         6      2    number of frames
  1067.         8      2    image width in pixels
  1068.        10      2    image height in pixels
  1069.        12      2    bits per pixel, must be 8
  1070.        14      2    reserved, must be 3
  1071.        16      4    time delay between frames
  1072.                       units are 1/70 second for FLI files
  1073.                       units are milliseconds for FLC files
  1074.        20      2    reserved, must be zero
  1075.        22      4    file creation date/time (MS-DOS format)
  1076.        26      4    creator serial number (unreliable)
  1077.        30      4    file revision date/time (MS-DOS format)
  1078.        34      4    updater serial number (unreliable)
  1079.        38      4    horizontal aspect ratio of creating video mode
  1080.        40      2    vertical aspect ratio of creating video mode
  1081.        42     38    reserved, must be zero
  1082.        80      4    byte offset to start of first frame
  1083.        84      4    byte offset to start of second frame
  1084.        88     40    reserved, must be zero
  1085.  
  1086. The fields starting at offset 22 and above in the flic file header apply to
  1087. FLC files only. For FLI files, they should all be zero.                        
  1088. 388   Fastgraph User's Guide                                                   
  1089.                                                                    Index   389
  1090.  
  1091.  
  1092.                                    I n d e x
  1093.  
  1094.      8253-5 programmable timer chip          CGA palettes  70
  1095.                330                           Character cells  30
  1096.      Active page  150                        Character space  58, 126
  1097.      Animation  274                          Characters
  1098.           dynamic frame  280                      bitmapped  143
  1099.           dynamic page flipping                   hardware  127
  1100.                282                                software  138
  1101.           page flipping  282                 Circles  107
  1102.           simple  274                        Clearing the screen  98
  1103.           static frame  278                  CLIP  357, 358
  1104.           static page flipping  282               /M option  357
  1105.           summary  284                            /P option  357
  1106.           XOR  276                                /W option  357
  1107.      ANSI.SYS  43                            Clipping  98, 171
  1108.      Assembly language  364                  Clock tick  344-346
  1109.      Attribute  68, 130, 131                 Clock tick interrupt  335,
  1110.      Autodesk Animator  192, 193                       337, 344
  1111.      Auxiliary Fastgraph library             Color  68
  1112.                374                           Color indices  90
  1113.      Available memory  350                   Color number  70
  1114.      Background color  68-70                 Color value  70
  1115.      BitBlt  256                             Compilation  7
  1116.      Bitmapped characters  143                    BASIC PDS  14
  1117.      Bitmapped images  212                        Borland C++  10
  1118.      Bitmaps  212                                 Borland Pascal  12
  1119.           CGA  217, 219, 226                      MetaWare High C/C++  13
  1120.           converting  236                         Microsoft C/C++  15
  1121.           EGA  220, 228                           Microsoft FORTRAN  16
  1122.           filler bits  213                        Microsoft FORTRAN
  1123.           Hercules  220                                PowerStation  17
  1124.           inverting  234                          Power C  23
  1125.           MCGA  222                               QuickBASIC  18
  1126.           memory requirements  232                QuickC  19
  1127.           mode-independent  212                   Turbo C  24
  1128.           mode-specific  217                      Turbo C++  24
  1129.           PCjr  220                               Turbo Pascal  25
  1130.           retrieving  229                         Visual Basic  20
  1131.           rotation  242                           Visual C++  21, 22
  1132.           scaling  239                            WATCOM C/C++  26
  1133.           shearing  239, 240                      Zortech C++  27
  1134.           subscript order  213,              Compiler-specific Fastgraph
  1135.                214, 224                                library  374
  1136.           SVGA  220, 222                     CONVERT  358, 359
  1137.           Tandy  220                              /PPR switch  358
  1138.           text modes  223                         /SPR switch  358
  1139.           VGA  220, 222                      Convex shape  106
  1140.           virtual buffers  223               Coordinate conversion  64,
  1141.      Blit  256                                         135, 137
  1142.      Block transfer routines  256            Current color  70
  1143.      Borland C++  3, 10                      Cursor mask  316, 318
  1144.      Borland Pascal  3, 12                   Dash pattern  103
  1145.      Byte boundary  257, 258                 Delay units  345, 346
  1146.      CapsLock  304-306                       Display patterns  200             
  1147. 390   Fastgraph User's Guide
  1148.  
  1149.           CGA  201, 202                           fg_button  324, 325, 327,
  1150.           EGA  203                                     368, 369
  1151.           Hercules  203                           fg_capslock  305, 306,
  1152.           MCGA  204                                    327
  1153.           PCjr  202                               fg_chgattr  130, 144
  1154.           SVGA  203                               fg_chgtext  130, 144
  1155.           Tandy  202                              fg_circle  107, 108, 121
  1156.           VGA  203, 204                           fg_circlef  107, 121
  1157.      Dithering  112                               fg_circlefw  107, 121
  1158.      Dithering matrix  113                        fg_circlew  107, 108, 121
  1159.           256-color modes  118                    fg_clipmap  215, 236, 251
  1160.           alignment  119                          fg_clipmask  248, 249,
  1161.           CGA  113, 114                                251
  1162.           EGA  116                                fg_clpimage  225-227,
  1163.           Hercules  116                                229, 248, 249, 251
  1164.           PCjr  115                               fg_clprect  109, 121,
  1165.           SVGA  116                                    274, 282, 283
  1166.           Tandy  115                              fg_clprectw  109, 121
  1167.           VGA  116                                fg_colors  70, 94, 99
  1168.      DOS extenders  4, 5                          fg_copypage  162-164,
  1169.           supported  4                                 168, 170, 181, 256,
  1170.      EDITSPR  359                                      271
  1171.      Ellipses  108                                fg_cursor  42, 56, 94,
  1172.      EMM386.EXE  161                                   132, 261
  1173.      EMS  161                                     fg_dash  103, 121
  1174.      Expanded memory  161                         fg_dashrel  103, 121
  1175.      Expanded Memory Manager  161                 fg_dashrw  103, 121
  1176.      Extended memory  161                         fg_dashw  103, 122
  1177.      Fade  85, 86                                 fg_defcolor  91, 92, 94,
  1178.      FASTGRAF.BI  8                                    119
  1179.      FASTGRAF.FI  9                               fg_defpages  164-166, 181
  1180.      FASTGRAF.H  8                                fg_dispfile  199, 200,
  1181.      Fastgraph  2                                      209, 246
  1182.      fastgraph routines                           fg_display  244-247, 251
  1183.           fg_allocate  152, 153,                  fg_displayp  245-247, 252
  1184.                155, 156, 159, 160,                fg_draw  101, 122, 292
  1185.                169, 170, 180, 256,                fg_drawmap  144, 212,
  1186.                261, 350                                214, 215, 217, 229,
  1187.           fg_alloccms  161, 162,                       230, 231, 232, 236,
  1188.                168, 169, 382                           244, 248, 250, 252,
  1189.           fg_allocems  161, 162,                       264, 284, 318, 321
  1190.                180, 382                           fg_drawmask  248-250, 252
  1191.           fg_allocxms  161, 162,                  fg_drawrel  101, 119, 122
  1192.                181, 382                           fg_drawrelx  101, 122
  1193.           fg_automode  47, 48, 55,                fg_drawrw  101, 122
  1194.                99, 108, 109, 294                  fg_drawrxw  101, 122
  1195.           fg_bestmode  44, 48, 49,                fg_draww  101, 122
  1196.                51, 55, 119, 153,                  fg_drawx  101, 122
  1197.                155, 156, 270                      fg_drawxw  101, 122
  1198.           fg_box  110, 121                        fg_drect  113, 116-119,
  1199.           fg_boxdepth  110, 111,                       122
  1200.                121                                fg_drectw  113, 118, 119,
  1201.           fg_boxw  110, 121                            122
  1202.           fg_boxx  111, 112, 121                  fg_drwimage  144, 217,
  1203.           fg_boxxw  111, 112, 121                      218, 219, 221-227,
  1204.                                                        229, 232, 234-237,      
  1205.                                                                    Index   391
  1206.  
  1207.                240, 244,                          fg_getmaxx  59, 60, 64,
  1208.                248-250, 252,                           99, 109
  1209.                284, 321                           fg_getmaxy  59, 60, 65,
  1210.           fg_ellipse  108, 122, 278                    99, 109, 298
  1211.           fg_ellipsef  108, 122                   fg_getmode  44, 56, 364
  1212.           fg_ellipsew  108, 122                   fg_getpage  158, 159, 181
  1213.           fg_ellipsfw  108, 123                   fg_getpixel  99, 123
  1214.           fg_erase  98, 123, 166,                 fg_getrgb  84-86, 95
  1215.                170                                fg_getview  61, 65
  1216.           fg_fadein  288, 289, 300                fg_getvpage  158, 159,
  1217.           fg_fadeout  288, 300                         181
  1218.           fg_fillpage  98, 123                    fg_getworld  63, 65
  1219.           fg_findpage  158, 162,                  fg_getxbox  110, 123
  1220.                168, 181                           fg_getxjoy  324-327
  1221.           fg_flicdone  195, 209                   fg_getxjust  133, 144
  1222.           fg_flichead  193, 194,                  fg_getxpos  101, 123
  1223.                209                                fg_getybox  110, 123
  1224.           fg_flicmode  194, 209                   fg_getyjoy  324-327
  1225.           fg_flicopen  194, 195,                  fg_getyjust  133, 144
  1226.                209                                fg_getypos  101, 123
  1227.           fg_flicplay  195, 209                   fg_gifhead  191, 209
  1228.           fg_flicsize  194, 209                   fg_gifmode  191, 209
  1229.           fg_flicskip  195, 209                   fg_gifpal  191
  1230.           fg_flipmask  248, 249,                  fg_gifrange  191, 209
  1231.                252                                fg_hush  335, 338, 340
  1232.           fg_flood  119, 123                      fg_hushnext  335, 338,
  1233.           fg_floodw  119, 123                          340
  1234.           fg_flpimage  226, 227,                  fg_imagebuf  184, 193,
  1235.                229, 248, 249, 252                      206, 207-209
  1236.           fg_fontsize  135, 136,                  fg_imagesiz  232, 233,
  1237.                144                                     252, 270
  1238.           fg_freepage  153, 155,                  fg_initems  161, 162,
  1239.                156, 161, 167, 181,                     167, 181, 382
  1240.                350                                fg_initjoy  167, 323,
  1241.           fg_getaddr  158, 159, 181                    324, 327
  1242.           fg_getattr  131, 144                    fg_initpm  3, 7, 382, 383
  1243.           fg_getbanks  353, 354                   fg_initw  62, 63, 65,
  1244.           fg_getblock  270, 272                        100, 138, 139
  1245.           fg_getchar  131, 144                    fg_initxms  161, 162,
  1246.           fg_getclip  98, 123                          167, 181, 382
  1247.           fg_getclock  345, 347                   fg_inside  107, 123
  1248.           fg_getcolor  69, 70, 77,                fg_intjoy  325-327
  1249.                94                                 fg_intkey  304, 305, 307,
  1250.           fg_getdacs  86-88, 94,                       325, 327, 338, 345
  1251.                353                                fg_invert  234, 235, 252
  1252.           fg_getentry  168, 179,                  fg_justify  132, 133, 145
  1253.                181                                fg_kbinit  307-309, 327
  1254.           fg_gethpage  259, 272                   fg_kblast  309, 327
  1255.           fg_getimage  131, 229,                  fg_kbreset  309, 327
  1256.                232, 233, 239, 241,                fg_kbtest  307, 308, 327
  1257.                252, 270, 284                      fg_loadpcx  184, 186,
  1258.           fg_getindex  95                              187, 209, 242
  1259.           fg_getkey  304, 307, 327                fg_locate  127-129, 132,
  1260.           fg_getlines  45, 56                          135, 145, 150, 157,
  1261.           fg_getmap  229-233, 252,                     233
  1262.                264, 284                           fg_makegif  190, 191, 210    
  1263. 392   Fastgraph User's Guide
  1264.  
  1265.           fg_makepcx  184-186, 190,               fg_pcxmode  188, 210
  1266.                191, 197, 210                      fg_pcxpal  188, 209, 210
  1267.           fg_makeppr  199, 210                    fg_pcxrange  188, 210
  1268.           fg_makespr  197, 199, 210               fg_playing  336, 338, 340
  1269.           fg_maprgb  89, 95, 188                  fg_point  99, 100, 124
  1270.           fg_measure  298, 346, 347               fg_pointw  99, 100, 124
  1271.           fg_memavail  350, 354                   fg_pointx  100, 124
  1272.           fg_memory  53, 56, 164                  fg_pointxw  100, 124
  1273.           fg_mouse256  322                        fg_polyedge  107, 124
  1274.           fg_mousebut  313, 314,                  fg_polyfill  105-107, 124
  1275.                327                                fg_polygon  104, 105, 124
  1276.           fg_mousecur  315, 317,                  fg_polygonw  104, 124
  1277.                327                                fg_polyline  105, 107,
  1278.           fg_mousefin  311, 327                        124
  1279.           fg_mouseini  167, 309,                  fg_polyoff  105, 107
  1280.                310, 311, 314, 327                 fg_print  132, 133, 135,
  1281.           fg_mouselim  311, 312,                       144, 145
  1282.                328                                fg_printc  133, 135, 145
  1283.           fg_mousemov  311, 312,                  fg_putblock  270, 272
  1284.                328                                fg_putimage  223, 226,
  1285.           fg_mousepos  311, 313,                       229, 239, 241, 248,
  1286.                314, 328                                252, 270
  1287.           fg_mouseptr  315, 320,                  fg_quiet  331-333, 340
  1288.                322, 328, 382                      fg_rect  61, 80, 84, 109,
  1289.           fg_mousespd  312, 328                        110, 113, 124, 135,
  1290.           fg_mousevis  311, 312,                       137, 150, 214, 218,
  1291.                314, 328                                261, 274, 282
  1292.           fg_move  100, 101, 103,                 fg_rectw  109, 124, 143
  1293.                119, 123, 133, 197,                fg_reset  43, 44, 56, 364
  1294.                199, 215, 216, 230,                fg_resize  166, 167, 181,
  1295.                231, 233, 247, 264,                     295, 300
  1296.                292                                fg_restore  164, 259,
  1297.           fg_moverel  100, 101, 123                    261, 262, 263, 266,
  1298.           fg_moverw  100, 123                          270, 272, 282, 289
  1299.           fg_movew  100, 123                      fg_restorew  259, 272
  1300.           fg_music  333-335, 338,                 fg_resume  339, 340
  1301.                340                                fg_revimage  225-227,
  1302.           fg_musicb  338-340                           229, 235, 248, 249,
  1303.           fg_numlock  305, 306, 328                    252
  1304.           fg_pack  236, 237, 239,                 fg_revmask  248, 249, 252
  1305.                252                                fg_save  164, 259, 261,
  1306.           fg_pagesize  160, 170,                       262, 263, 266, 270,
  1307.                181                                     272
  1308.           fg_paint  119, 123, 292                 fg_savew  259, 272
  1309.           fg_paintw  119, 123                     fg_scale  239, 240, 242,
  1310.           fg_palette  71-80, 82-84,                    252
  1311.                89, 90, 94, 95, 188,               fg_scrlock  305, 306, 328
  1312.                223                                fg_scroll  290-292, 300
  1313.           fg_palettes  90, 95, 188,               fg_setangle  141, 142,
  1314.                353                                     145
  1315.           fg_pan  293-296, 298,                   fg_setattr  68, 69, 95,
  1316.                300, 353                                98, 127, 128, 130,
  1317.           fg_panw  293, 294, 300                       145, 150, 151, 154,
  1318.           fg_pattern  200, 201,                        156
  1319.                205, 210, 245, 246                 fg_setbanks  353, 354
  1320.           fg_pcxhead  188, 210                    fg_setcaps  306, 328         
  1321.                                                                    Index   393
  1322.  
  1323.           fg_setclip  62, 98, 124,                fg_split  298, 300
  1324.                133, 225                           fg_stall  298, 345-347
  1325.           fg_setclipw  98, 124, 133               fg_suspend  339-341
  1326.           fg_setcolor  42, 69-80,                 fg_svgainit  51-54, 56,
  1327.                82-84, 95, 98, 99,                      164, 353
  1328.                116, 117, 127, 130,                fg_svgastat  54, 56, 164,
  1329.                138, 145, 150, 151,                     259
  1330.                154, 156, 214,                     fg_svgaver  53, 56
  1331.                275-277, 290, 291                  fg_swchar  138-140, 142,
  1332.           fg_setdacs  86-88, 95,                       145
  1333.                188, 353, 360                      fg_swlength  142, 143,
  1334.           fg_setentry  168, 170,                       145
  1335.                179, 181                           fg_swtext  142, 143, 145
  1336.           fg_setfunc  276, 351, 354               fg_tcdefine  267-269, 272
  1337.           fg_sethpage  259, 261,                  fg_tcmask  267-269, 272
  1338.                272, 288, 290                      fg_tcxfer  164, 267, 269,
  1339.           fg_setlines  45, 56                          272
  1340.           fg_setmode  42, 44, 51,                 fg_testmode  43, 44, 49,
  1341.                56, 70, 77, 83, 88,                     51, 54, 56, 87, 150,
  1342.                91, 98-100, 108,                        153, 228, 259, 332
  1343.                109, 115, 116, 127,                fg_text  42, 127-130,
  1344.                128, 130, 133, 139,                     132, 133, 135, 136,
  1345.                150, 157, 161, 165,                     138, 144, 145
  1346.                166, 167, 168, 175,                fg_textc  133, 135, 145
  1347.                201, 202-204, 228,                 fg_transfer  164, 262,
  1348.                302, 310, 323, 364,                     263, 264-267, 270,
  1349.                380                                     272, 280, 282, 283,
  1350.           fg_setnum  306, 328                          289
  1351.           fg_setpage  150, 165,                   fg_unpack  237, 239, 252
  1352.                182, 259                           fg_vbaddr  243, 253
  1353.           fg_setratio  139, 141,                  fg_vballoc  172, 175,
  1354.                145                                     182, 243, 382
  1355.           fg_setrgb  73, 76, 80,                  fg_vbclose  173, 175, 182
  1356.                82, 83, 84, 86, 89,                fg_vbcopy  262, 266, 272
  1357.                94, 95, 205, 223                   fg_vbcut  173, 175, 179,
  1358.           fg_setsize  139, 145                         182, 262, 266
  1359.           fg_setsizew  139, 145                   fg_vbdefine  171-173,
  1360.           fg_setview  60, 61, 65                       182, 243, 382
  1361.           fg_setvpage  150, 160,                  fg_vbfree  172, 175, 182,
  1362.                161, 182, 282, 283,                     382
  1363.                298, 311, 353                      fg_vbhandle  171, 182
  1364.           fg_setworld  63, 65, 138,               fg_vbinit  171, 182
  1365.                139                                fg_vbopen  173, 182
  1366.           fg_shear  240-242, 252                  fg_vbpaste  173, 175-177,
  1367.           fg_showflic  192, 193,                       179, 182, 186, 188,
  1368.                195, 210                                238, 262, 266, 269,
  1369.           fg_showgif  190, 191, 210                    297, 298
  1370.           fg_showpcx  184-188, 190,               fg_vbtcxfer  267, 269,
  1371.                193, 206, 208, 210                      272
  1372.           fg_showppr  199, 210                    fg_vbundef  171, 182
  1373.           fg_showspr  197, 199,                   fg_version  7, 53, 364
  1374.                200, 210                           fg_vgastate  353, 354
  1375.           fg_sound  330-333, 335,                 fg_voice  331-333, 335,
  1376.                336, 341                                336, 337, 341
  1377.           fg_sounds  335, 336, 338,               fg_voices  336-338, 341
  1378.                341                                                             
  1379. 394   Fastgraph User's Guide
  1380.  
  1381.           fg_waitfor  85, 274, 280,          GrabRGB  200, 359, 360
  1382.                282, 292, 294, 305,                /D option  360
  1383.                312, 333, 344-347                  output file format  360
  1384.           fg_waitkey  43, 304, 307,          Graphics cursor  100
  1385.                328                           Graphics modes  30, 33, 70
  1386.           fg_waitvr  352-354                      256-color  83
  1387.           fg_where  129, 146, 157                 CGA  33, 70, 72
  1388.           fg_xalpha  64, 65, 137,                 EGA  35, 76, 78, 79
  1389.                146                                Hercules  34, 74, 75
  1390.           fg_xconvert  64, 65, 137,               MCGA  36, 81
  1391.                146                                native EGA  35
  1392.           fg_xscreen  64, 65, 99                  native VGA  36
  1393.           fg_xview  61, 65                        PCjr  34, 73
  1394.           fg_xworld  64, 65, 101                  SVGA  38, 83
  1395.           fg_yalpha  64, 65, 137,                 Tandy  73
  1396.                146                                Tandy 1000  34
  1397.           fg_yconvert  64, 65, 137,               VGA  36, 81, 83
  1398.                146                                XVGA  37
  1399.           fg_yscreen  64, 65, 99             Hardware characters  127
  1400.           fg_yview  61, 65                        graphics modes  132
  1401.           fg_yworld  64, 65, 101                  height  135
  1402.      Fastgraph/Light  2                           side effects  134
  1403.      Fastgraph/Light Video Driver                 text modes  127
  1404.                2, 28                         HERCFIX  360, 361
  1405.      FG32 symbol  8                          Hidden page  150, 259
  1406.      FGDRIVER  28                            HIMEM.SYS  161
  1407.           /U option  28                      Hot spot  320
  1408.      Filler bits  213                        Image array  224
  1409.      Fish tank animation demo  284           Image buffer  206
  1410.      FLC files (see flic files)              Images  184
  1411.                192                                clipped  225
  1412.      FLI files (see flic files)                   regular  217
  1413.                192                                reversed  225
  1414.      Flic files  192                              reversed clipped  226
  1415.           context descriptor  194,                without transparent
  1416.                195                                     pixels  226
  1417.           continuous play  192, 193          INCLUDE environment variable
  1418.           delta compression  192                       8
  1419.           dimensions  194                    Input devices  302
  1420.           header  194, 387                   INSTALL program  6
  1421.           high-level routines  192                /L option  6
  1422.           low-level routines  194,           Installation  6
  1423.                195                           Interrupts  353, 368
  1424.           playing  192                       Joystick  323
  1425.      Flickering  352                              button status  324, 325,
  1426.      Foreground color  68, 69                          368
  1427.      Full page transfer  256                      calibration  324
  1428.      Game port  323                               characteristics  324
  1429.      General protection fault  383                horizontal position  324
  1430.      GIF files  189                               initialize  323
  1431.           creating  190                           keyboard emulation  325
  1432.           dimensions  191                         special considerations
  1433.           displaying  190                              326
  1434.           header  191, 386                        vertical position  324
  1435.           palette  191                       Keyboard  302
  1436.      GPF  383                                     buffer  304, 345             
  1437.                                                                    Index   395
  1438.  
  1439.           extended codes  302                     freezing  311
  1440.           handler  307                            graphics modes  318
  1441.           standard codes  302                     hot spot  320
  1442.           state light  306                        multicolored  322
  1443.      Lines                                        text modes  316
  1444.           dashed  103                        Mouse driver  309
  1445.           solid  101                         Music  333
  1446.      Linking  7                                   asynchronous  338
  1447.      Logical pages  161, 382                      restarting  339
  1448.           creating  161                           stopping  338
  1449.           releasing  161                          suspending  339
  1450.      Masking map  223, 248-250                    synchronous  333
  1451.      Memory conflicts                        Music commands  333
  1452.           logical pages  169                 Music string  333, 338
  1453.           virtual buffers  172               Musical notes  333
  1454.           virtual pages  169                 Naming conventions  7
  1455.      Memory models  5                        NumLock  304-306
  1456.           flat  5                            Overscan  71
  1457.           large  5                           Packed pixel run file  196,
  1458.           medium  5                                    198
  1459.           small  5                           Packed pixel run map  199, 245
  1460.      Memory update function  351             Page flipping  282, 284, 352,
  1461.      MetaWare High C/C++  13                           353
  1462.      Mickeys  312                            Palette  31
  1463.      Microsoft BASIC PDS  3, 14              Palette number  73, 76, 78,
  1464.      Microsoft C/C++  3, 15                            79, 82
  1465.      Microsoft FORTRAN  3, 16                Palette registers  73, 76, 78,
  1466.      Microsoft FORTRAN PowerStation                    79, 81, 83, 90, 91
  1467.                17                            Palette value  73, 76, 78, 79
  1468.      Microsoft Mouse  309                    Palettes  73, 76, 78, 79, 81,
  1469.      Microsoft QuickBASIC  3, 18                       83
  1470.      Microsoft QuickC  3, 19                 Panning  166, 295, 352
  1471.      Microsoft Visual Basic for DOS          PC Paintbrush  184
  1472.                3, 20                         PCX files  184
  1473.      Microsoft Visual C++  3, 21,                 creating  184
  1474.                22                                 dimensions  188
  1475.      Mode X  38                                   displaying  184
  1476.      Mouse  309                                   header  188, 386
  1477.           button status  313                      palette  188
  1478.           CGA Considerations  321                 video mode compatibility
  1479.           cursor  311, 315                             187
  1480.           cursor mask  316, 318,                  virtual buffers  186
  1481.                382                           PCXHEAD  361
  1482.           cursor visibility  311             PDS BASIC  14
  1483.           default cursor  318                Periodic noise  332
  1484.           hot spot  320                      Physical pages  148
  1485.           initialize  309                    Pixel bleeding  322
  1486.           limits  312                        Pixel run  196
  1487.           position  311, 313                 Pixel run file  196, 197, 199,
  1488.           screen mask  316, 318,                       200, 246
  1489.                382                           Pixel run map  196, 200, 244,
  1490.           screen updates  311                          245
  1491.           speed  312                         Pixels  30
  1492.           SVGA  310, 322                     Points  99
  1493.           XVGA  310, 322                     Polygon
  1494.      Mouse cursor  311, 315, 382                  filled  105, 106             
  1495. 396   Fastgraph User's Guide
  1496.  
  1497.           unfilled  104, 105                      superscript operator (\^)
  1498.           vertex offsets  105                          140
  1499.      Power C  3, 23                               underline operator (_)
  1500.      PPR file  196, 198                                140
  1501.      Project file  10, 24                    Sound  330
  1502.      Protected mode  4                            asynchronous  335
  1503.      Protection fault  383                        disk accesses during  335
  1504.      Put_string  129                              duration  330
  1505.      QuickBASIC  3, 18                            frequency  330
  1506.      QuickC  3, 19                                PCjr  330
  1507.      READ.ME file  6                              stopping  338
  1508.      Real mode  4                                 synchronous  330
  1509.      Real-time operations  344                    Tandy  330
  1510.      Rectangles                                   volume  330
  1511.           dithered  112                      Sound effects  330-332
  1512.           solid  109                         Split screen  298
  1513.           unfilled  110                           activating  298
  1514.      Region fill  119                             canceling  300
  1515.      Register preservation  364              Splitter cable  323
  1516.      Resolution  30                          SPR file  196
  1517.      Reverse video  130                      Standard color set  70
  1518.      RGB color mapping  89                   Standard pixel run file  196
  1519.      Rotation  242                           Stroke characters  138
  1520.      Rubberband boxes  101, 111              SuperVGA  50
  1521.      Scaling  239                            SVGA  50
  1522.      Scan codes  307, 308                         chipset  50
  1523.      Screen dissolving  288                       dual banks  259
  1524.      Screen mask  316, 318                        external bank switching
  1525.      Screen origin  293                                353
  1526.      Screen space  58, 59                         initialization  51-53
  1527.      Scrolling  290                               kernel  38, 50-55, 353
  1528.           circular  290                           kernel version  52, 53
  1529.           end-off  290                            monitor compatibility  55
  1530.           increment  290                          problematic cards  55
  1531.           region  290                             supported chipsets  50,
  1532.      ScrollLock  304-306                               51
  1533.      Shadow  130                                  VESA compatibility  51
  1534.      Shearing  240                                video memory present  53
  1535.      Sliding tone  331                       Texas Instruments SN76496A
  1536.      SNAPSHOT  200, 356, 357, 359,                     sound chip  330
  1537.                360                           Text cursor  42, 127, 157
  1538.           error tone  356                    Text modes  30, 31, 68
  1539.           image files  356                        43 lines  45
  1540.           success tone  356                       50 lines  45
  1541.      Software characters  138                     color  68
  1542.           alternate font  138, 139,               monochrome  69
  1543.                142                           TI sound chip  330
  1544.           angle  141                         Transparency  212, 218-220,
  1545.           aspect ratio  139                            222, 223, 226, 227,
  1546.           font change operator (\)                     244, 248, 250,
  1547.                139                                     267-269
  1548.           primary font  138, 139             Turbo C  3, 24
  1549.           size  139                          Turbo C++  3, 24
  1550.           string length  142                 Turbo Pascal  3, 25
  1551.           subscript operator (\v)            Vector characters  138
  1552.                140                           Vertical retrace  352             
  1553.                                                                    Index   397
  1554.  
  1555.      VESA  51                                          240, 242, 266,
  1556.      Video DAC registers  81-84,                       269, 290, 293,
  1557.                86, 90, 352                             351
  1558.           EGA modes  87                           scaling  239, 242
  1559.      Video modes  30                              shearing  240, 242
  1560.           mode 00  32                        Virtual colors  90, 91
  1561.           mode 01  32                        Virtual pages  148
  1562.           mode 02  32                             creating  152
  1563.           mode 03  32                             heap requirements  159
  1564.           mode 04  33                             page flipping  160
  1565.           mode 05  34                             releasing  153
  1566.           mode 06  34                             writing to unallocated
  1567.           mode 07  33                                  160
  1568.           mode 09  34                        Visual Basic  3, 20
  1569.           mode 11  35                        Visual C++  3, 21, 22
  1570.           mode 12  35                        Visual effects  289
  1571.           mode 13  35                        Visual page  150
  1572.           mode 14  35                        Warbling  331
  1573.           mode 15  36                        WATCOM C/C++  26
  1574.           mode 16  36                        WHATS.NEW file  7
  1575.           mode 17  36                        White noise  332
  1576.           mode 18  37                        World space  58, 62
  1577.           mode 19  37                        XMS  161
  1578.           mode 20  37                        XOR boxes  111
  1579.           mode 21  37                        XOR lines  101
  1580.           mode 22  38                        XOR pixels  100
  1581.           mode 23  38                        Zortech C++  3, 27
  1582.           mode 24  38
  1583.           mode 25  38
  1584.           mode 26  39
  1585.           mode 27  39
  1586.           mode 28  39
  1587.           mode 29  39
  1588.           mode X  38
  1589.           summary  30
  1590.      Video page resizing  295
  1591.      Video pages  31, 148
  1592.           active  150
  1593.           extended  148, 163, 167
  1594.           hidden  150, 259
  1595.           logical  148, 161
  1596.           physical  148
  1597.           preserving  158, 167
  1598.           resizing  166
  1599.           segment address  158
  1600.           virtual  148, 152
  1601.           visual  150
  1602.      Video state
  1603.           restoring  353
  1604.           saving  353
  1605.      Video subsystem  31
  1606.      Viewports  58, 60
  1607.      Virtual buffer memory  171
  1608.      Virtual buffers  148, 171-173,
  1609.                175-177, 180, 186,
  1610.                190, 192, 223, 239,
  1611.