Shop OBEX P1 Docs P2 Docs Learn Events
Need help with Propeller Backpack Example Code — Parallax Forums

Need help with Propeller Backpack Example Code

marcwolfmarcwolf Posts: 38
edited 2011-03-23 19:03 in Propeller 1
Hi folks (and Phil)
I am starting to program my Backpack and am using the Overlay demo code to understand all of th flags etc.
I have run into an understanding issue with this line

Defwin, 10, 40, DBL|2, $f, 0, 8|TPT,1

Now I can understand as far as Create a Windows #10 with 40 columns Double Height but then the rest fails me. I have read through the documents but the DefWin does not have that many options. So I am wondering what the rest are doing



Any explanation greatly appreciated.
Dave

Comments

  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2011-03-13 21:16
    Ah, you left out part (highlighted below):
    DEFWIN, 10, 40, DBL|2, [b]CHGCLR[/b], $f, _0, 8|TPT, 1
    
    Does it make more sense now? If not, let me know, and we can discuss it further.

    -Phil
  • marcwolfmarcwolf Posts: 38
    edited 2011-03-13 22:49
    Ah.. Makes perfect sense now
    Unfortunately it got lost in the PBasic to PicAxe conversion

    Many many thanks for that.
    Dave
  • marcwolfmarcwolf Posts: 38
    edited 2011-03-22 04:52
    Hi Phil

    I am trying to format a screen on the Prop Backback and I am not sure if it is possible. I am puzzle re the horizontal window placement

    I have 2 windows for lists. One will list information down the left hand side of the screen and the other doen the right hand side.

    No matter what I seem to do with the APNDSP, or the MOVWIN commands I just cannot get them to be side by side. Neither window is overlapping the other and there shoud be plenty of space between them.

    Many thanks
    Dave
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2011-03-22 09:37
    With the overlay, you cannot place two windows side-by-side. They must be separated vertically by at least one horizontal line. This is explained in the overlay manual at the top of page 8.

    -Phil
  • marcwolfmarcwolf Posts: 38
    edited 2011-03-22 14:58
    Hi Phil
    I did read that, just needed to clarify it re what I am trying to do, and wether there was any other way to approach the task i.e. Defining a window and then moving it into position etc.

    Likewise I can see no way to bold/reverse a single character to highlight it as all operations are on a window level too i.e.

    [HTML]
    <TABLE>
    <TR><TD>
    STATUS
    </TD><TD> ----COMMANDS----</TD></TR>
    <TR><TD>X-Axis </TD><TD>12345.67 </TD><TD>LEFT </TD><TD>Act-Left</TD></TR>
    <TR><TD>Y-Axis </TD><TD>5676543 </TD><TD>RIGHT </TD><TD>Act-Right</TD></TR>
    <TR><TD>LAT </TD><TD>12345.678</TD></TR>
    <TR><TD>LONG </TD><TD>135324</TD></TR>
    </TABLE>
    [/HTML]

    Sorry - no way to format tables in this editor.
    Just checking.
    Many thanks for your help and advice. It really is greatly appreciated.
    Dave
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2011-03-22 15:07
    Right: you cannot alter text characteristics on a byte-by-byte basis; it has to apply to the entire window. The reason for both restrictions is that there is not enough time in the PASM code during a scan line to switch gears that fast.

    -Phil
  • marcwolfmarcwolf Posts: 38
    edited 2011-03-22 15:32
    Thanks for that Phil. I sort of expected that the poor Prop be spinning its cogs like crazy doing all that work. It's really a tribute to your programming skills in getting it to do this much.

    One way I can see around the formatting issue is to modify the character set. If the characters used are the same as in the terminal version of the code then I could use some of them and do a reverse bit image. That way the Prop would not be asked to do any extra work.

    At least we are working with a monospaced font (unlike this editor) so I could write out the table format by character positioning.

    Many many thanks for your help Phil.
    Take Care
    Dave
  • marcwolfmarcwolf Posts: 38
    edited 2011-03-23 17:47
    Hi Phil
    After looking through all of the Spin code supplied with the Prop Backback I could not find the Character set used.

    Is it in the Spin code or is it in another location that is accessable by a developer (Firmware etc)

    Many thanks
    Dave
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2011-03-23 19:03
    It's in the Propeller chip's masked ROM.

    -Phil
Sign In or Register to comment.