Friendly VGA text driver?
Oldbitcollector (Jeff)
Posts: 8,091
Before I grab "vgahirestext" and start adding functions, I'm curious if
anyone has done a nice color 80x25 (or higher) VGA text driver yet?
Something along the lines of AiGeneric with tvtext commands?
Just need to know before I spend a couple days re-creating the wheel.
Thanks
OBC
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
New to the Propeller?
Check out: Protoboard Introduction , Propeller Cookbook 1.4 & Software Index
Updates to the Cookbook are now posted to: Propeller.warrantyvoid.us
Got an SD card connected? - PropDOS
anyone has done a nice color 80x25 (or higher) VGA text driver yet?
Something along the lines of AiGeneric with tvtext commands?
Just need to know before I spend a couple days re-creating the wheel.
Thanks
OBC
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
New to the Propeller?
Check out: Protoboard Introduction , Propeller Cookbook 1.4 & Software Index
Updates to the Cookbook are now posted to: Propeller.warrantyvoid.us
Got an SD card connected? - PropDOS
Comments
Attached is a VGA Text driver with 100 x 50 characters, mostly compatibel to TV_Text, VGA_Text, PC_Text ...
It uses the HiRes_Text driver, so you can only set one color per line.
Also in the ZIP is a Demo, with a very simple Font-Editor for the 8x12 pixel font. It needs the VGA_HiRes_Font object, which is a slightly modified VGA_HiRes_Text object (the Start method return some pointers to the font). This object uses still an alternative font, but this font needs some polishing.
Andy
Post Edited (Ariba) : 12/26/2008 9:25:04 PM GMT
Thanks for the VGA driver, that will save me some real time.
OBC
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
New to the Propeller?
Check out: Protoboard Introduction , Propeller Cookbook 1.4 & Software Index
Updates to the Cookbook are now posted to: Propeller.warrantyvoid.us
Got an SD card connected? - PropDOS
Post Edited (Oldbitcollector) : 12/26/2008 6:26:27 PM GMT
Attached is Yet Another VGA text driver. This one outputs 128 x 64 chars.
Mostly compatible calls but also includes cursor location which is missing in some of the routines (cursloc(x,y).
Enjoy your quest.
Jim
Yup, that's the driver I'm using currently. Thanks..
I haven't found a way to support font color changes on the fly.
Is it even possible with the current driver? Be nice to be able
to support the ANSI color changes for linux terminals.
OBC
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
New to the Propeller?
Check out: Protoboard Introduction , Propeller Cookbook 1.4 & Software Index
Updates to the Cookbook are now posted to: Propeller.warrantyvoid.us
Got an SD card connected? - PropDOS
You raised a very interesting question about changing color on the fly.
I played around with it a little and added a routine called "color" to the VGA_1024 driver.
It actually works, the calling sequence is:
vga.color($2840) ' where the upper byte is the background color (RRGGBB00) and the lower byte is the foreground RGB color.
Examples are $08F0 gold on blue and $2840 cyan on blue.
I attached the modified version called VGA_1024_test. Give it a try and let me know what you think.
If you like it, I can send it to the Obj Exch.
Jim
To change it more than that would be a little tricky.
Let me know what works best.
Jim
Background color could be set to one color to make things a little easier. (black maybe)
Multiple colors on a line would be ideal.
OBC
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
New to the Propeller?
Check out: Protoboard Introduction , Propeller Cookbook 1.4 & Software Index
Updates to the Cookbook are now posted to: Propeller.warrantyvoid.us
Got an SD card connected? - PropDOS
I'm attaching a newer version that allows changing it by row.
The calling sequence for this is:
vga.rowcolor(ColorVal, row) ' ColorVal is the same as described above, a word with two RGB values. Row = {0,1,...63}
Again, you can change just the text color here by leaving the background color unchanged.
Jim
(like black, which is perfect for the terminal I'm working on)
Then we can define friendly color names like we did with AiGeneric in the main program.
(Don't use this reference, the colors are wrong.. {example only})
Now if we could just do multiple colors on a line, it would be perfect,
but I think this is a limitation of the driver..
OBC
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
New to the Propeller?
Check out: Protoboard Introduction , Propeller Cookbook 1.4 & Software Index
Updates to the Cookbook are now posted to: Propeller.warrantyvoid.us
Got an SD card connected? - PropDOS
Post Edited (Oldbitcollector) : 12/27/2008 5:45:51 PM GMT
Rather than changing the driver routines, it could be done in the calling program. That would leave the original routines available for general use.
Here's an example:
Alternatively, I can add another routine(s) to input the text color and change only that. Would that help?
The only difficulty with changing it in the line is reading Chip's original code[noparse]:)[/noparse]
It's like wheels within wheels. I can do it, but it's very labor intensive...
Jim
OBC
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
New to the Propeller?
Check out: Protoboard Introduction , Propeller Cookbook 1.4 & Software Index
Updates to the Cookbook are now posted to: Propeller.warrantyvoid.us
Got an SD card connected? - PropDOS
I don't understand what the $0000 is for... I don't think it does anything.
background on the fly. Might be handy for inverse later.
OBC
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
New to the Propeller?
Check out: Protoboard Introduction , Propeller Cookbook 1.4 & Software Index
Updates to the Cookbook are now posted to: Propeller.warrantyvoid.us
Got an SD card connected? - PropDOS
Let me know if you want the text-only routines and I'll add them.
Jim
Yes, they would be welcome. Thanks
OBC
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
New to the Propeller?
Check out: Protoboard Introduction , Propeller Cookbook 1.4 & Software Index
Updates to the Cookbook are now posted to: Propeller.warrantyvoid.us
Got an SD card connected? - PropDOS
The new routines are:
vga.screentextcolor(TextColor) ' uses last byte for text color
' AND
vga.rowtextcolor(TextColor, row) ' row = {0,1,...,63}
The other routines: color( ) and rowcolor( ) are still there.
Let me know what you think.
Jim