old-www/HOWTO/Framebuffer-HOWTO/x591.html

1148 lines
18 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML
><HEAD
><TITLE
>Using framebuffer devices on m68k platforms</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.7"><LINK
REL="HOME"
TITLE="Framebuffer HOWTO"
HREF="index.html"><LINK
REL="PREVIOUS"
TITLE="Using framebuffer devices on x86 platforms"
HREF="x168.html"><LINK
REL="NEXT"
TITLE="Using framebuffer devices on PowerPC platforms"
HREF="x899.html"></HEAD
><BODY
CLASS="section"
BGCOLOR="#FFFFFF"
TEXT="#000000"
LINK="#0000FF"
VLINK="#840084"
ALINK="#0000FF"
><DIV
CLASS="NAVHEADER"
><TABLE
SUMMARY="Header navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TH
COLSPAN="3"
ALIGN="center"
>Framebuffer HOWTO</TH
></TR
><TR
><TD
WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="x168.html"
ACCESSKEY="P"
>Prev</A
></TD
><TD
WIDTH="80%"
ALIGN="center"
VALIGN="bottom"
></TD
><TD
WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="x899.html"
ACCESSKEY="N"
>Next</A
></TD
></TR
></TABLE
><HR
ALIGN="LEFT"
WIDTH="100%"></DIV
><DIV
CLASS="section"
><H1
CLASS="section"
><A
NAME="AEN591"
></A
>5. Using framebuffer devices on m68k platforms</H1
><DIV
CLASS="section"
><H2
CLASS="section"
><A
NAME="AEN593"
></A
>5.1. Atari platforms</H2
><P
>This section describe framebuffer options on Atari platforms</P
><DIV
CLASS="section"
><H3
CLASS="section"
><A
NAME="AEN596"
></A
>5.1.1. What modes are available?</H3
><DIV
CLASS="table"
><A
NAME="AEN598"
></A
><P
><B
>Table 2. Atari modes</B
></P
><TABLE
BORDER="1"
CLASS="CALSTABLE"
><THEAD
><TR
><TH
WIDTH="12%"
ALIGN="RIGHT"
VALIGN="MIDDLE"
>Depth</TH
><TH
WIDTH="12%"
ALIGN="CENTER"
VALIGN="MIDDLE"
>320x200</TH
><TH
WIDTH="12%"
ALIGN="CENTER"
VALIGN="MIDDLE"
>320x480</TH
><TH
WIDTH="12%"
ALIGN="CENTER"
VALIGN="MIDDLE"
>640x200</TH
><TH
WIDTH="12%"
ALIGN="CENTER"
VALIGN="MIDDLE"
>640x400</TH
><TH
WIDTH="12%"
ALIGN="CENTER"
VALIGN="MIDDLE"
>640x480</TH
><TH
WIDTH="12%"
ALIGN="CENTER"
VALIGN="MIDDLE"
>896x608</TH
><TH
WIDTH="12%"
ALIGN="CENTER"
VALIGN="MIDDLE"
>1280x960</TH
></TR
></THEAD
><TBODY
><TR
><TD
WIDTH="12%"
ALIGN="RIGHT"
VALIGN="MIDDLE"
>1 bit</TD
><TD
WIDTH="12%"
ALIGN="CENTER"
VALIGN="MIDDLE"
>&nbsp;</TD
><TD
WIDTH="12%"
ALIGN="CENTER"
VALIGN="MIDDLE"
>&nbsp;</TD
><TD
WIDTH="12%"
ALIGN="CENTER"
VALIGN="MIDDLE"
>&nbsp;</TD
><TD
WIDTH="12%"
ALIGN="CENTER"
VALIGN="MIDDLE"
>sthigh</TD
><TD
WIDTH="12%"
ALIGN="CENTER"
VALIGN="MIDDLE"
>vga2</TD
><TD
WIDTH="12%"
ALIGN="CENTER"
VALIGN="MIDDLE"
>falh2</TD
><TD
WIDTH="12%"
ALIGN="CENTER"
VALIGN="MIDDLE"
>tthigh</TD
></TR
><TR
><TD
WIDTH="12%"
ALIGN="RIGHT"
VALIGN="MIDDLE"
>2 bits</TD
><TD
WIDTH="12%"
ALIGN="CENTER"
VALIGN="MIDDLE"
>&nbsp;</TD
><TD
WIDTH="12%"
ALIGN="CENTER"
VALIGN="MIDDLE"
>&nbsp;</TD
><TD
WIDTH="12%"
ALIGN="CENTER"
VALIGN="MIDDLE"
>stmid</TD
><TD
WIDTH="12%"
ALIGN="CENTER"
VALIGN="MIDDLE"
>&nbsp;</TD
><TD
WIDTH="12%"
ALIGN="CENTER"
VALIGN="MIDDLE"
>vga4</TD
><TD
WIDTH="12%"
ALIGN="CENTER"
VALIGN="MIDDLE"
>&nbsp;</TD
><TD
WIDTH="12%"
ALIGN="CENTER"
VALIGN="MIDDLE"
>&nbsp;</TD
></TR
><TR
><TD
WIDTH="12%"
ALIGN="RIGHT"
VALIGN="MIDDLE"
>4 bits</TD
><TD
WIDTH="12%"
ALIGN="CENTER"
VALIGN="MIDDLE"
>stlow</TD
><TD
WIDTH="12%"
ALIGN="CENTER"
VALIGN="MIDDLE"
>&nbsp;</TD
><TD
WIDTH="12%"
ALIGN="CENTER"
VALIGN="MIDDLE"
>&nbsp;</TD
><TD
WIDTH="12%"
ALIGN="CENTER"
VALIGN="MIDDLE"
>&nbsp;</TD
><TD
WIDTH="12%"
ALIGN="CENTER"
VALIGN="MIDDLE"
>ttmid/vga16</TD
><TD
WIDTH="12%"
ALIGN="CENTER"
VALIGN="MIDDLE"
>falh16</TD
><TD
WIDTH="12%"
ALIGN="CENTER"
VALIGN="MIDDLE"
>&nbsp;</TD
></TR
><TR
><TD
WIDTH="12%"
ALIGN="RIGHT"
VALIGN="MIDDLE"
>8 bits</TD
><TD
WIDTH="12%"
ALIGN="CENTER"
VALIGN="MIDDLE"
>&nbsp;</TD
><TD
WIDTH="12%"
ALIGN="CENTER"
VALIGN="MIDDLE"
>ttlow</TD
><TD
WIDTH="12%"
ALIGN="CENTER"
VALIGN="MIDDLE"
>&nbsp;</TD
><TD
WIDTH="12%"
ALIGN="CENTER"
VALIGN="MIDDLE"
>&nbsp;</TD
><TD
WIDTH="12%"
ALIGN="CENTER"
VALIGN="MIDDLE"
>vga256</TD
><TD
WIDTH="12%"
ALIGN="CENTER"
VALIGN="MIDDLE"
>&nbsp;</TD
><TD
WIDTH="12%"
ALIGN="CENTER"
VALIGN="MIDDLE"
>&nbsp;</TD
></TR
></TBODY
></TABLE
></DIV
><P
><EM
>ttlow, ttmid and
ttmhigh</EM
> are only
used on the TT, whilst <EM
>vga2,
vga4, vga16, vga256, falh3 and
falh16</EM
> are only used
on the Falcon.</P
><P
>When used with the kernel option
video=xxx, and no
suboption is given, the kernel will
probe for the modes in the following
order until it finds a mode that is
possible with the given
hardware:</P
><P
></P
><UL
><LI
><P
>ttmid</P
></LI
><LI
><P
>tthigh</P
></LI
><LI
><P
>vga16</P
></LI
><LI
><P
>sthigh</P
></LI
><LI
><P
>stmid</P
></LI
></UL
><P
>You may specify the particular mode you
wish to use, if you don't wish to
auto-probe for the modes you desire.
For example, video=vga16
gives you a 4 bit 640x480
display.</P
></DIV
><DIV
CLASS="section"
><H3
CLASS="section"
><A
NAME="AEN679"
></A
>5.1.2. Additional suboptions</H3
><P
>There are a number of suboptions
available with the
video=xxx
parameter:</P
><P
></P
><UL
><LI
><P
>inverse -
inverts the display so
that the
background/foreground
colours are reversed.
Normally the background
is black, but with this
suboption, it gets sets
to
white.</P
></LI
><LI
><P
>font -
sets the font to use in
text modes. Currently
you can only select
VGA8x8,
VGA8x16,
PEARL8x8.
The default is to use
the VGA8x8
only if the vertical
size of the display is
less than 400 pixels,
otherwise it defaults
to
VGA8x16.</P
></LI
><LI
><P
>internal -
a very interesting
option. See the next
section for
information.</P
></LI
><LI
><P
>external
- as
above.</P
></LI
><LI
><P
>monitorcap
- describes the
capabilities
for multisyncs.
DON'T use with
a fixed sync
monitor!</P
></LI
></UL
><DIV
CLASS="section"
><H4
CLASS="section"
><A
NAME="AEN704"
></A
>5.1.2.1. Using the
suboption</H4
><P
>Syntax:
internal:(xres);(yres)[;(xres_max);(yres_max);(offset)]</P
><P
>This option specifies the
capabilities of some extended
internal video hardware, i.e
OverScan modes.
(xres) and
(yres) gives the
extended dimensions of the
screen.</P
><P
>If your OverScan mode needs a
black border, you'll need to
write the last three arguments
of the internal:
suboption.
(xres_max) is the
maximum line length that the
hardware allows,
(yres_max) is the
maximum number of lines, and
(offset) is the
offset of the visible part of
the screen memory to its
physical start, in
bytes.</P
><P
>Often extended internal video
hardware has to be activated,
for this you will need the
"switches=*"
options. [Note: Author would
like extra information on this,
please. The m68k documentation
in the kernel isn't clear
enough on this point, and he
doesn't have an Atari! Examples
would be helpful too]</P
></DIV
><DIV
CLASS="section"
><H4
CLASS="section"
><A
NAME="AEN719"
></A
>5.1.2.2. Using the suboption</H4
><P
>Syntax:
external:(xres);(yres);(depth);(org);(scrmem)[;(scrlen)[;(vgabase)[;(colw)[;(coltype)[;(xres_virtual)]]]]]</P
><P
>This is quite complicated, so
this document will attempt to
explain as clearly as possible,
but the Author would appreciate
if someone would give this a
look over and see that he
hasn't fscked something up!
:o)</P
><P
>This suboption specifies that you
have an external video hardware
(most likely a graphic board),
and how to use it with Linux.
The kernel is basically limited
to what it knows of the
internal video hardware, so you
have to supply the parameters
it needs in order to be able to
use external video hardware.
There are two limitations; you
must switch to that mode before
booting, and once booted, you
can't change modes.</P
><P
>The first three parameters are
obvious; gives the dimensions
of the screen as pixel height,
width and depth. The depth
supplied should be the number
of colours is 2^n that of the
number of planes required. For
example, if you desire to use a
256 colour display, then you
need to give 8 as the depth.
This depends on the external
graphic hardware, though so you
will be limited by what the
hardware can do.</P
><P
>Following from this, you also
need to tell the kernel how the
video memory is organised -
supply a letter as the
(org)
parameter</P
><P
></P
><UL
><LI
><P
>n
- use normal
planes, i.e one
whole plane
after another
</P
></LI
><LI
><P
>i
- use
interleaved
planes, i.e.
16 bits of the
first plane,
then the 16
bits of the
next plane and
so on. Only
built-in Atari
video modes
uses this - and
there are no
graphic card
that supports
this mode.
</P
></LI
><LI
><P
>p
- use packed
pixels, i.e
consecutive
bits stands for
all planes for
a pixel. This
is the most
common mode for
256 colour
displays
on graphic cards.</P
></LI
><LI
><P
>t
- use true
colour, i.e
this is
actually packed
pixels, but
does not
require a
colour lookup
table like what
other packed
pixel modes
uses. These
modes are
normally 24 bit
displays, and
provides 16.8
million
colours.</P
></LI
></UL
><P
><EM
>However</EM
>, for
monochrome modes, the
(org) parameter
has a different meaning:</P
><P
></P
><UL
><LI
><P
>n
- use normal
colours, i.e. 0
= white, 1 =
black</P
></LI
><LI
><P
>i
- use inverted
colours, i.e. 0
= black, 1 =
white</P
></LI
></UL
><P
>The next important item about the
video hardware is the base
address of the video memory.
That is given by the
(scrmem) parameter
as a hexadecimal number with an
0x prefix. You
will need to find this out from
the documentation that comes
with your external video
hardware.</P
><P
>The next paramter
(scrlen) tells the
kernel about the size of the
video memory. If it's missing,
this is calculated from the
(xres), and
(depth)
parameters. It's not useful to
write a value here these days
anyway. To leave this empty,
give two consecutive semicolons
if you need to give the
(vgabase)
parameter, otherwise, just
leave it.</P
><P
>The (vgabase)
parameter is optional. If it
isn't given, the kernel can't
read/write any colour registers
of the video hardware, and thus
you have to set up the
appropriate colours before you
boot Linux. But if your card is
VGA compatible, you can give it
the address where it can locate
the VGA register set so it can
change the colour lookup
tables. This information can be
found in your external video
hardware documentation. To make
this
<EM
>clear</EM
>,
(vgabase) is the
base address, i.e
a 4k aligned address. For
reading/writing the colour
registers, the kernel uses the
address range between
(vgabase) + 0x3c7 and
(vgabase) + 0x3c9.
This parameter is given in
hexadecimal and must have a
0x prefix, just
like (scrmem).
(colw) is only
meaningful, if the
(vgabase)
parameter is specified. It
tells the kernel how wide each
of the colour register is, i.e
the number of bits per single
colour (red/green/blue).
Default is usually 6 bits, but
it is also common to specify 8
bits.</P
><P
>(xres_virtual) is
only required for the
ProMST/ET4000 cards where the
physical linelength differs
from the visible length. With
ProMST, you need to supply
2048, whilst for ET4000, it
depends on the initialisation
of the video board.</P
></DIV
></DIV
></DIV
><DIV
CLASS="section"
><H2
CLASS="section"
><A
NAME="AEN773"
></A
>5.2. Amiga platforms</H2
><P
>This section describes the options for Amigas,
which are quite similar to those of the Atari
platform</P
><DIV
CLASS="section"
><H3
CLASS="section"
><A
NAME="AEN776"
></A
>5.2.1. What modes are available?</H3
><P
>This depends on the chipset used in the
Amiga. There are three main ones;
OCS, ECS and
AGA which all uses the
colour frame buffers.</P
><P
></P
><UL
><LI
><P
>NTSC modes</P
></LI
><LI
STYLE="list-style-type: none"
><P
></P
><UL
><LI
STYLE="list-style-type: none"
><P
>ntsc
-
640x200</P
></LI
><LI
STYLE="list-style-type: none"
><P
>ntsc-lace
-
640x400</P
></LI
></UL
></LI
><LI
><P
>PAL
modes</P
></LI
><LI
STYLE="list-style-type: none"
><P
></P
><UL
><LI
STYLE="list-style-type: none"
><P
>pal
-
640x256</P
></LI
><LI
STYLE="list-style-type: none"
><P
>pal-lace
-
640x512</P
></LI
></UL
></LI
><LI
><P
>ECS modes - 2 bit
colours on ECS
chipsets, 8 bit colours
on AGA chipsets
only</P
></LI
><LI
STYLE="list-style-type: none"
><P
></P
><UL
><LI
STYLE="list-style-type: none"
><P
>multiscan
-
640x480</P
></LI
><LI
STYLE="list-style-type: none"
><P
>multiscan-lace
-
640x960</P
></LI
><LI
STYLE="list-style-type: none"
><P
>euro36
-
640x200</P
></LI
><LI
STYLE="list-style-type: none"
><P
>euro36-lace
-
640x400</P
></LI
><LI
STYLE="list-style-type: none"
><P
>euro72
-
640x480</P
></LI
><LI
STYLE="list-style-type: none"
><P
>euro72-lace
-
640x800</P
></LI
><LI
STYLE="list-style-type: none"
><P
>super72
-
800x300</P
></LI
><LI
STYLE="list-style-type: none"
><P
>super72-lace
-
800x400</P
></LI
><LI
STYLE="list-style-type: none"
><P
>dblntsc
-
640x200</P
></LI
><LI
STYLE="list-style-type: none"
><P
>dblpal
-
640x256</P
></LI
><LI
STYLE="list-style-type: none"
><P
>dblntsc-ff
-
640x400</P
></LI
><LI
STYLE="list-style-type: none"
><P
>dblntsc-lace
-
640x800</P
></LI
><LI
STYLE="list-style-type: none"
><P
>dblpal-ff
-
640x512</P
></LI
><LI
STYLE="list-style-type: none"
><P
>dblpal-lace
-
640x1024</P
></LI
></UL
></LI
><LI
><P
>VGA modes - 2 bit
colours on ECS
chipsets, 8 bit colours
on AGA
chipsets</P
></LI
><LI
STYLE="list-style-type: none"
><P
></P
><UL
><LI
STYLE="list-style-type: none"
><P
>vga
-
640x480</P
></LI
><LI
STYLE="list-style-type: none"
><P
>vga70
-
640x400</P
></LI
></UL
></LI
></UL
></DIV
><DIV
CLASS="section"
><H3
CLASS="section"
><A
NAME="AEN859"
></A
>5.2.2. Additional suboptions</H3
><P
>These are similar to the Atari
suboptions. They are:</P
><P
></P
><UL
><LI
><P
>depth -
specifies the pixel bit
depth</P
></LI
><LI
><P
>inverse -
does the same thing as
the Atari
suboption</P
></LI
><LI
><P
>font -
does the same thing as
the Atari suboption,
although the
PEARL8x8
font is used instead of
the VGA8x8
font if the display
size is less than 400
pixels
wide.</P
></LI
><LI
><P
>monitorcap
- specifies the
capabilities of the
multisync monitor. Do
not use with fixed sync
monitors</P
></LI
></UL
></DIV
><DIV
CLASS="section"
><H3
CLASS="section"
><A
NAME="AEN877"
></A
>5.2.3. Supported Amiga graphic expansion
boards</H3
><P
></P
><UL
><LI
><P
>Phase5
CyberVision
64 (S3
Trio64
chipset)</P
></LI
><LI
><P
>Phase5
CyberVision 64
3D (S3
ViRGE
chipset)</P
></LI
><LI
><P
>MacroSystems
Retina
Z3 (NCR
77C32BLT
chipset)</P
></LI
><LI
><P
>Helfrich Piccolo,
SD64, GVP ECS
Spectrum,
Village Tronic
Picasso II /
II+ and
IV
(Cirrus Logic GD542x /
543x
chipsets)</P
></LI
></UL
></DIV
><DIV
CLASS="section"
><H3
CLASS="section"
><A
NAME="AEN892"
></A
>5.2.4. Macintosh platforms</H3
><P
>Currently, the framebuffer device
implemented only supports the mode
selected in MacOS before booting into
Linux, and also supports 1, 2, 4 and 8
bit colours modes.</P
><P
>Framebuffer suboptions are selected using
the following syntax:</P
><P
>video=macfb:&#60;font&#62;:&#60;inverse&#62;</P
><P
>You can select fonts such as VGA8x8,
VGA8x16 and 6x11 etc. The inverse
option allows you to use reverse
video.</P
></DIV
></DIV
></DIV
><DIV
CLASS="NAVFOOTER"
><HR
ALIGN="LEFT"
WIDTH="100%"><TABLE
SUMMARY="Footer navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="x168.html"
ACCESSKEY="P"
>Prev</A
></TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="index.html"
ACCESSKEY="H"
>Home</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="x899.html"
ACCESSKEY="N"
>Next</A
></TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
>Using framebuffer devices on x86 platforms</TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
>&nbsp;</TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
>Using framebuffer devices on PowerPC platforms</TD
></TR
></TABLE
></DIV
></BODY
></HTML
>