Re: Bitmap palette
From: Herman Dullink (hd5_at_hetnet.nl)
Date: 05/16/04
- Next message: flekso: "Re: Hyperthreading Goal"
- Previous message: Tim Roberts: "Re: too much memory"
- In reply to: Stephen Sprunk: "Re: Bitmap palette"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Sun, 16 May 2004 09:03:31 +0000 (UTC)
> > For the standard MCGA/VGA mode #13 (320x200x256) you can:
> > out 3C8,<index of first palette entry>
> > for each palette entry
> > out 3C9,<red value>
> > out 3C9,<green value>
> > out 3C9,<blue value>
> While this version is safer, one must be aware that "in" and "out"
> instructions are serialized on the P4, i.e. each requires around 20
> clock cycles to execute, with no opportunity to schedule parallel
> instructions.
That's OK, as it takes a few instructions to get the proper <red value>,
<green value> and <blue value>.
These 'out' instructions have to be used at some point, either by the
BIOS routine, or your own code.
If prefer data to be in the original form as long as possible. Therefor
I prefer a routine which uses the bitmap's aRGB structure above a
conversion and another routine.
It usually saves time and resources.
H
- Next message: flekso: "Re: Hyperthreading Goal"
- Previous message: Tim Roberts: "Re: too much memory"
- In reply to: Stephen Sprunk: "Re: Bitmap palette"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|