Shop OBEX P1 Docs P2 Docs Learn Events
VGA_Text for ImageCraft C — Parallax Forums

VGA_Text for ImageCraft C

jazzedjazzed Posts: 11,803
edited 2008-05-09 12:06 in Propeller 1
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

Comments

  • simonlsimonl Posts: 866
    edited 2008-04-29 08:29
    Hey, well done jazzed - this'll make ICC much more useful on the Prop' yeah.gif

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    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 smile.gif
  • ImageCraftImageCraft Posts: 348
    edited 2008-04-29 11:44
    Jazzed, can you send me test projects for the problem reports? Email me directly for details please.

    Thanks for the good work, much appreciated.

    // richard
  • jazzedjazzed Posts: 11,803
    edited 2008-04-29 15:16
    I've updated the VGA_Text.zip package with prepended function names.
    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)
  • RaymanRayman Posts: 14,355
    edited 2008-04-29 17:57
    This is great news... I'm starting to get interested in this C compiler now!
  • jazzedjazzed Posts: 11,803
    edited 2008-04-29 18:57
    Added libvgatext.a to first post attachments. When next version of the ICCV7PROP arrives, I'll have to create a new library.

    @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)
  • Harrison.Harrison. Posts: 484
    edited 2008-04-29 20:02
    Nice work! I spent 6 hours trying to get my version to work (it probably never worked because of that array indexing problem). I was able to point the screen and color pointers to random places in memory to get funky tiles, but I could never get it to display more than 1 readable character....

    Time to port the hires vga drivers!
  • jazzedjazzed Posts: 11,803
    edited 2008-04-30 18:42
    Had a small foo-bar in the wordfill routine where a debug bit-toggle was left inside.
    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)
  • ImageCraftImageCraft Posts: 348
    edited 2008-04-30 20:35
    Steve, thanks for your hardwork!!!

    We fixed a number of the "mis-features" smile.gif 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.
  • jazzedjazzed Posts: 11,803
    edited 2008-05-09 01:14
    Added VGA_Text_0508.zip to top post. Previous version will be deleted in time. Color palette works now.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    jazzed
  • simonlsimonl Posts: 866
    edited 2008-05-09 12:06
    I really must get some time on the Propeller!

    Thanks for this jazzed - well done smile.gif

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    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 smile.gif
Sign In or Register to comment.