mirror of
https://github.com/reactos/reactos.git
synced 2025-05-28 13:38:19 +00:00
[VGADDI]
Explain how VGA write mode 2 works. No code changes! CORE-8164 svn path=/trunk/; revision=72607
This commit is contained in:
parent
fc686705cd
commit
d97ea85a86
1 changed files with 13 additions and 0 deletions
|
@ -681,6 +681,19 @@ vgaWriteScan ( int x, int y, int w, void *b )
|
|||
i += 8, off++;
|
||||
while (i < w)
|
||||
{
|
||||
/*
|
||||
* In write mode 2, the incoming data is 4-bit and represents the
|
||||
* value of entire bytes on each of the 4 memory planes. First, VGA
|
||||
* performs a logical operation on these bytes and the value of the
|
||||
* latch register, but in this case there is none. Then, only the
|
||||
* bits that are set in the bit mask are used from the resulting
|
||||
* bytes, and the other bits are taken from the latch register.
|
||||
*
|
||||
* The latch register always contains the value previously read from
|
||||
* VGA memory, and therefore, we must first read from vp[off] to
|
||||
* load the latch register, and then write bp[i] to vp[off], which
|
||||
* will be converted to 4 bytes of VGA memory as described.
|
||||
*/
|
||||
dummy = vp[off];
|
||||
dummy = bp[i];
|
||||
vp[off] = dummy;
|
||||
|
|
Loading…
Reference in a new issue