From owner-freebsd-current@FreeBSD.ORG Tue Aug 19 19:40:37 2014 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DC84FFC8; Tue, 19 Aug 2014 19:40:36 +0000 (UTC) Received: from mail.made4.biz (mail.made4.biz [IPv6:2001:41d0:2:c018::1:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9ACC637A1; Tue, 19 Aug 2014 19:40:36 +0000 (UTC) Received: from 2a02-8428-011b-e000-0290-f5ff-fe9d-b78c.rev.sfr.net ([2a02:8428:11b:e000:290:f5ff:fe9d:b78c] helo=magellan.dumbbell.fr) by mail.made4.biz with esmtpsa (TLSv1.2:DHE-RSA-AES128-SHA:128) (Exim 4.82_1-5b7a7c0-XX (FreeBSD)) (envelope-from ) id 1XJpGk-0000nF-Nm; Tue, 19 Aug 2014 21:40:34 +0200 Message-ID: <53F3A82D.4090000@FreeBSD.org> Date: Tue, 19 Aug 2014 21:40:29 +0200 From: =?UTF-8?B?SmVhbi1Tw6liYXN0aWVuIFDDqWRyb24=?= User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.0 MIME-Version: 1.0 To: Adrian Chadd Subject: Re: r269471 make unusable VT console References: <20140812232807.0f3aa02570becec15e056af2@fbsd.es> <20140816011444.301a98d6187aca27e3a2481b@ddteam.net> <53EE9CFF.4080607@freebsd.org> <53F30DF3.1090301@dumbbell.fr> <53F37B2D.3070807@FreeBSD.org> <53F38D8E.8090605@freebsd.org> <53F39F3D.9010104@FreeBSD.org> In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="2gcbH8W3nQwj7m1e4BunfJCxnQ3KvkPrV" Cc: freebsd-current X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Aug 2014 19:40:37 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --2gcbH8W3nQwj7m1e4BunfJCxnQ3KvkPrV Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 19.08.2014 21:20, Adrian Chadd wrote: > Hey, this is cool! >=20 > So hm, why are you still doing any reading? Don't you now have all the > information you need to write out the font and cursor information for > each given set of 8 pixels? I read a lot about VGA in the past days but I'm new to this interface, so my reasonning may be wrong. Anyway, here it is: To write a group of 8 pixels with only 2 colors, I write a byte using background color in an offscreen memory, read it back to load it in the latches, put the foreground color in the Set/Reset register, then write the character/cursor to its final location in video memory. Because the background color almost never changes, only one read is made the first time we load the background color, and then only writes. This is fast. If the group of 8 pixels uses 3 or more colors, I can't use Write Mode 3 alone. I see two possibilities: 1. Set Write Mode 0, then for each plane, compute the byte to write (1 bit out of 4 of each pixel's color), activate one plane, write the byte (repeat for each plane), restore Write Mode 3 and the relevant registers. 2. Stay in Write Mode 3, do a read/write for each colors. The first solution has a constant time of execution. The second one depends on the number of colors. In the end, I guess both solutions are expensive, but hopefully are rarely used. --=20 Jean-S=C3=A9bastien P=C3=A9dron --2gcbH8W3nQwj7m1e4BunfJCxnQ3KvkPrV Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQJ8BAEBCgBmBQJT86gyXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXQ2NzA4N0ZEMUFFQUUwRTEyREJDNkE2RjAz OUU5OTc2MUE1RkQ5NENDAAoJEDnpl2Gl/ZTM5LAP/AqyzDdkOXVIDe0jAhiUi3Fr kevuXsLWu/N+0mhqznsryO4pqgohkexcUdwI/qDJ/YIU7k1kn8lvub6wFndTh5H5 fiZoZoXFLTAl33XoJbOpu+pQ4vnmY4gf/HKYmcJ/MOiGcQof9GI4g/GG6BLZDZi0 JVcvL3X0DJWNKKI+GILsY9xQ+FxglJefU3tc/TJ/oJAs+UjyYNs557zGeF0BGDEQ KI37RBQea0pwF+mrdXiJ/xUzL9l5LQ888t4Qqp+rQRNSQRh8ATwWzlj368RtynMq /NgICzV9BWOGKlQ9JaVCyDTMCipQFBjhx1ZuiCk/NHQzkg2b1zdIOxV1rxBctVh0 lCMUKizRW9ur2uZnfakMUqP80a1nfYBRPUm4LoYHaMKXyw+ceDNbXCR6CMLKSSj0 BsPAnSz37fLzX9bVgtG7cmxlZ0kPmSFe2ItJbcEx6QP4MnWoYtYuFUw0C35Ypdtp /npUImSwQojCq2/T8eFexh9AYRxmc06esB9FGYfnpAmcaKLWEZ6Ki77C9kbZJxud j3owIilqPV0+un+V7ElZs7GYreipjOZVTZTejFuO5E8IGAcWnUJG6bYOeem65cny uQYYDmeGBpYkTFnG36mf4YVLRbTh5X9tIjwwIO0jvfoei4/6xhHlClG8JM6Bu6QX Bwyl9dcg9/9GjPbTWTdP =Vx0q -----END PGP SIGNATURE----- --2gcbH8W3nQwj7m1e4BunfJCxnQ3KvkPrV--