On Sunday 01 May 2005 19:06, Timothy Miller wrote: > *BOGGLE* > > This is cooler than liquid helium. :) > > I have pondered things like this too, and I would really like to do it > this way, because it makes for more things for hackers to play with. > > Ok, there are three ways (that I can think of right off) to go about > this, in terms of how to emulate VGA. > > First of all, the common thing is that we need to have the bitmaps and > text buffer/font stored in graphics memory and readable. Doing that > won't be hard. The question is how we turn that into an image. > > One is to have the video controller do it, but that's the thing I > would like to avoid, especially if it saves logic. > > Interesting approach #1: Periodically, scan the VGA data and > translate/scale it to another buffer that is read by the video > contoller.
Can we use the 3D pipe for this? Viktor already suggested putting commands in the DMA queue, so what if we have a small bit of logic that continuously loops over the text buffer and converts each two-byte character into a trapezoid drawing command? The VGA font could then simply be a texture (we could even have an antialiased console :-)), with U and V being calculated from the character number. If the characters are 8x16, then the texture would be 128x256 and calculating U and V is just splitting the character number and applying a fixed shift, that is, it doesn't cost any hardware at all. Changing code pages or putting in custom characters in the top 128 places (I think VGA allows you to do that) is just a matter of changing the texture to another one already in memory, or loading a new texture. Calculating 8-bit colour values from the VGA colours is the same. That leaves blinking as the only complication, and it isn't that hard to periodically overwrite the colour values in the drawing command with black. Just a MUX really. What I didn't check is that we have the appropriate combination operations to be able to put both the background and the foreground colours in, if not, we'll have to draw them separately, or maybe we can use the texture as alpha and use it to blend between two single-colour textures that match the foreground and background colours needed. I'm sure it can be solved. > BTW, scaling is okay, but I consider it to be optional. Plenty of > notebook computers center the text display on the screen, rather than > scaling to the full resolution. As long as it's readable, why care? > Even centering is optional. Agreed, although it might be fairly trivial if we use the 3D unit as described above. Lourens
pgponWPnQja5I.pgp
Description: PGP signature
_______________________________________________ Open-graphics mailing list [email protected] http://lists.duskglow.com/mailman/listinfo/open-graphics List service provided by Duskglow Consulting, LLC (www.duskglow.com)
