VGA_Text for ImageCraft C
jazzed
Posts: 11,803
Here is a VGA_Text driver for ImageCraft C. It uses native VGA.spin code binary output defined as an array of longs, and provides C API for using the driver. I didn't bother to run doxygen on this, but the comments are marked up for it.
The only big problem that I can't seem to solve is setting colors for individual characters; maybe someone else can address it as I've kind of given up. Works in 0508 package.
BETA2 overcomes previously listed BETA1 issues.
04/29/08: Prepended vgaText_ to all public API.·C is not oop, so we need unique API function names. If you want the old names use #define ... i.e. "#define str(s) vgaText_str(s)"
04/29/08: Added libvgatext.a to attachments. Library created with cygwin's ar tool. To use this save in your "iccv7prop\lib" directory, and in Project->Options->Target->Additional Libraries text-box,·add "vgatext".
04/30/08: New package with fixes + libvgatext.a now included. Starting multiple cogs with cognewNative works fine.
05/08/08: Added VGA_Text_0508.zip for use with BETA2. Character palette works now.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
jazzed
Post Edited (jazzed) : 5/9/2008 1:35:46 AM GMT
The only big problem that I can't seem to solve is setting colors for individual characters; maybe someone else can address it as I've kind of given up. Works in 0508 package.
BETA2 overcomes previously listed BETA1 issues.
04/29/08: Prepended vgaText_ to all public API.·C is not oop, so we need unique API function names. If you want the old names use #define ... i.e. "#define str(s) vgaText_str(s)"
04/29/08: Added libvgatext.a to attachments. Library created with cygwin's ar tool. To use this save in your "iccv7prop\lib" directory, and in Project->Options->Target->Additional Libraries text-box,·add "vgatext".
04/30/08: New package with fixes + libvgatext.a now included. Starting multiple cogs with cognewNative works fine.
05/08/08: Added VGA_Text_0508.zip for use with BETA2. Character palette works now.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
jazzed
Post Edited (jazzed) : 5/9/2008 1:35:46 AM GMT
Comments
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Cheers,
Simon
www.norfolkhelicopterclub.co.uk
You'll always have as many take-offs as landings, the trick is to be sure you can take-off again ;-)
BTW: I type as I'm thinking, so please don't take any offense at my writing style
Thanks for the good work, much appreciated.
// richard
By the way, please don't forget to put a "while(1);" at the end of main otherwise your program will fail.
I keep forgetting [noparse]:)[/noparse]
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
jazzed·... about·living in·http://en.wikipedia.org/wiki/Silicon_Valley
Traffic is slow at times, but Parallax orders·always get here fast 8)
@Rayman, maybe you can look into the per character color problem? I looked at it for days with no luck.
Hopefully we can get custom tile graphics going at some point ... hint, hint (beg, beg) .... [noparse]:)[/noparse]
@Richard, the enum problem I reported appears to be an array index math problem, enums work fine by themselves.
I've sent you emails on all problems except for the missing memcpy issue which is I'm sure trivial to fix.
I'm off to my next project for saving/running C generated code in my custom 1MB DRAM [noparse]:)[/noparse]
Of course this won't work if I can't get more than one cog running native code. We'll see.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
jazzed·... about·living in·http://en.wikipedia.org/wiki/Silicon_Valley
Traffic is slow at times, but Parallax orders·always get here fast 8)
Time to port the hires vga drivers!
Caused me all kinds of pain this morning. Also libvgatext.a is now in the .zip package.
The cognewNative asm function has changed. The original suggested by Richard
did not set the "newcog" bit. I've been able to launch multiple cogs now from LMM [noparse]:)[/noparse]
I also have DRAM and VGA both running happily in the same embedded application [noparse]:)[/noparse]
Time to hack the kernel to make it run relocated code from DRAM now.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
jazzed·... about·living in·http://en.wikipedia.org/wiki/Silicon_Valley
Traffic is slow at times, but Parallax orders·always get here fast 8)
We fixed a number of the "mis-features" you reported. I have just finished a 6+ weeks of grueling multiple professional and personal obligations. Once I catch up with food and sleep, I will see getting code from the devteam and release BETA2 with some of these fixes soonest.
Be aware that the kernel has changed a little already as we optimize @FLOAD and @FSTORE just a little (same code size, but avoiding another trip out of the kernel space...) Swapping code from external device would be really cool. Ideally, you can get things working without new compiler directive, and I hope we won't have to add anything to support overlay, but if it's the best thing to do, email me and we can discuss it.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
jazzed
Thanks for this jazzed - well done
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Cheers,
Simon
www.norfolkhelicopterclub.co.uk
You'll always have as many take-offs as landings, the trick is to be sure you can take-off again ;-)
BTW: I type as I'm thinking, so please don't take any offense at my writing style