Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Flipper 6.0 Help File - <b>graphmode()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
GRAPHMODE()
   Places FLIPPER into a different mode than the startup mode.

   Syntax
         nBIOSMode = GRAPHMODE(nFlipperMode)

   Arguments
         nFlipperMode Sets the screen resolution.

      GRAPHICS MODES:
    +---------------------------------------------------------------------+
    |BIOS mode|Resolution |FLIPPER Mode|Monitor #|Card #|Description      |
    ----------+-----------+------------+---------+------+-----------------|
    |4**      |320 x 200  |1*          |1        |1     |MED RES 4 COLOR  |
    |6**      |640 x 200  |2,9         |1        |1     |HI RES B&W       |
    |7        | 25 x  80  |0           |0        |0     |MONO TEXT        |
    |8        |640 x 400  |5           |5        |9     |Double scan, AT&T|
    |9        |720 x 348  |9*          |0        |9     |HERCULES         |
    |13       |320 x 200  |1           |3        |3     |MED RES 16 COLOR |
    |14       |640 x 200  |2           |3,4      |3     |HI RES 16 COLOR  |
    |15**     |640 x 350  |9           |3        |3     |EGA MONO 2 COLOR |
    |16       |640 x 350  |3*          |3        |3     |EGA 16 COLOR     |
    |17**     |640 x 480  |9           |4        |4     |VGA MONO 2 COLOR |
    |18       |640 x 480  |4*          |4        |4     |VGA 16 COLOR     |
    |19       |320 x 200  |          (not supported)    |VGA 256 COLOR    |
    |mode n   |X res,Y res|*           |*        |*     |EXTENDED EGA     |
    +---------------------------------------------------------------------+

   Returns
         RET_DISPLY() Returns the monitor #.

         RET_CARD()   Returns the graphic card #.

         RET_BIOS()   Returns the current BIOS mode. Active mode: 0 - text

         GRMAX_X()    Returns the maximum horizontal pixels on the graphics
                      screen.

         GRMAX_Y()    Returns the maximum vertical pixels on the graphics
                      screen.

        (GRMAX_X & Y work in graphics mode only)

   Description
         GRAPHMODE() is used to place FLIPPER into a mode other than the
         startup mode. For example, if you have an EGA screen you can place
         FLIPPER into one of the other modes supported by EGA. By issuing a
         GRAPHMODE(1), FLIPPER will be placed in BIOS mode 13 which is 320 x
         200 and 16 colors. However, if you have a Color Graphics Adapter,
         then issuing a GRAPHMODE(1) will place FLIPPER in BIOS mode 4. The
         monitor number can be changed with the SET_DISPLY() function as ex-
         plained in the note below. The graphics mode table shows you what
         mode you will end up in if you issue a 1, 2, 3, 4, or 9 depending on
         which monitor you have.
              +-------------------------------------------------+
              |FLIPPER Mode|Description |Hardware Support       |
              -------------+------------+-----------------------|
              |1           |320 x 200   |CGA, EGA, VGA          |
              |2           |640 x 200   |CGA, EGA, VGA          |
              |3           |640 x 350   |EGA, VGA               |
              |4           |640 x 480   |VGA                    |
              |5           |640 x 400   |Double scan AT&T 6300  |
              |9           |2 color mode|Hercules, CGA, EGA, VGA|
              +-------------------------------------------------+
   Note: ProWorks has made a considerable effort to ensure that you
         cannot change to a mode not supported by your hardware.
         However, the SET_DISPLY() function is provided to allow you to
         force a different graphics mode than FLIPPER can detect in the
         hardware. Please be careful not to change to a mode that your
         hardware will not support.

         FLIPPER will attempt to automatically detect what hardware you have
         in your computer and set the graphics mode correctly except under
         the following conditions:
                     * when two monitors are attached
                     * certain types of non-standard graphic cards

         Under this situation, you must use SET_DISPLY() to set the correct
         monitor type. (see SET_DISPLY())

         The IBM Model 30 is not a true VGA card. It is a MCGA card which is
         a subset of the VGA card and supports mode 19 (320 x 200 with 256
         colors) and mode 15 and 17. Issue a SET_DISPLY(4) followed by a set
         GRAPHMODE(9) for BIOS mode 17, or SET_DISPLY(3) followed by a
         GRAPHMODE(9) for BIOS mode 15, or SET_DISPLY(1) followed by a
         GRAPHMODE(1) or GRAPHMODE(2) for BIOS modes 4 and 6. The BIOS mode
         19 is not supported at this time.

   Examples

               FLIP_INIT()                 &&Initialize FLIPPER
               VM_INIT(10,0,"Flipper.Vm")
               CLEAR SCREEN                && Clear Screen with Clipper
               SET_SAYERR(1)               && Reports errors to screen
               M_mode = RET_CARD()         && Returns video adapter type
               M_monitor = RET_DISPLY()    && Returns monitor type
               DO WHILE .T.
                  @ 21,0 SAY "Enter FLIPPER Mode:   "GET M_SCREEN PICT '9'
                  @ 22,0 say "Enter Graphics Mode:  "GET M_MODE PICT '99'
                  READ
                  IF LASTKEY() = 27
                     EXIT
                  ENDIF
                  SET_DISPLY(M_SCREEN)     && Set monitor type
                  GRAPHMODE(M_MODE)        && Set FLIPPER graph mode
                  FSCREEN()                && Convert to graphics mode
               * say video BIOS mode on screen
                  SAY_TEXT(10,50,"BIOSmode:"+STR(RET_BIOS(),2))
               *
                  FOR I = 0 TO 15          && Draw boxes on screen
                     FLINE(I*10,I*10,I*10+20,I*10+20,I)
                  NEXT
               *
                  INKEY(0)                 && Wait until key is pressed
                  TEXTMODE()               && Return to text mode
               ENDDO

See Also: BIOS_MODE() FLIP_INIT() FSCREEN() SET_DISPLY()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson