Shop OBEX P1 Docs P2 Docs Learn Events
How do you replace/update the font on the Prop 1? — Parallax Forums

How do you replace/update the font on the Prop 1?

JDJD Posts: 570
edited 2013-03-23 08:15 in Propeller 1
Hello Builders,

I am building a bike project and have run into a slight visual problem. Overall, I am working with the Prop 1, Prop backpack, hall effects, and Polar Heart sensor. I have a camera facing backwards and displayed on a screen for the rider; however once the camera is turned to face backwards, the video feed is flipped to the rider (so objects the right are displayed on the left).

There was no way on the camera to flip the video feed it sends, and there is no way for the Prop Backpack to flip the feed, but I have found a way to flip the display through a function of the monitor. Once I tried this, the next obstacle is getting the text to display correctly.

backwards text.jpg


I would like to replace the Propeller font so when Objects call for a font, it will appear correct on the display. Does anyone know how to do this?


Thank you for your help, or any suggestions that might also accomplish this task.

~JD
1024 x 575 - 76K

Comments

  • RaymanRayman Posts: 14,665
    edited 2013-03-22 02:47
    This has come up before, you may find something with a Google search of the forum...

    Seems to me the simplest solution would be to hack the driver to show the font pixels in reverse order...
  • Clock LoopClock Loop Posts: 2,069
    edited 2013-03-22 07:21
    JD wrote: »

    I would like to replace the Propeller font so when Objects call for a font, it will appear correct on the display. Does anyone know how to do this?


    Thank you for your help, or any suggestions that might also accomplish this task.

    ~JD

    The prop font is written to internal rom and cannot be changed. It can only be sized/modified.

    You do not need a different font to do what you want. What you need is to figure out how to make the text output mirrored.
    You didn't attach any code so i have no idea what method you are using to do text generation, so many of us cannot help you more.
  • JDJD Posts: 570
    edited 2013-03-22 09:27
    @Clock Loop: Thanks for the relply, but thats a bummer. I hoped I could just replace it with a font that was already mirrored. My code is attached below, didn't even think of it before because am just using FullDuplexSerial to send strings to display via the Prop Backpack.

    Bike Speedometer.spin


    Any help is appreciated, not sure how to create mirrored text


    ~JD
  • tonyp12tonyp12 Posts: 1,951
    edited 2013-03-22 10:04
    You could copy rom font at $8000 to hubram and modify the TVDisplay driver (look for $8000) to use this new location
    While you copy, take your time to bit-reverse(mirror) the font and only copy a block of Chars you need to save ram.
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2013-03-22 10:09
    There are actually three issues here:
    1. Mirroring the individual characters (which you've already identified),
    2. Reversing the order of the strings being sent, and
    3. Changing the sense of left vs. right for string justification.

    You can get cameras that include a switch for sending a reversed image, rather than doing it via the monitor. I think that would be the simpler solution.

    -Phil
  • JDJD Posts: 570
    edited 2013-03-22 10:16
    @Phil - I agree completely; it felt like I was re-inventing the wheel; I was just hoping there was going to be an option that would not require me to buy a new camera. Do you know of any off hand? I have used my cell phone and flip camera for almost all my video needs.

    @tonyp12 - Thanks for the suggestion, if I can not find a camera cheap, I will try this option.
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2013-03-22 11:10
    JD,

    Here's a cheap rear-view camera:

    There is another option, however: mount both your current camera and your monitor (which still must be configured for mirror imaging) upside down. Then use the attached substitute for prop_backpack_tv_overlay.spin to generate your overlay. You will have to remap the ROM font characters that you want to use into the user RAM space in vertically-reversed order so that they display upside-down. This way, the characters will display right-side up on your upside-down monitor, but left and right will be preserved, and you won't need to reverse your strings -- only the vertical line order, which is much easier. (At least my dyslexic brain thinks that's how it will work. :) )

    -Phil
  • tonyp12tonyp12 Posts: 1,951
    edited 2013-03-22 11:22
    I wonder if you could sneak in a REV pixels,#32 in the tvdisplay code?
    Could keep using rom-font then.
    maybe need to be REV pixels,#31?

    REV (Reverse) reverses the lower (32 - Bits) of Value’s LSB and clears the upper Bits of Value’s MSBs.
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2013-03-22 11:30
    Tony,

    That would probably work, but it solves only one of the three issues I mentioned above. Inverting the glyphs up and down preserves the character order and justification on an upside-down display.

    -Phil

    Edit: Actually, the rev by itself would not work. You'd also have to invert the even/odd bit sense to get the right character.
  • tonyp12tonyp12 Posts: 1,951
    edited 2013-03-23 08:15
    >You'd also have to invert the even/odd bit sense to get the right character.
    Is the tvdisplay using 4color mode?, and setting font2 color to the same as background to hide interleaved font part?
    Maybe simple changing how colors are handled could fix it?

    Or the spin-text part could handle that, as it would just add/sub ascii value to get it right.
    As the same time it would right-align too.
Sign In or Register to comment.