Package “Svgalib (>=” has 201 man pages.
convfont(1) convert the standard format binary fontfile name fontfile to the codepage format required by restorefont(1). The converted font is written to vgafontfile. A... dumpreg(1) The chipset drivers of svgalib inquire the mode of the graphic card when the application is started and restore it when the svgalib application quits. dumpreg... fix132x43(1) This program tries to fix problems with extended textmodes on some cards. The problem is that for 132x43 textmode, some BIOS's set the vertical display end... restorepalette(1) restorepalette without arguments sets the standard VGA palette. This can be useful if it is somehow messed up. With a filename argument a custom palette can be... runx(1) If XFree86 corrupts your textmode font, try putting restorefont(1) in your path and use the shell script runx to run X. runx saves the VGA font data in... savetextmode(1) These are simple scripts to save the SVGA register state when in textmode to the files /etc/vga/fontdata and /etc/vga/textregs ($HOME/.vga/fontdata and... setmclk(1) This program sets the memory clock of Cirrus 5424/26/28 cards. The first three values could be set by utility programs that came with my card (AVGA3), but... svgakeymap(1) Generates a keymap conversion file for svgalib(7) from two keytable definitions. Keytables are searched for in /lib/kbd/keymaps and are automatically filtered... gl_allocatecontext(3) Allocate a graphics context. This is preferred to hardcoding a context variable in a program since the latter is incompatible with a future vgagl version that... gl_bcircle(3) Draw a Bresenham circle of radius r in color c , centered at ( x , y ). Fill should be 0 for a hollow circle, or any other value for a solid color. This... gl_circle(3) Draw a circle of radius r in color c, centered at (x, y). gl_colorfont(3) Set all nonzero pixels in the expanded font fp with 256 characters of size fw and fh each to color c. gl_compileboxmask(3) Convert the rectangular masked bitmap of size (w, h) at sdp to a compressed format that allows faster drawing, which is stored at ddp. Allocating w * h bytes... gl_compiledboxmasksize(3) Returns the size of the compiled version of the masked bitmap of size (w, h) at sdp that would be generated by compileboxmask(3). Compiled bitmaps are only... gl_copybox(3) Copy the rectangular area at (x1, y1) of size (w, h), to (x2, y2) (screencopy). gl_copyboxfromcontext(3) Copy the rectangular area at (x1, y1) in the context gc of size (w, h) to position (x2, y2) in the current context. This is more efficient than... gl_copyboxtocontext(3) Copy the rectangular area at (x1, y1) of size (w, h) to position (x2, y2) in the context gc. If possible use copyboxfromcontext(3). gl_copyscreen(3) Copy the current graphics context contents (screen data) to the specified graphics context (the physical screen, for example). Contexts are assumed to be... gl_enableclipping(3) Enable automatic clipping in most functions. No, I don't know which ones. However, it works for most. gl_copybox(3) is report to do no clipping. Go figure. gl_expandfont(3) Convert a bit-per-pixel font at sfp with 256 characters of size (fw, fh) to an expanded font of character pixmaps, stored at dfp (size will be 256 * fw * fw *... gl_fillbox(3) Fill a rectangular area at position (x, y) with size (w, h) of the screen with a single color c. gl_fillcircle(3) Draw a filled circle of radius r in color c , centered at ( x , y ). gl_font8x8(3) gl_font8x8 contains a packed pixel font with 8x8 pixels per character which you can use in your vgagl programs. Before you can use it, you might need to expand... gl_freecontext(3) Free the space allocated for the virtual screen in the given context gc which should better be a virtual context. gl_getbox(3) Copy a rectangular bitmap at position (x, y) with size (w, h) from the screen to a buffer dp. Pixmaps are in row-major order. The destination pixmap has the... gl_getcontext(3) Save the current context in the structure variable gc. You can also get the current context from the global variable currentcontext; However, simply access... gl_getpalettecolor(3) gl_getpalettecolor gets red, green and blue values (in the range 0 - 63) of color c from the color-lookup-table, and stores them as integers in the memory... gl_getpixel(3) Returns the color of pixel at position (x, y) in the format used in the screen memory. The color -1 is returned for points outside the clipping window. gl_getpixelrgb(3) Store color components from pixel at (x, y) ranging from 0 to 255 into integers pointed to by r, g and b. gl_hline(3) Draw a horizontal line from point (x1, y) to (x2, y) in color c. x1 must not be larger than x2. If x2<x1 the function does nothing. gl_line(3) Draw a line from point (x1, y1) to (x2, y2) inclusively in color c. You should not assume that the same drawing trajectory is used when you exchange start and... gl_printf(3) gl_printf writes, like printf(3) a formatted string to position (x, y) using the currently selected font. If one or both of x and y is negative, the text... gl_putbox(3) Copy the contents of a memory buffer dp to a rectangular bitmap at position (x, y) with size (w, h). Pixmaps are in row-major order. The source pixmap memory... gl_putboxmask(3) Copy the contents of a memory buffer dp to a rectangular bitmap at position (x, y) with size (w, h). This function works like gl_putbox, but does not write... gl_putboxmaskcompiled(3) Copy the contents of a memory buffer dp to a rectangular bitmap at position (x, y) with size (w, h). This function works like gl_putbox, but does not write... gl_putboxpart(3) Copy the contents of a memory buffer dp to a rectangular bitmap at position (x, y) with size (w, h). However, only a part of size (bw, bh) starting at offset... gl_rgbcolor(3) Returns pixel value used in the current context that corresponds with the given color components. Used by setpixelrgb(3). gl_scalebox(3) Scale the bitmap of size (w1, h1) at sdp to size (w2, h2) and store it at ddp, which must be a large enough buffer. The pixel size of the current graphics... gl_setclippingwindow(3) Set the clipping window to the rectangle with top-left corner (x1, y1) and bottom-right corner (x2, y2) (inclusively). gl_setcontext(3) Restore a previously saved context (make it the current context). gl_setcontextvirtual(3) Define the current graphics context to have a width of w pixels, height h, bpp bytes per pixel, bitspp significant color bits per pixel (8, 15, 16 or 24), with... gl_setcontextwidth(3) Set the size of the current virtual context, effectively clipping everything to the top left corner of size (w, h). gl_setdisplaystart(3) Set the physical display start address to the pixel at (x, y). Can be used for hardware scrolling, or for page flipping (e.g. setdisplaystart(0, HEIGHT)... gl_setfont(3) Use the font stored as character bitmaps at fp, with characters of size (fw, fh), as the basic font for write operations. Note that the font included in the... gl_setpalettecolor(3) gl_setpalettecolor sets red, green and blue values (in the range 0 - 63) of color c from the color-lookup-table to r, g and b. gl_setpalettecolors sets RGB... gl_setpixel(3) gl_setpixel draws a single pixel at position (x, y) in color c. The lower 8, 15, 16 or 24 bits of the color are significant, depending on the number of colors... gl_setscreenoffset(3) Set the offset in pixels into video memory for copyscreen(3) and copyboxtocontext(3), copyboxfromcontext(3) and thus allows for page-flipping. Must be a... gl_striangle(3) Draws a non-interpolated (solid) triangle between the three points 0, 1 and 2 with the color color. The bf value is used to tell the routine not to draw the... gl_swtriangle(3) Draws a triangle at points 0, 1, 2 by mapping the pixmaps defined in the TD_triangle structure into the triangle. The xd and yd values represent the triangle on... gl_triangle(3) Draws a triangle between the three points 0, 1 and 2. z0, z1 and z2 are the colors at those points. Hence, if you set the palette to a grayscale, the triangle... gl_trisetcolorlookup(3) gl_trisetcolorlookup sets the color of an index i in the table used in more than 256 color modes to interpolate tables. Note that it is your responsibility to... gl_trisetdrawpoint(3) If this function is called with setpixelfunc non-zero, then the function setpixelfunc is used from there after to draw each pixel (instead of the usual direct... gl_write(3) gl_write writes the zero terminated string s to position (x, y) using the currently selected font. gl_writen works similarly, but writes exactly n characters... gl_wtriangle(3) Draws a triangle at points 0, 1, 2 by mapping the pixmaps defined in the TD_triangle structure into the triangle. The xd and yd values represent the triangle on... joystick_close(3) closes the joystick joydev which was opened with joystick_init(3). joydev = -1 closes all currently open joystick devices. Note that any calibration data is... joystick_getnumaxes(3) queries the number of axes (number of continuous ranges which the joystick allows to choose from) and buttons. The old version 0.* joystick protocol reports 2... joystick_init(3) This function opens a joystick device. A negative value is returned on failure, otherwise the joystick was initialized. svgalib(7) supports several joysticks... joystick_update(3) queries all currently opened joysticks for position changes and calls the appropriate event handlers. A non-zero value is returned if and only if any joystick... keyboard_clearstate(3) When in raw keyboard mode, svgalib receives press and release events from the kernel and keeps track which keys are currently pressed. Calling... keyboard_close(3) This routine returns the keyboard to normal operation from raw mode. If you used one of the keyboard_init_*() routines you should call it prior to leaving your... keyboard_getstate(3) When in raw keyboard mode this routine returns a pointer buffer to a static buffer. If the value in buffer[scancode] is KEY_PRESSED or KEY_NOTPRESSED the key... keyboard_init(3) These routines initialize the keyboard to raw mode. No ASCII codes are produced, instead svgalib keeps track of each single keypress or depress. The return_fd... keyboard_keypressed(3) When in raw keyboard mode this routine checks if the key with scancode is pressed and returns KEY_PRESSED or KEY_NOTPRESSED accordingly. Actually KEY_PRESSED is... keyboard_translatekeys(3) This function sets several flags which control how certain scancodes are mapped. At startup a mask value of 0 is active. mouse_close(3) Closes the mouse device file. This should be called at the end of the program (if a mouse is used) because it tries to restore the original mouse state, if it... mouse_getcaps(3) This fills a structure with information about the capabilities of the mouse as configured in /etc/vga/libvga.config. The return value is 0 on success, -1 on... mouse_getx(3) These three routines do the obvious, namely returning current mouse pointer position and button state. mouse_getbutton() returns an integer which can be bitwise... mouse_init(3) These routines can be used to open the mouse manually, ignoring the mouse types or devices specified in the config file. dev is the name of the mouse device... mouse_setscale(3) This routine sets the scale factor between the motion reported by the mouse and the size of one pixel. The larger the scale is, the slower the mouse cursor... mouse_setwrap(3) This routine determines what to do if the mouse position reaches a boundary. state should be either MOUSE_WRAP, MOUSE_NOWRAP, or a bitwise or of MOUSE_WRAPX... mouse_setxrange(3) These two define the boundaries for mouse cursor. x1, x2, y1, and y2 are the coordinates of the left, right, bottom, and top edges of the screen, respectively... mouse_update(3) This reads in mouse events from the mouse buffer and updates the internal svgalib variables which store the current mouse position and button states. If there... mouse_waitforupdate(3) This reads in mouse events from the mouse buffer and updates the internal svgalib variables which store the current mouse position and button states. If there... vga_accel(3) This is the major function of the new accelerator interface which was sketched in version 1.2.3 (Michael: Hmm, it must have been later) but was implemented much... vga_addmode(3) Adds a mode to the list of modes, with the given parameters. The function returns the mode number. If such a mode already exists on the list, its number is... vga_addtiming(3) Adds the given line of mode timing to the table of user timing, as if the line is in the config file. For a description of the parameters' meaning, see... vga_bitblt(3) Bitblit (copy rectangular area in video memory), addresses are offsets into video memory (up to 2M). The pitch is the logical width of the screen. Height h is... vga_blitwait(3) waits for any accelerator operation to finish. Though already implemented not useful because these old style functions do not allow for parallel operation of... vga_changetiming(3) Changes the value of the current timing parameters by the given values. No checks are made to see if the new timing are within monitor or card specs. See... vga_claimvideomemory(3) Declare the amount of video memory in bytes that is to be saved when temporarily switching to textmode. Returns nonzero if the amount is not available. Defaults... vga_clear(3) Clears the screen and sets all visible pixels to 0 (which is usually black). This is automatically done by a vga_setmode(3) call. The function always returns 0... vga_copytoplanar256(3) Copy part of a linear virtual screen in system memory at *virtual to Mode X style video memory. pitch is the logical width of the virtual screen (in pixels... vga_disabledriverreport(3) Usually svgalib prints the name of the hardware detected or forced to the screen during startup. This and other informational messages are suppressed when... vga_drawline(3) draws a line from (x1, y1) to (x2, y2) on the screen. If you exchange start and end of the line you should not expect the exactly identical set of pixel be... vga_drawscanline(3) draws a horizontal line over the whole screen in the line with y coordinate line. The colors drawn are taken from color .. color[length - 1]. This is a... vga_drawscansegment(3) draws a horizontal line of length pixels starting at position (x, y). The colors drawn are taken from color .. color[length - 1]. Svgalib versions prior to... vga_dumpregs(3) This function dumps the current values of all SVGA registers in a way which can by copied in a source file. This is for debugging purposes only. vga_ext_set(3) sets and several extended features. Before trying to call vga_ext_set() you should check if it is available in vga_getmodeinfo(3) for compatibility with old... vga_fillblt(3) Fill a rectangular area in video memory with a single color color. destaddr is an offset into video memory (up to 2M). The pitch is the logical width of the... vga_flip(3) switches between graphics and text mode without destroying the screen contents. This makes it possible for your application to use both text and graphics... vga_getcardinfo(3) The function returns a pointer to a card information structure which is filled out with details about the video card in use. #include <vga.h> defines... vga_getdefaultmode(3) Returns the default graphics mode number from the SVGALIB_DEFAULT_MODE environment variable. If undefined, the from the default_mode configuration file option... vga_getkey(3) Read a character from the keyboard without waiting; returns zero if no key pressed and the ASCII value otherwise. This function must not be used in raw keyboard... vga_getmodeinfo(3) The function returns a pointer to a statical allocated mode information structure which is filled out with details for a video mode mode. #include <vga.h>... vga_getmodename(3) A pointer to a static memory buffer is returned. Depending on mode it consist of a capital G followed by the amount of x pixels, followed by a lower case x... vga_getmodenumber(3) The function parses *name and tries to find a videomode corresponding on it. *name is parsed case insensitive and should be either an integer string just giving... vga_getmonitortype(3) This returns the monitor type configered in /etc/vga/libvga.config. This function is really obsolete, as the result is of not much use to the application... vga_getpalette(3) Get the color with index index and store its RGB values at *r, *g, and *b, each in the range 0 - 63. This function is only sensible in 16 or 256 color modes. It... vga_getpalvec(3) Gets the num colors starting with index start from the color lookup table and stores the RGB values in *pal. *pal contains 3 * num integers which are the color... vga_getscansegment(3) The direct opposite of vga_drawscansegment(). The line of length pixels starting at (x, y) is not drawn but instead the colorvalues are taken from the screen... vga_gettextmoderegs(3) The functions gives access to the buffer where svgalib saves the vga state which is use when the kernel displays text on the SVGA. This is used by the... vga_getxdim(3) These function return the currently selected screen resolution resp. number of displayable colors. vga_guesstiming(3) Calculates a timing line for a x*y resolution, according to the value of clue. vga_hasmode(3) The function returns a non-zero value if the given mode is supported and 0 else. See vga_setmode(3) for a list of predefined mode values and their meaning... vga_hlinelistblt(3) *xmin and *xmax are pointers to arrays of n integers. There are n horizontal lines drawn, for i in 0 .. (n - 1) a horizontal line will be drawn from pixel... vga_imageblt(3) Write a rectangular pixmap from system memory to video memory. destaddr is an offset into video memory (up to 2M). The pitch is the logical width of the screen... vga_init(3) It detects the chipset and gives up supervisor rights. This is the recommended first line of any program that uses svgalib. vga_setchipset(3) can be called... vga_initcursor(3) if sw is non-zero, this initializes the software cursor. Otherwise calls the chipset driver's cursor init function. If the driver supports does not support a... vga_lastmodenumber(3) Returns the last video mode number. As video mode numbers start with 1 (0 is for textmode) this allows an application to scan through all possible modes... vga_lockvc(3) Disables virtual console switching for safety. Recommended when doing register I/O or low-level device handling. Used by mouse functions. Also useful in... vga_norevokeprivs(3) Calling this function prevents svgalib from revoking root privileges and returning to the uid of the user running the program. Usually svgalib revokes... vga_oktowrite(3) Indicates whether the program is in the console currently visible on the screen, that is, whether it is OK to write to video memory (if running in the... vga_runinbackground_version(3) returns the version of the current background support which is 1 (uses proc-fs). In case svgalib is compiled without background support, 0 is returned. See... vga_safety_fork(3) Calling this at the start of a program results in a better chance of textmode being restored in case of a crash. However it has to raise the iopl level to 3 to... vga_screenoff(3) The functions turn the generation of the video signal on or off. On some video boards, SVGA memory access is faster when no video signal is generated. On the... vga_setchipset(3) Force detection of a chipset (when chipset detection fails). vga_setchipset(VGA) can be useful if the chipset specific stuff or the SVGA detection stuff gives... vga_setcolor(3) Set the current color to color. You may only use vga_setcolor() in 256 or less color modes. For the other modes you must use vga_setrgbcolor(3) instead. The... vga_setcursorimage(3) Sets cursor image number cur to be the pattern pointed by buf with colors c0 and c1. The format parameter decides the format of the input pattern. vga_setcursorposition(3) Sets the position of the top left corner of the mouse square to be at the pixel position ( x , y ). vga_setdisplaystart(3) Set the display start address to a, where the address is the number of pixels offset from the start of video memory, except for hicolor/truecolor modes, which... vga_setegacolor(3) Set the current color to be a color resembling the color-th EGA coler. This works regardless of the depth of the current video mode. The color is used by... vga_setflipchar(3) This sets the ASCII code of the key which causes vga_getch(3) to shortly switch between graphics and text mode when waiting for a keypress. <ESC> is the default... vga_setlogicalwidth(3) Set the logical scanline width to l bytes. It must be a multiple of 8. Only changes the VGA register, drawing functions don't take it into account. The logical... vga_setmode(3) vga_setmode(int mode) selects the video mode given and clears the screen (if it was a graphics mode). Basically this should be the first action of your... vga_setmodeX(3) Try to enable Mode X-like memory organization for 256 color modes using up to 256K of memory like 320x200x256 and 640x400x256. Modes like 320x240x256 etc. are... vga_setmousesupport(3) Set mouse support; 0 disables (default), 1 enabled. If enabled, the mouse is set up for screen resolution after a mode set and you can use the various mouse_... vga_setpage(3) Usually SVGA cards have more than the 64K memory which suffice for an ordinary VGA. However, the memory window mapped at vga_getgraphmem(3) is only 64K bytes... vga_setpalette(3) Set the current color with index index to RGB values r, g, and b, each in the range 0 - 63. This function is only sensible in 16 or 256 color modes. It selects... vga_setpalvec(3) Sets the num colors starting with index start to the RGB values in *pal. *pal contains 3 * num integers which are the color values to set from first to last... vga_setrgbcolor(3) Set the current color to RGB values r, g, and b, each in the range 0-255. Does not make sense in 256 or less color modes. Use vga_setcolor(3) there. The color... vga_showcursor(3) if show == 0, hides the cursor. if show == 1, shows the cursor. if show == 2, hides the cursor only if a software cursor is in use. vga_waitevent(3) This is the only function allowing you to wait for keyboard AND mouse events. It is based on the select(2) library function, so for deep understanding of... vga_waitretrace(3) Wait for vertical retrace, that is when the video beam goes dark and returns from the bottom line to the top line. Useful to synchronize animation with monitor... vga_white(3) vga_white() returns the color white in the current screen resolution as it would be set with vga_setcolor(3) or written directly into the screen. In high color... libvga.config(5) The svgalib configuration is usually located in /etc/vga/libvga.config though one can reconfigure this location when recompiling svgalib. In the configuration... accel(6) Test new-style accelerated functions (As of this writing: Ark, Cirrus, Chips & Technologies cards, and Mach32 only). For other cards the demo will not work... bg_test(6) Tests the enhanced support of recent svgalibs to draw while switched to the background. Draws a small centered white box then waits until you switch to another... fun(6) Random moving pixels accumulate in clusters. Uses virtual screens for frame animation. This uses basic VGA functionality and works only in 320x200x256. Hit... joytest(6) This demo program tries to open the joystick with the given number and calibrates it. The user is prompted to press <Return> after which any state change of the... keytest(6) A program to test the low-level keyboard interface. This uses basic VGA functionality (or an svga mode you specify). Works only in 256 color modes. Cursor keys... mach32info(6) mach32info prints out almost all the info about your mach32 card from configuration registers and Mach32 EEPROM. It also measures the Mach32 clocks. A... mjoytest(6) This demo program utilizes joysticks 0 and 1 in graphics mode. If you specify a joystick number, only this is used. The demo separates the screen in two parts... mousetest(6) A simple program to test mouse functionality. This uses basic VGA functionality (or an svga mode you specify, you should stick to 256 color modes). The proper... plane(6) A greyscale-shaded rendered-on-the-fly turbo-prop that you can rotate and scale however you like. The demo prompts your for a mode to be used and several... printftest(6) This test utility reads keys from the keyboard and displays them on the screen at pixel position (x, y) using gl_printf(3). It must be linked with the ELF... scrolltest(6) Smooth scrolling demo. Uses three different techniques. Useful for testing Mode X functionality (not that I would recommend it over 320x240x256 linear). Press... speedtest(6) Video memory speed tester. Selects the given mode and makes linear screen accesses. Prints the overall run time of the test and deduces the speed with which the... spin(6) Another mouse test program. This is the first svgalib program to use the 6-dimensional mouse routines. It draws a wireframe spheroid on the screen which can be... svidtune(6) mode is an svgalib mode number for the mode to be tuned. The number of colours is irrelevant, but the mode must be supported by the hardware. svidtune displays... testaccel(6) Program to test the old blitter functions in a screen mode. Checks the 8-bit wide color lookup tables on Mach32's with type 2 DACs as well. [I think '6bpp' and... testgl(6) Demo program for vgagl(7) framebuffer library. Runs in any mode preset from the environment. First draws pixels in random locations, then random boxes, then... testlinear(6) Program to test linear addressing on Cirrus cards and on Mach32 (and other cards which may support it). Selects 640x480x256 and tries to enable a linear frame... threed(6) Well, the 3d demo... I, Michael, the current svgalib maintainer, do not have any source for it. Thus, you may experience weird problems with new svgalib... vgatest(6) Mode test program. First the program gives a list of the supported modes, then you enter a number and vgatest displays a test pattern in that mode. The test... wrapdemo(6) Demonstrates surface wrapping of pixmaps by wrapping a picture or Susanna Rubens around a 3-dimensional ball. The demo prompts your for a mode to be used and... svgalib(7) 0. Introduction 1. Installation 2. How to use svgalib 3. Description of svgalib functions 4. Overview of supported SVGA chipsets and modes 5. Detailed comments... svgalib.chips(7) Information for Chips and Technologies Users David Bateman <firstname.lastname@example.org> 23nd May 1997 0. Introduction 1. "libvga.config" options 2. Unsupported... svgalib.et4000(7) NOTE: The ET4000 register layout changed stepping from svgalib 0.98 to 0.99. See 8. Problems below first 1. Basics of ET4000 cards 2. How to configure... svgalib.faq(7) I (Matan Ziv-Av), added/changed some of the answers in this file, so some answers are mine, and some are Michael's. List of (recently) frequently asked... svgalib.mach32(7) 0. Introduction 1. Specifying pixel clocks 2. Copyrights 3. The mach32info utility 4. Third party cards 5. Logical linewidth 6. Noisy video signals 7. The... vgagl(7) 0. Introduction 1. How to use vgagl 2. Description of vgagl functions 3. Macros defined in vgagl.h mode3(8) The video card is set to vesa mode modenum (or 3 by default) using the (real mode) vesa bios calls. vga_reset(8) Call real mode c000:0003, which should be the video card's initialization routine. Should work in some cases when mode3 fails to restore text mode.