EGA/VGA set pixel comments
- From: Steve <spamtrap@xxxxxxxxxx>
- Date: Thu, 22 Dec 2005 10:02:15
Hello,
In a previous thread [Capture EGA?] I suggested using
the BIOS write pixel function to start programming in
the EGA/VGA 16 color modes. The OP wanted to write his
own low level routines. In a fit of holiday grumpiness,
I decided to test out my advice by timeing the BIOS 0CH
function and an assembly routine. I got a little carried
away, and generated some data that may be of interest to
some of you.
Routine 1 is a variation of a routine from "Programmer's
Guide to PC Video Systems" by Richard Wilton. The parameters
are passed differently. Routine 2 is the BIOS function
wrapped in a procedure to save registers. Routine 3 was
an attempt to write my own "improved" routine similar to
#1. It is (partly) based on "Programmer's Guide to the
EGA and VGA Cards" by Richard F. Ferraro, routine 1, and
whatever else was lying around at the time. This was not
optimized or finished up properly when it was found to be
no better than the other two at that time.
These are all one pixel at a time routines. Numbers 1
and 2 reset the video card registers back to the default
state.
The "E" versions call a routine that saves/restores some
default registers and checks for a valid coordinate (X is
0...639, Y is 0...479) before calling the set pixel routine.
The "S" versions pushes some registers, calls the routine,
and pops the registers.
Outer loop, colors from 15 to zero, loop from 640 to 1
for the X coordinate, inner loop from 480 to 1 for the row.
The programs were run three times to check for any jitter.
Reported values are hex counts of the timer count. The
calculated decimal number is the smallest of the three
values on each line divided by the smallest of the 18 for
that set. Null shows the same "S" test without the set
pixel call.
I found some of the results a bit strange, so I thought
I would share with you some of the the data.
Pentium-III 800, OS/2 VDM, Matrox G400, Floppy
COLOR-E1. 00F2 00F2 00F2 1.06
COLOR-E2. 0283 02F5 0284 2.82
COLOR-E3. 0112 00E4 0122 1.00
COLOR-S1. 00F0 00F0 00F0 1.05
COLOR-S2. 02AA 02C7 02AE 3.12
COLOR-S3. 00E5 00E4 00E5 1.00
Pentium-III 800, OS/2 VDM, Matrox G400, RAMdisk
COLOR-E1. 00F1 00F2 00F1 1.06
COLOR-E2. 0283 0283 0282 2.82
COLOR-E3. 00E4 00E4 00E4 1.00
COLOR-S1. 00F0 00F0 00F0 1.05
COLOR-S2. 0285 0284 0284 2.82
COLOR-S3. 00E5 00E5 00E5 1.00
Null 0002 0003 0002
Pentium-III 800, DOS 5.0, Matrox G400, RAMdisk
COLOR-E1. 00E6 00E6 00E6 1.02
COLOR-E2. 0152 0152 0152 1.50
COLOR-E3. 00E2 00E1 00E1 1.00
COLOR-S1. 00E7 00E7 00E7 1.03
COLOR-S2. 0152 0152 0152 1.50
COLOR-S3. 00E2 00E2 00E2 1.00
Pentium-III 800, DOS 5.0, Matrox G400, Floppy
COLOR-E1. 00E6 00E6 00E7 1.02
COLOR-E2. 0152 0152 0152 1.50
COLOR-E3. 00E2 00E1 00E1 1.00
COLOR-S1. 00E7 00E7 00E7 1.03
COLOR-S2. 0152 0153 0152 1.50
COLOR-S3. 00E2 00E3 00E3 1.00
Pentium-III 800, Win2000 Command Prompt, Matrox G400, SCSI disk
COLOR-E1. 00FA 00FA 00F9 1.01
COLOR-E2. 02E5 02E4 02E1 3.00
COLOR-E3. 01C1 01C1 01BE 1.81
COLOR-S1. 00F8 00F8 00F6 1.00
COLOR-S2. 02E8 02E7 02E3 3.00
COLOR-S3. 01C3 01C3 01C0 1.82
Pentium 90, DOS 6.20, Paradise 80C33, RAMdisk
COLOR-E1. 01C4 01C4 01C3 1.08
COLOR-E2. 058B 058C 058B 3.40
COLOR-E3. 01AC 01AC 01AC 1.03
COLOR-S1. 01B6 01B6 01B6 1.05
COLOR-S2. 058E 058F 058E 3.41
COLOR-S3. 01A1 01A1 01A1 1.00
Pentium 133, DOS 5.0, NeoMagic 1024, RAMdisk
COLOR-E1. 0146 0146 0146 1.06
COLOR-E2. 0663 0664 0663 5.33
COLOR-E3. 013C 013C 013C 1.03
COLOR-S1. 0140 0140 0140 1.04
COLOR-S2. 065C 065C 065C 5.30
COLOR-S3. 0133 0133 0133 1.00
Pentium 133, eCS / OS/2 VDM, NeoMagic 1024, SRAM PCMCIA disk
COLOR-E1. 01D4 1.38
COLOR-E2. 095F 7.06
COLOR-E3. 0162 1.04
COLOR-S1. 0174 1.09
COLOR-S2. 096D 7.10
COLOR-S3. 015A 1.00
Steve N.
.
- Prev by Date: Re: Page flipping on LFB in protected mode...how??!?!
- Next by Date: Re: varargs in C (AMD64 architecture)
- Previous by thread: Re: Uniform spacing of labels in MASM32
- Next by thread: x86 Stack Confusion
- Index(es):
Relevant Pages
|