Propeller Backpack with more graphical OSD
Francisco
Posts: 26
Hello, Im using the Backpack to show direction of gravitational pull on my live video feed using the standard character set--up,down,left,right arrows.
However, this limits my resolution to only 90 degree increments. Does anyone have a bright idea to display arrows with the on screen display at more than 4 different directions. If i could use the standard graphical object to be overlaid that would be ideal but i'm not sure if thats even possible.
Thanks tinkerers.
However, this limits my resolution to only 90 degree increments. Does anyone have a bright idea to display arrows with the on screen display at more than 4 different directions. If i could use the standard graphical object to be overlaid that would be ideal but i'm not sure if thats even possible.
Thanks tinkerers.
Comments
Yours is a reasonable requirement. As a consequence, I've modified the overlay object to accommodate a user-defined font, which is substituted for the characters $80 to $8f. These characters default -- and revert to -- the ROM glyphs when start is called. You can substitute your own glyphs for these characters via a call to setuserfont, which requires the address of a 256-long array formatted in the same way the ROM font table is organized (i.e. even and odd characters interleaved).
Attached is the modified object. I have not tested this object yet. I know only that it compiles, so you are the offical test guinea pig. Try it first without calling setuserfont, and display characters from $80 to $8f to make sure the original glyphs have been correctly transferred to RAM. If that works, you should be able to call setfont with your own glyphs.
If you have any trouble, leave a post here, and I will try to fix it as time allows.
-Phil
Phil, I will test your code this weekend.
I ran the original PropBP_overlay_demo.spin and displayed characters "pr.out($80)" to $8F successfully on the overlay.
However, when i substituted prop_backpack_tv_overlay.spin object with yours, nothing comes up on the screen.
Thanks.
-Phil
I also have a Propeller Backpack and look forward to being able to use custom characters.· Thanks for working on this.
Francisco,
Thanks for bring this up.· I hope you share any custom charaters you make.· (I'll do the same.)
Duane
Good news: Attached is a working demo of an overlay object that lets you define (and animate!) your own character glyphs. It's also possible to overlay characters that are accessbile with those that are not (i.e. the command characters $00 to $0f).
Bad news: The entire ROM font has to be copied into RAM to make this work. That's 16K bytes, or half of the entire RAM space. The reason for this is that the waitvid loop is too tight to determine, on a character-by-character basis, whether to read pixels from RAM or from ROM. Therefore, they all have to reside in one place or the other.
I have an idea for a workaround to this, though, so don't give up on a reasonable RAM footprint just yet. Hint: the fact that the ROM font is located at the very beginning of ROM (i.e. right after the end of RAM) could be very helpful.
-Phil
Here's a better version with a smaller footprint: http://forums.parallax.com/showthread.php?p=925961.
-Phil