Font and Graphics in 1024x768!!!
cgracey
Posts: 14,206
Here's the latest 1024x768 tile driver, now with mouse cursor support.
The Propeller's built-in font was designed to run in this mode, but for a long time it wasn't looking possible. I think this driver would be great for these self-hosting languages that are being discussed.·Note the 3D bevel characters and easy-to-read 64x24 text. There's also some graphics in this example just to show that it can be done. This demo was thrown together, but it exercises the tile driver thoroughly. It shows the two built-in mouse cursors, plus a custom one.
The driver itself is 271 longs w/12 VARs. It requires 6KB of RAM for the tile array.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chip Gracey
Parallax, Inc.
Post Edited (Chip Gracey (Parallax)) : 11/12/2006 12:06:38 PM GMT
The Propeller's built-in font was designed to run in this mode, but for a long time it wasn't looking possible. I think this driver would be great for these self-hosting languages that are being discussed.·Note the 3D bevel characters and easy-to-read 64x24 text. There's also some graphics in this example just to show that it can be done. This demo was thrown together, but it exercises the tile driver thoroughly. It shows the two built-in mouse cursors, plus a custom one.
The driver itself is 271 longs w/12 VARs. It requires 6KB of RAM for the tile array.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chip Gracey
Parallax, Inc.
Post Edited (Chip Gracey (Parallax)) : 11/12/2006 12:06:38 PM GMT
Comments
This combined with all the memory extension stuff, an Prop OS on-board, and main stream languages coming on strong >> the possibilities are hard to fathom. Things seem to be rapidly moving these days.
Jim C.
Very impressive Chip!
Makes for some interesting possibilities...
But I saw the vector graphics in a small window that seems to be 1 pixel thin.
How is that possible?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
www.fd.com.my
www.mercedes.com.my
Tiles can be characters (from the ROM) or they can be your own bitmap. If I wanted to draw
a 128x64 bitmapped area, I would just allocate 8x4 tiles (32 total tiles) for my bitmap and
point the display tile pointers there for that section of the screen.
This is very flexible, lets you mix text and graphics very nicely.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chip Gracey
Parallax, Inc.
Post Edited (Chip Gracey (Parallax)) : 11/15/2006 9:27:02 AM GMT
Clever [noparse]:)[/noparse]
If so, how high could it go?
That would be HUGE for me!
How much resolution do you really need and is there a particular reason why you wouldn't be able to use VGA instead (which has much better bandwidth).
Bean.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Cheap used 4-digit LED display with driver IC·www.hc4led.com
Low power SD Data Logger www.sddatalogger.com
SX-Video Display Modules www.sxvm.com
"People who are willing to trade their freedom for·security deserve neither and will lose both." Benjamin Franklin
·
I am no expert though...
And what about colors? Any way to get more colors?
EDIT::::· I see that I was told 320x200 for the prop.· Sorry!
But·I want more!!!!!
·· any chance of it?
Post Edited (DaveF) : 11/16/2006 3:48:08 AM GMT
And one step futher, I could use more colors for better depth in the graphics.
The current TV display driver provides 40 x 13 "tiles" each consisting of a 16 x 16 pixel tile whose pixels can have one of four colors which can be selected from any that the monitor can support. For text, each tile is normally considered to be one character. The graphics routines (graphics.spin) can draw vector characters that cross tile boundaries. Look at the graphics_palette.spin sample program in the Propeller Tool's sample library. It displays the range of possible colors and lets you see the number associated with whatever color the mouse cursor is positioned over. The graphics routines come with a demo program that does show you what the vector characters look like.
Again, both the TV and the VGA display is made up of tiles. The Propeller hardware does the video generation and limits the colors for any pixel to be one of the four defined for the pixel's tile. The colors in the palette for the tile can be chosen from any that the monitor is capable of, but only four can be chosen for any given tile. Adjacent tiles can have completely different colors.
The primary task of the graphics engine in the Hydra software is to produce high enough resolution graphics (again about 500+ x 200+ practically) without using a bitmap which would fill up most of memory. The VGA graphics routine for 512 x 384 pixels is an example of that. The bitmap takes up over 1/2 of the memory. There isn't enough memory for a full resolution VGA bitmap (1024 x 768) which the video generation hardware is fully capable of doing.
Post Edited (Mike Green) : 11/16/2006 4:09:38 AM GMT
This is on my to-do list, but the full 1024x768 windowed GUI and new language runtime I'm working on are keeping me busy at the moment, not that I'm getting any real time to work on them either right now. Anyone else fancy having a go at a 64 colour VGA driver using this technique?
Please point me to whatever documentation exists for designing graphics on the prop so I can learn. That will do it for me!
Chip- sorry for hijacking your thread! I did not mean to get off on a tangent like this!!
Dave
From a development point of view the video hardware is actually pretty simple stuff, as you'd expect with only two dedicated registers and an assembly instruction, but there's also the issue of clocks (and PLLs) and timing which are so fundamental to the operation of the thing, that you need to have a good understanding of these before you can actually get started. You also need to have an understanding of the basics of video generation. All that said, I'm sure everything could be covered in a short (10 pages or so) quickstart guide as long as it included a range of suitable examples.
Until the Hydra book is released or such a quickstart guide appears, you'll have to dig through the (generally well commented) example code and objects released by Parallax and others and experiment, which to be honest is half of the fun.