Here is an older posting from Nick Costescu (Clemson University/QRTS):
To use multiple monitors under Photon, you must be running at least version
1.13 of Photon which includes the Hydra.ms trapper/mode switcher.
For best results, both cards must be VESA 2.0 compliant. Although it is not
strictly neccessary, you will likely have less trouble if both cards are
identical. You must also have a PCI 2.1 motherboard, and the cards must be PCI
cards.
This method works by switching both cards into graphics mode and enabling a
linear frame buffer. Pg.flat or Pg.flatdc can then be used, both of which
only access the memory using the CPU… no accelleration is possible.
To start, go into your computers CMOS options, and check the following settings
if your computer has them:
Palette Snooping == ON or Enabled
Plug and Play aware OS == OFF or disabled
Next, power down and put both cards in the machine. If your machine does not
boot, or it boots but there are problems even in text mode, do not call us.
You will need to get different cards or upgrade your motherboard.
To generate a trap file for use with Hydra.ms, go to the
/qnx4/graphics/drivers directory, and type the following:
‘Hydra.ms -T >file’
This will invoke the Hydra.ms program in (T)rap mode. This mode will generate
a list of ‘mode switcher;driver’ commands for each mode and each card in the
system.
This process may take some time, but you should see the secondary monitor
perform a video BIOS warm boot while the process is taking place. You will see
the signon screen that would be seen if this machine were booted with only the
secondary card installed.
You must ensure that nothing attempts to display text on your console screen
during the trap process, as well as during the mode switch that will occur
later when you go to run Photon.
If your machine hangs while trying to perform this trap, you’re probably out
of luck. Assuming the trap is successful, your file should look something like
the following:
Card 1, Bus 0, Dev/Func 90
Hydra.ms -S -i0x4100 -s0x0000,0x0090;Pg.flat -HC0x00000090 -PX -HNqnx/crt
-g640x400x8 -A0xFF000000,0x400000 -WB640;#640,400,8,100,1,flat - SVGA 256 color
Hydra.ms -S -i0x4101 -s0x0000,0x0090;Pg.flat -HC0x00000090 -PX -HNqnx/crt
-g640x480x8 -A0xFF000000,0x400000 -WB640;#640,480,8,100,1,flat - SVGA 256 color
Hydra.ms -S -i0x4103 -s0x0000,0x0090;Pg.flat -HC0x00000090 -PX -HNqnx/crt
-g800x600x8 -A0xFF000000,0x400000 -WB1024;#800,600,8,100,1,flat - SVGA 256 color
Hydra.ms -S -i0x4105 -s0x0000,0x0090;Pg.flat -HC0x00000090 -PX -HNqnx/crt
-g1024x768x8 -A0xFF000000,0x400000 -WB1024;#1024,768,8,100,1,flat - SVGA 256
color
Hydra.ms -S -i0x4107 -s0x0000,0x0090;Pg.flat -HC0x00000090 -PX -HNqnx/crt
-g1280x1024x8 -A0xFF000000,0x400000 -WB1280;#1280,1024,8,100,1,flat - SVGA 256
color
Hydra.ms -S -i0x4110 -s0x0000,0x0090;Pg.flatdc -HC0x00000090 -PX -HNqnx/crt
-g640x480x16 -A0xFF000000,0x400000 -WB1280;#640,480,16,100,1,flatdc - VGA
hi-color
Hydra.ms -S -i0x4111 -s0x0000,0x0090;Pg.flatdc -HC0x00000090 -PX -HNqnx/crt
-g640x480x16 -A0xFF000000,0x400000 -WB1280;#640,480,16,100,1,flatdc - VGA
hi-color
Hydra.ms -S -i0x4112 -s0x0000,0x0090;Pg.flatdc32 -HC0x00000090 -PX -HNqnx/crt
-g640x480x32 -A0xFF000000,0x400000 -WB2560;#640,480,32,100,1,flatdc32 - VGA
hi-color
Hydra.ms -S -i0x4113 -s0x0000,0x0090;Pg.flatdc -HC0x00000090 -PX -HNqnx/crt
-g800x600x16 -A0xFF000000,0x400000 -WB1920;#800,600,16,100,1,flatdc - VGA
hi-color
Hydra.ms -S -i0x4114 -s0x0000,0x0090;Pg.flatdc -HC0x00000090 -PX -HNqnx/crt
-g800x600x16 -A0xFF000000,0x400000 -WB1920;#800,600,16,100,1,flatdc - VGA
hi-color
Hydra.ms -S -i0x4115 -s0x0000,0x0090;Pg.flatdc32 -HC0x00000090 -PX -HNqnx/crt
-g800x600x32 -A0xFF000000,0x400000 -WB3200;#800,600,32,100,1,flatdc32 - VGA
hi-color
Hydra.ms -S -i0x4116 -s0x0000,0x0090;Pg.flatdc -HC0x00000090 -PX -HNqnx/crt
-g1024x768x16 -A0xFF000000,0x400000 -WB2048;#1024,768,16,100,1,flatdc - VGA
hi-color
Hydra.ms -S -i0x4117 -s0x0000,0x0090;Pg.flatdc -HC0x00000090 -PX -HNqnx/crt
-g1024x768x16 -A0xFF000000,0x400000 -WB2048;#1024,768,16,100,1,flatdc - VGA
hi-color
Hydra.ms -S -i0x411C -s0x0000,0x0090;Pg.flat -HC0x00000090 -PX -HNqnx/crt
-g1600x1200x8 -A0xFF000000,0x400000 -WB1664;#1600,1200,8,100,1,flat - SVGA 256
color
Hydra.ms -S -i0x4118 -s0x0000,0x0090;Pg.flatdc32 -HC0x00000090 -PX -HNqnx/crt
-g1024x768x32 -A0xFF000000,0x400000 -WB4096;#1024,768,32,100,1,flatdc32 - VGA
hi-color
Hydra.ms -S -i0x4119 -s0x0000,0x0090;Pg.flatdc -HC0x00000090 -PX -HNqnx/crt
-g1280x1024x16 -A0xFF000000,0x400000 -WB2560;#1280,1024,16,100,1,flatdc - VGA
hi-color
Hydra.ms -S -i0x411A -s0x0000,0x0090;Pg.flatdc -HC0x00000090 -PX -HNqnx/crt
-g1280x1024x16 -A0xFF000000,0x400000 -WB2560;#1280,1024,16,100,1,flatdc - VGA
hi-color
Hydra.ms -S -i0x411D -s0x0000,0x0090;Pg.flatdc -HC0x00000090 -PX -HNqnx/crt
-g1600x1200x16 -A0xFF000000,0x400000 -WB3200;#1600,1200,16,100,1,flatdc - VGA
hi-color
Hydra.ms -S -i0x411E -s0x0000,0x0090;Pg.flatdc -HC0x00000090 -PX -HNqnx/crt
-g1600x1200x16 -A0xFF000000,0x400000 -WB3200;#1600,1200,16,100,1,flatdc - VGA
hi-color
Card 2, Bus 0, Dev/Func 88
Hydra.ms -S -i0x4100 -s0x0000,0x0088 -cnone -nqnx/crt88;Pg.flat -HC0x00000088
-PX -HNqnx/crt88 -g640x400x8 -A0xFE800000,0x400000 -WB640;
Hydra.ms -S -i0x4101 -s0x0000,0x0088 -cnone -nqnx/crt88;Pg.flat -HC0x00000088
-PX -HNqnx/crt88 -g640x480x8 -A0xFE800000,0x400000 -WB640;
Hydra.ms -S -i0x4103 -s0x0000,0x0088 -cnone -nqnx/crt88;Pg.flat -HC0x00000088
-PX -HNqnx/crt88 -g800x600x8 -A0xFE800000,0x400000 -WB960;
Hydra.ms -S -i0x4105 -s0x0000,0x0088 -cnone -nqnx/crt88;Pg.flat -HC0x00000088
-PX -HNqnx/crt88 -g1024x768x8 -A0xFE800000,0x400000 -WB1024;
Hydra.ms -S -i0x4107 -s0x0000,0x0088 -cnone -nqnx/crt88;Pg.flat -HC0x00000088
-PX -HNqnx/crt88 -g1280x1024x8 -A0xFE800000,0x400000 -WB1280;
Hydra.ms -S -i0x4110 -s0x0000,0x0088 -cnone -nqnx/crt88;Pg.flatdc -HC0x00000088
-PX -HNqnx/crt88 -g640x480x16 -A0xFE800000,0x400000 -WB1280;
Hydra.ms -S -i0x4111 -s0x0000,0x0088 -cnone -nqnx/crt88;Pg.flatdc -HC0x00000088
-PX -HNqnx/crt88 -g640x480x16 -A0xFE800000,0x400000 -WB1280;
Hydra.ms -S -i0x4112 -s0x0000,0x0088 -cnone -nqnx/crt88;Pg.flatdc32
-HC0x00000088 -PX -HNqnx/crt88 -g640x480x32 -A0xFE800000,0x400000 -WB2560;
Hydra.ms -S -i0x4113 -s0x0000,0x0088 -cnone -nqnx/crt88;Pg.flatdc -HC0x00000088
-PX -HNqnx/crt88 -g800x600x16 -A0xFE800000,0x400000 -WB1920;
Hydra.ms -S -i0x4114 -s0x0000,0x0088 -cnone -nqnx/crt88;Pg.flatdc -HC0x00000088
-PX -HNqnx/crt88 -g800x600x16 -A0xFE800000,0x400000 -WB1920;
Hydra.ms -S -i0x4115 -s0x0000,0x0088 -cnone -nqnx/crt88;Pg.flatdc32
-HC0x00000088 -PX -HNqnx/crt88 -g800x600x32 -A0xFE800000,0x400000 -WB3200;
Hydra.ms -S -i0x4116 -s0x0000,0x0088 -cnone -nqnx/crt88;Pg.flatdc -HC0x00000088
-PX -HNqnx/crt88 -g1024x768x16 -A0xFE800000,0x400000 -WB2048;
Hydra.ms -S -i0x4117 -s0x0000,0x0088 -cnone -nqnx/crt88;Pg.flatdc -HC0x00000088
-PX -HNqnx/crt88 -g1024x768x16 -A0xFE800000,0x400000 -WB2048;
Hydra.ms -S -i0x411C -s0x0000,0x0088 -cnone -nqnx/crt88;Pg.flat -HC0x00000088
-PX -HNqnx/crt88 -g1600x1200x8 -A0xFE800000,0x400000 -WB1600;
Hydra.ms -S -i0x4118 -s0x0000,0x0088 -cnone -nqnx/crt88;Pg.flatdc32
-HC0x00000088 -PX -HNqnx/crt88 -g1024x768x32 -A0xFE800000,0x400000 -WB4096;
Hydra.ms -S -i0x4119 -s0x0000,0x0088 -cnone -nqnx/crt88;Pg.flatdc -HC0x00000088
-PX -HNqnx/crt88 -g1280x1024x16 -A0xFE800000,0x400000 -WB2560;
Hydra.ms -S -i0x411A -s0x0000,0x0088 -cnone -nqnx/crt88;Pg.flatdc -HC0x00000088
-PX -HNqnx/crt88 -g1280x1024x16 -A0xFE800000,0x400000 -WB2560;
Hydra.ms -S -i0x411D -s0x0000,0x0088 -cnone -nqnx/crt88;Pg.flatdc -HC0x00000088
-PX -HNqnx/crt88 -g1600x1200x16 -A0xFE800000,0x400000 -WB3200;
Hydra.ms -S -i0x411E -s0x0000,0x0088 -cnone -nqnx/crt88;Pg.flatdc -HC0x00000088
-PX -HNqnx/crt88 -g1600x1200x16 -A0xFE800000,0x400000 -WB3200;
Here’s an analysis of one of the secondary trap lines:
Hydra.ms ← name of mode switcher
-S ← flag to tell it to perform a mode switch
-i0x4100 ← which (VESA) mode number to switch to
-s0x0000,0x0088 ← PCI bus,(PCI Device << 3) | PCI Function
-cnone ← which console to ‘hold’ (none for secondary)
-nqnx/crt88; ← name to register (based on PCI info)
Pg.flat ← driver to run
-HC0x00000088 ← Channel number (based on PCI info)
-PX ← set palette using Xternal agent (i.e. Hydra.ms)
-HNqnx/crt88 ← name to use when sending palette requests
-g640x400x8 ← resolution/color depth
-A0xFE800000,0x400000 ← Aperture/size info
-WB640; ← Bytes Per Scanline
You may have trouble trying to use a palette based mode since many (or most)
cards still use the VGA I/O registers to program the palette. It’s probably
easiest to simply use 16 bit modes.
To run Photon, take one of the lines from the primary card…
Hydra.ms -S -i0x4117 -s0x0000,0x0090;Pg.flatdc -HC0x00000090 -PX -HNqnx/crt
-g1024x768x16 -A0xFF000000,0x400000 -WB2048;#1024,768,16,100,1,flatdc - VGA
hi-color
…split it at the semicolon…
Hydra.ms -S -i0x4117 -s0x0000,0x0090;
Pg.flatdc -HC0x00000090 -PX -HNqnx/crt -g1024x768x16 -A0xFF000000,0x400000
-WB2048;#1024,768,16,100,1,flatdc - VGA hi-color
… stuff one of the secondary lines in the middle…
Hydra.ms -S -i0x4117 -s0x0000,0x0090;
Hydra.ms -S -i0x4117 -s0x0000,0x0088 -cnone -nqnx/crt88;Pg.flatdc -HC0x00000088
-PX -HNqnx/crt88 -g1024x768x16 -A0xFE800000,0x400000 -WB2048;
Pg.flatdc -HC0x00000090 -PX -HNqnx/crt -g1024x768x16 -A0xFF000000,0x400000
-WB2048;#1024,768,16,100,1,flatdc - VGA hi-color
… and then sew the mess back together:
Hydra.ms -S -i0x4117 -s0x0000,0x0090;Hydra.ms -S -i0x4117 -s0x0000,0x0088 -cnone
-nqnx/crt88;Pg.flatdc -HC0x00000088 -PX -HNqnx/crt88 -g1024x768x16
-A0xFE800000,0x400000 -WB2048;Pg.flatdc -HC0x00000090 -PX -HNqnx/crt
-g1024x768x16 -A0xFF000000,0x400000 -WB2048;#1024,768,16,100,1,flatdc - VGA
hi-color
Make this the top line of your nodes trap file, and then just type ‘ph’.
You probably want to move the second screen over to the right of the first
screen. Add a ‘-o’ argument to the secondary cards driver command. In this case,
adding ‘-o1024’ moves the second screen so it starts just to the right of the
first screen.
That should be it. Now that you have the graphics drivers running, you should be
able to figure out how to get multiple keyboards or multiple Photon sessions
running.
In article <397FE2AA.1D5C5542@nctimes.net>, Ken says…
I don’t know where to begin with this request made to me. I have to add
a second (VGA only) display to my application. This second display
needs to have a graphics picture on it. This picture needs to match the
existing ones (so manuals don’t change etc.) so I have an exact picture
to replicate.
Under QNX 4.2x…
-
How do I add a 2nd display. Just add a second VGA adapter and let
the install program figure it out? (Obvious: Just make sure there are
no hardware conflicts.)
-
How do I send graphic commands (via a ‘c’ program) to draw on this
2nd display?
-
What graphic commands are available? To date I have just needed
ncurses - which work perfectly fine for my needs. Using Photon is out
of the question - someone else’s decision.
-
The graphic picture has bargraphs and a line graph with variable
text all over the display and is in color.
Thanks,
KenR