Detect video hardware and start the correct driver
crttrap [-b bits] [-c trap_file] [-e] [-F keyword] [-gx,y]
[-r] [-t trap_file] [-V] [-VV]
[-wg graphics_opt] [-wm modesw_opt] [-wt trap_opt]
[-X keyword] command
- -b bits
- Choose mode by the number of bits per pixel. This is
usually done when trapping video modes to change the default
trapped mode.
- -c trap_file
- Specify trap filename. The default is /etc/config/trap/crt.$NODE.
- -e
- Use the 8086 emulator to perform calls to the video ROM BIOS. Supported by all modeswitchers
and trappers.
- -F keyword
- Force specific card type during trap. The force keywords (see "Trapper modules"
below) depend on the trap programs specified in crttrap.list.
- -gx,y
- Choose mode by resolution. This is usually done when trapping video modes to change the default trapped mode.
- -r
- Cause the modeswitcher to switch to real mode under QNX 4.xx or Virtual 8086 mode under Neutrino to do the modeswitch.
- -t trap_file
- Specify trap list file. The default is: /qnx4/graphics/trappers/crttrap.list.
- -V
- Be verbose.
- -VV
- Be very verbose and pass on the -V option to the trapper programs that are started.
- -wg graphics_opt
- Pass option to graphics driver.
- -wm modesw_opt
- Pass option to modeswitcher.
- -wt trap_opt
- Pass option to trapper.
- -X keyword
- Exclude specific card types.
- command
- Start the probe with one of these commands:
- clear - Remove the current trap file (/etc/config/trap/crt.$NODE).
- dump - Print the contents of the trap file (/etc/config/trap/crt.$NODE).
- query - Print the command line that would be executed by start.
- safe - Ignore the trap file and start vesabios.ms for
VGA 640x480, 16 color and the Photon graphics driver Pg.vga4.
- start - Execute the first line of the trap file
(/etc/config/trap/crt.$NODE) to
start the modeswitcher and a photon graphics driver.
- trap - Execute all trap programs, compile the result, and write
it as the trap file /etc/config/trap/crt.$NODE.
|
If you change your video hardware, run crttrap clear to
remove your current configuration file. If you don't, your video driver may fail. |
The crttrap utility detects video hardware and/or starts
the correct drivers. It runs in two main modes:
- trap mode
- In trap mode, crttrap executes the video card
detection modules (trapper modules). The results are compiled and written as the file
/etc/config/trap/crt.$NODE. Each line in the
crt.$NODE file specifies a video card mode-setting
module (modeswitcher) and a graphics driver.
- start mode
- In start mode, crttrap reads the first line of
crt.$NODE and executes the modeswitcher
and then the graphics driver.
Each trapper module detects a different chip set or capability and composes
a list of corresponding modeswitcher/driver invocations.
Some trappers look for generic capabilities, others provide more in-depth
support. The output of the trappers are combined and placed in
/etc/config/trap/crt.$NODE.
The phgrafx utility
uses the combined output of the trappers to provide a list of available display modes.
The following table describes the chip sets or capabilities that each trapper
detects:
Detectable chip sets/capabilities/cards |
Trapper name
(modeswitcher) |
3DFX Voodoo Banshee, 3DFX Voodoo3
|
banshee.trap
|
ATI Mach 8, ATI Mach 32 chips
|
mach.trap
|
ATI Mach 64 chips
|
m64bios.trap,
Hydra.ms -T
|
ATI Rage3D chips
|
ragebios.trap,
Hydra.ms -T
|
ATI Rage128 chips
|
rage128.trap
|
Chips and Technologies chips
|
chipsbios.trap,
Hydra.ms -T
|
Cirrus Logic chips
|
cirrusbios.trap,
Hydra.ms -T
|
Cyrix MediaGX chips
|
Cyrixbios.trap
|
Flat capability
|
Hydra.ms -T
|
IGS chips
|
IGSbios.trap,
Hydra.ms -T
|
MagicMedia256AV, MagicGraph128XD, MagicGraph128ZV+ chips
|
neomagic.trap
|
Matrox Millenium, Millenium II,
Mystique, Mystique II PCI/AGP chips
|
matbios.trap
|
Number 9 Imagine 128 Series II chips,
Revolution 3D (T2R/Series III) chips
|
Number9bios.trap
|
nVidia Riva TNT, nVidia Riva TNT2 chips
|
tnt.trap
|
Rendition V2x00 chips
|
Rendition.trap
|
S3-based chips
|
s3bios.trap,
s3bios.ms
|
S3 ViRGE chips
|
s3bios.ms,
virge.ms
|
ST Microelectronics STPC multimedia processor chips
|
STPCbios.trap
|
Super VGA video modes for ATI Wonder, Tseng3000, Tseng4000, OAK Technologies,
Trident, Chips, Genoa, Everex, Video7, Paradise
|
svgabios.trap
|
VESA 1.2 capability
|
vesabios.trap
|
VESA 2 capability
|
vesabios.trap,
Hydra.ms -T |
Specifying the -F or -X option during the
crttrap graphics probe causes the *.trap
modules to force or exclude specific types of cards.
If the chipset is implemented using the PCI or AGP bus, it's
never necessary to force trapping.
The trapper corresponding to the keyword generates new arguments for
the corresponding modeswitcher and graphics driver.
The following table lists the modeswitchers and graphics drivers
Photon supports for the -F and -X options:
Trapper |
keyword |
Modeswitcher |
Driver
|
banshee.trap
|
banshee
|
Null.ms
|
Pg.Banshee,
Pg.Banshee90
|
chipsbios.trap
|
chips, dchips
|
chipsbios.ms
|
Pg.chips,
Pg.chipsMM,
Pg.chipsdc,
Pg.chipsdc24
|
cirrusbios.trap
|
cirrus, dcirrus
|
cirrusbios.ms
|
Pg.cirrblit,
Pg.cirrnblit
|
Cyrixbios.trap
|
cyrix
|
Cyrixbios.ms
|
Pg.Cyrix,
Pg.Cyrixdc
|
Hydra.ms -T
|
ignored
|
Hydra.ms -S
|
Pg.flat,
Pg.flatdc,
Pg.flatdc24,
Pg.flatdc32
|
IGSbios.trap
|
igs
|
IGSbios.ms
|
Pg.IGS,
Pg.IGSdc,
Pg.IGS50XX,
Pg.IGS50XXds
|
m64bios.trap
|
mach64
|
m64bios.ms
|
Pg.m64,
Pg.m64isa,
Pg.m64dc,
Pg.m64dc24
|
mach.trap
|
mach, mach32
|
mach.ms
|
Pg.m32
|
matbios.trap
|
matrox
|
matbios.ms
|
Pg.matrox,
Pg.matroxdc
|
neomagic.trap
|
neomagic
|
vesabios.ms
|
Pg.neomagic
|
Number9bios.trap
|
Number9
|
Number9bios.ms
|
Pg.Number9,
Pg.Number9dc
|
rage128.trap
|
rage128
|
Null.ms
|
Pg.rage128
|
ragebios.trap
|
rage
|
Null.ms
|
Pg.rage
|
Rendition.trap
|
Rendition
|
Rendition.ms
|
Pg.Rendition
|
s3bios.trap
|
s3, virge
|
s3bios.ms, s3dir.ms, virge.ms
|
Pg.s3,
Pg.s3isa,
Pg.s3dc,
Pg.s3dc24,
Pg.virge,
Pg.virgedc,
Pg.virgedc32
|
STPCbios.trap
|
STPC
|
STPCbios.ms
|
Pg.STPC,
Pg.STPCdc
|
svgabios.trap
|
vga, video7, paradise, tseng3000, tseng4000,
trident, chips, ati, ati18800, ati18800-1,
ati28800, ati28800-4, ati28800-5, atixl, ati28800-6,
atixl24, ati68800
|
vesabios.ms
|
Pg.vga4,
Pg.svga,
Pg.svgadc
|
tnt.trap
|
tnt
|
Null.ms
|
Pg.tnt
|
vesabios.trap
|
ignored
|
vesabios.ms
|
Pg.vga4,
Pg.svga,
Pg.svgadc
|
Each modeswitcher can set the video mode for different
types of video cards. The modeswitcher programs are located in
/qnx4/graphics/drivers/*.ms and /qnx4/graphics/trappers/*.ms.
The options for setting the mode of a video card could
include:
- -c
- Name of console to attach to (the default is standard input). A modeswitcher attaches to
a console in order to prevent the console driver from interfering with
the cards operation in graphics mode.
- -c none
- Don't attach to a console.
- -e
- Use the 8086 emulator to perform calls to the video ROM BIOS. Supported by all modeswitchers
and trappers.
- -n
- Name to register (the default is qnx/crt). The modeswitcher registers the name
so that the graphics driver can attach to and communicate with the modeswitcher.
- -n none
- Don't register a name.
- -R[I|L|M|H]
- Set refresh rate to: Interlaced, Low (usually 60Hz), Medium, or High.
(This option isn't supported by all modeswitchers and graphics cards.)
- -V
- Be verbose.
Each trapper/modeswitcher has additional arguments that're
tailored to the particular family of chips it was written for. These are usually
somewhat consistent from family to family:
- -A0xlocation
- Specifies the memory location of the video aperture.
- -S0xsize
- Size of the aperture in bytes.
- -Minfo
- Specific private info.
- -inumber
- Mode number (usually a VESA mode number).
The options for Hydra.ms include all of the options
listed in the above section Mode-switching modules (modeswitchers), plus the following:
- -i<mode>
- Specifies the VESA/SVGA video mode to switch to.
- -r
- Switch the processor into real-8086 mode to perform calls to
the video ROM BIOS. This option isn't compatible with
multiple-monitor configurations, but is sometimes necessary to
avoid some timing problems that occur with the 8086 emulator.
Hence certain multi-montitor configurations are not compatible
with Hydra.ms
- -S
- Instructs Hydra.ms to act as a modeswitcher.
- -s0x<bus>,0x<device-function>
- When switching modes, bus specifies the PCI/AGP bus number of the
card to select, and also the device and function number. The
13 most significant bits of device-function represent the device
number, and the three least significant bits represent the function number.
- -T
- Instructs Hydra.ms to act as a trapper.
|
The Null.ms modeswitcher is used by some of the newer drivers that do their own modeswitching to
prevent text-mode operation from interfering with graphics-mode operations. |
Each graphics driver is designed for different video modes
and for different video accelerators. These programs are located in the
/qnx4/graphics/drivers/Pg.* files. For a description of the
cards these programs support, see "Driver
descriptions" below.
The options for starting a graphics driver could include:
|
Don't rely on the following options! Although they're still supported by most drivers, they'll eventually be deprecated:
-c Dim, -c Ghost, -c Opt, -D A, -D I,
-D N, -M, -WC t,st, -WD...,
-WG g, -WU, -WV |
- -A o,s
- Define the physical address and size of video memory.
- -c
- Cursor options:
- -c Dim - Dim cursors from other input groups.
- -c Ghost - Ghost cursors from other input groups (default).
- -c HW - Enable hardware cursor if available (default).
- -c Ignore - Ignore cursors from other input groups.
- -c Normal - Display cursors from all input groups as normal cursors.
- -c n - Maximum number of concurrent cursors (default: 8).
- -c Opt - Enable cursor optimization; cursor may disappear when inactive.
- -c SW - Force software cursor, disable hardware cursor.
- -D
- Dithering options:
- -D 2 - Reduce number of dither patterns to 2.
- -D 4 - Reduce number of dither patterns to 4.
- -D 8 - Reduce number of dither patterns to 8 (default: 16).
- -D A - Dither all lines, fill, text, and bitmaps.
- -D I - Dither images.
- -D N - Dither never.
- -G n
- Set primary Photon input group.
- -g X,Y,B
- Define the size and color depth of the video mode such
as -g 640,480,4 for the standard VGA mode of 640*480 in 16 colors.
- -HN...
- The name registered by the process that set the video mode.
If this process remains, the graphics driver will direct services to it.
- -HP...
- Make the graphics driver a child of a region.
- -i n
- Maximum points in internal point buffer (default: 1024).
- -M
- Convert all colors to monochrome.
- -n name
- Name of Photon server to attach to. If the name starts
with a digit, it's a node number. If the name starts with a
slash (/) it's a full path. Otherwise, the system
looks for the server name in the dev directory.
- -o X,Y
- Place the graphics driver at a specific location in the
Photon event space.
- -P palette_file
- Load the graphics driver's initial palette. The palette data
is stored as 4 bytes per pixel arranged as blue, green, red, and a spare.
- -p n
- Maximum number of palettes in palette cache (default: 8).
- -s n
- Maximum number of screen buffers (default: 32).
- -WB...
- Bytes per scan line of video memory.
- -WC t,st
- Video card Type and SubType.
- -WD...
- Driver-specific DAC type.
- -WG g
- Bankswitching granularity.
- -WR...
- I/O register base.
- -WS...
- Name of shared memory object to use in place of physical memory.
- -WU...
- BUS type.
- -WV...
- Total video memory on graphics card.
- -w n
- Graphics driver internal workspace (default: 16K).
- -wc n
- Number of internal clipping rectangles (default: 256).
- -wr n
- Initial receive buffer size in K (default: 4K).
- -wu n
- Number of user clipping rectangles (default: 64).
- -Z none
- Disable gamma correction.
- -Z val
- Set gamma correction factor (0 no correction; default: 0.2).
- -ZB val
- Set black level for gamma correction (default: 0.06).
- -ZW val
- Set white level for gamma correction (default: 1).
|
You can also specify gamma correction values as RGB
values for monitors with inconsistent colors. |
- Pg.Banshee
- Supports the 3DFX Voodoo Banshee, and the 3DFX Voodoo3 chip sets.
Extra options:
-B
Enable double-buffered mode of operation to reduce flicker.
-d0x<pci-vendor-id>,0x<pci-device-id>
Specify the PCI/AGP Vendor and Device ID's of the device to be driven.
-I<n>
Specify the instance of the PCI/AGP device to be driven.
-R<n>
Specify the monitor refresh rate, in Hz, for the display mode.
- Pg.Banshee90
- Supports the same as Pg.Banshee, but in portrait-mode.
- Pg.chips
- Supports these Chips and Technologies chips: CT65540, CT65545, CT65548,
CT65550, CT65554, CT65555, CT69000.
- Pg.chipsMM
- Required for only PCI implementations of the 65545 chip set.
- Pg.chipsdc
- Supports the Chips and Technologies chips in direct-color modes with
16 bits per pixel.
- Pg.chipsdc24
- Supports the Chips and Technologies chips in direct-color modes with
24 bits per pixel.
- Pg.cirrblit
- Supports these Cirrus Logic chips: 5426, 5428, 5429, 5430, 5432, 5434, 5436, 5440, 5446, 5465, 5480, 7543, 7548.
- Pg.cirrnblit
- Similar to Pg.cirrblit, but doesn't have a hardware blitter. Supports these
Cirrus Logic chips: 5422, 5424, 5425.
- Pg.Cyrix
- Supports the Cyrix Media GX Processor in 8-bit palette-based modes.
- Pg.Cyrixdc
- Supports the Cyrix Media GX Processor in direct-color modes with 16 bits per pixel.
(The hardware isn't capable of more than 16-bit operation).
- Pg.flat
- Supports selected PCI/AGP-based chips in 8-bit palette-based modes,
and is faster than the Pg.svga driver. Also supports most
VESA 2.0-based cards as well as cards that provide a linear frame buffer
(i.e. doesn't require bankswitching).
- Pg.flatdc
- Supports VESA 2.0 capability and selected PCI/AGP chips in direct-color
modes with 16 bits per pixel.
This driver is faster than the Pg.svgadc driver,
which uses bankswitching.
- Pg.flatdc24
- Supports VESA 2.0 capability and selected PCI/AGP chips in direct-color
modes with 24 bits per pixel.
This driver is faster than the Pg.svgadc driver,
which uses bankswitching.
- Pg.flatdc32
- Supports VESA 2.0 capability and selected PCI/AGP chips in direct-color
modes with 32 bits per pixel.
This driver is faster than the Pg.svgadc driver,
which uses bankswitching.
- Pg.IGS
- Supports these IGS chips in 8-bit palette-based modes: IGA 1682/83,
IGA CyberPro 2000, IGA CyberPro 2010.
- Pg.IGSdc
- Supports these IGS chips in 16-bit direct-color modes: IGA 1682/83,
IGA CyberPro 2000, IGA CyberPro 2010.
- Pg.IGS50XX
- Supports these IGS chip in 8-bit palette-based modes: IGA CyberPro 5000, IGA CyberPro 5050.
- Pg.IGS50XXdc
- Supports these IGS chips in direct-color modes with 16 and 24 bit color: IGA CyberPro 5000, IGA CyberPro 5050.
- Pg.m32
- Supports ATI Mach 32 chips in 256 colors with a maximum resolution of 1280*1024.
The driver supports direct access to video memory and the builtin
hardware cursor. This family of chips includes the Ultra Pro, Mach32, and Wonder GT.
- Pg.m64
- The Pg.m64 driver supports some ATI Mach 64 chips in 256 colors
with memory-mapped registers (e.g. Graphics XPRESSION, Graphics PROTURBO,
WINBOOST, WINTURBO, VIDEO XPRESSION, etc.).
The family of chips for the Pg.m64 driver includes the Mach64 (GX, CX, CT, ET).
Extra options:
-WM...
Card-specific information.
- Pg.m64dc
- The Pg.m64dc driver supports some ATI Mach 64 chips in direct-color mode
with 16 or 32 bits per pixel and memory-mapped registers (e.g. see Pg.m64).
Extra options:
-WM...
Card-specific information.
- Pg.m64dc24
- The Pg.m64dc24 driver supports some ATI Mach 64 chips in direct-color mode
with 24 bits per pixel and memory-mapped registers (e.g. see Pg.m64).
Extra options:
-WM...
Card-specific information.
- Pg.m64isa
- Supports ATI Mach 64 chips in 256 colors with I/O
mapped registers. This driver is required for ISA bus-based video
cards and VESA Local Bus-based cards on a system with 16M or more of
system RAM (e.g. see Pg.m64).
Extra options:
-WM...
Card-specific information.
- Pg.matrox
- Supports the Matrox Millenium, Millenium II, Mystique,
Mystique II, Matrox G100, PCI/AGP chip sets.
- Pg.matroxdc
- Supports the Matrox Millenium, Millenium II, Mystique, and
the Mystique II chips in direct-color modes with 16 or 32 bits per pixel.
- Pg.neomagic
- Supports the NeoMagic 2200 (MagicMedia256AV), NeoMagic 2160 (MagicGraph128XD), and the
NeoMagic 2097 (MagicGraph128ZV+) chip sets.
- Pg.Number9
- Supports some of the Number 9 Imagine 128 Series II chips, and the
Revolution 3D (Ticket 2 Ride/Series III) chips in 8-bit palette-based modes.
- Pg.Number9dc
- Supports some of the Number 9 Imagine 128 Series II chips, and
the Revolution 3D (Ticket 2 Ride/Series III) chips in
direct-color modes at 15, 16, and 32 bits per pixel.
- Pg.Rendition
- Supports the V2X00 series Rendition Verité.
- Pg.rage
- The Pg.rage driver supports ATI Rage3D GT or VT chips in 256 colors
with memory-mapped registers (e.g. Graphics XPRESSION, Graphics PROTURBO,
WINBOOST, WINTURBO, VIDEO XPRESSION, etc.).
The family of chips for the Pg.rage driver includes the VT, GT (3D Rage I, II, Pro, Pro LT).
Extra options:
-WM...
Card-specific information.
- Pg.rage128
- Supports the Rage128 chip set. (Since Pg.rage128 is significantly
different from prior Rage chips, a new driver is required.)
Extra options:
-B
Enable double-buffered mode of operation to reduce flicker.
-d0x<pci-vendor-id>,0x<pci-device-id>
Specify the PCI Vendor and Device ID's of the device to be driven.
-I<n>
Specify the instance of the PCI/AGP device to be driven.
-R<n>
Specify the monitor refresh rate, in Hz, for the display mode.
- Pg.s3
- Supports S3-based video cards in 256 colors: 805, 905, 811, 911, 828, 928, 864, 964, 868, 968, and
Trio 32/64/64V+. (See also Pg.virge for additional S3 chip support.)
Extra options:
-WM...
Card-specific information.
- Pg.s3dc
- Supports S3-based video cards in direct-color modes with
16 or 32 bits per pixel. (See Pg.s3 for a list of
supported chips).
Extra options:
-WM...
Card-specific information.
- Pg.s3dc24
- Supports S3-based video cards in direct-color modes with
24 bits per pixel. (See Pg.s3 for a list of supported chips).
Extra options:
-WM...
Card-specific information.
- Pg.s3isa
- Supports older S3-based video cards in 256 colors.
This driver is required for ISA bus-based video cards and VESA Local
Bus-based cards on a system with 16M or more of system RAM. (e.g. see Pg.s3).
Extra options:
-WM...
Card-specific information.
- Pg.STPC
- Supports the SGS Thompson STPC CPU multimedia chip.
- Pg.STPCdc
- Supports the SGS Thompson STPC CPU multimedia chip in direct-color modes with 16 bits per pixel.
- Pg.svga
- This driver is designed to access video memory as a
series of bytes, where each byte is a pixel, with a palette that is set through
the VGA palette registers. If the video memory exceeds the size of the
memory aperture, the driver will use bankswitching.
In this mode, the driver accesses video memory through the VGA 64K
aperture. Since the video memory for these modes exceeds 64K, the
video memory is bankswitched through the aperture. This driver is
able to directly bankswitch cards with these chip sets: ATI
Wonder, Chips and Technologies, Video7, ArkLogic, Paradise, Cirrus,
Trident, Tseng3000, and Tseng4000. The driver can also use the
bankswitching code provided by a VESA 1-compliant BIOS.
Since the industry is dropping this method in favor of linear
frame buffers - we recommend that you try to use
Pg.flat or Pg.flatdc drivers.
- Pg.svgadc
- Supports 16, 24, and
32 bits per pixel direct-color video modes on some older video cards.
- Pg.tnt
- Supports the nVidia Riva TNT, and the nVidia Riva TNT 2 chip sets.
Extra options:
-d0x<pci-vendor-id>,0x<pci-device-id>
Specify the PCI Vendor and Device ID's of the device to be driven.
-I<n>
Specify the instance of the PCI/AGP device to be driven.
-R<n>
Specify the monitor refresh rate, in Hz, for the display mode.
- Pg.virge
- Supports S3 ViRGE chips in 8-bit palette-based modes.
- Pg.virgedc
- Supports S3 ViRGE chips in direct-color modes at 16
bits per pixel.
- Pg.virgedc24
- Supports S3 ViRGE chips in direct-color modes at 24
bits per pixel.
- Pg.virgedc32
- Supports S3 ViRGE chips in direct-color modes at 32
bits per pixel.
- Pg.vga4
- Supports any 16-color VGA graphics mode that doesn't require bankswitching.
Generally, this driver works in 320*200, 640*480, and
800*600 16-color modes.
Execute all trapper programs and compile the result in
/etc/config/trap/crt.$NODE:
crttrap trap
Execute the first line of crt.$NODE
to start the modeswitcher and the corresponding graphics driver:
crttrap start
Ignore crt.$NODE and start the
vesabios.ms modeswitcher for a VGA 640*480
16-color card and the corresponding graphics driver
Pg.vga4:
crttrap safe
Print the command line that would be executed by
crttrap start:
crttrap query
Print the contents of the crt.$NODE file:
crttrap dump
Remove the current crt.$NODE file:
crttrap clear
Tell the chipsbios.trap trapper to assume there's a
Chips and Technologies card present in the system:
crttrap -F chips
phgrafx