Shop OBEX P1 Docs P2 Docs Learn Events
Work in progress: Comparison of Propeller Tool vs BST — Parallax Forums

Work in progress: Comparison of Propeller Tool vs BST

Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
edited 2011-03-21 06:46 in Propeller 1
I got such great feedback and encouragement from the ADC article!
You guys are a collective WEATH of knowledge.

Here's a work in progress which compares the Propeller Tool and BST.
It is intended for the beginner.

I welcome feedback and suggestions on what can be done to improve this for the benefit of our new Propeller users.

http://dl.dropbox.com/u/7557533/temp/Comparison%20of%20Propeller%20Programming%20Tools.pdf

OBC
«1

Comments

  • PublisonPublison Posts: 12,366
    edited 2011-03-17 12:53
    Good Start Jeff!

    I would just add that upon installing the Propeller Tool for the first time, you should not have a USB device plugged in. This could be a Proto Board USB, Prop Plug, or any FTDI device. Install the tool software first, and then let Windows discover the device after that.

    Not sure how that works with BST, as I have only install that after doing all of the above.
    I got such great feedback and encouragement from the ADC article!
    You guys are a collective WEATH of knowledge.

    Here's a work in progress which compares the Propeller Tool and BST.
    It is intended for the beginner.

    I welcome feedback and suggestions on what can be done to improve this for the benefit of our new Propeller users.

    http://dl.dropbox.com/u/7557533/temp/Comparison%20of%20Propeller%20Programming%20Tools.pdf

    OBC
  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2011-03-17 13:05
    @Pulison

    Excellent! Added to my draft!

    @Everyone Else: Come get me! (In other words there is more in the works.) :)

    OBC
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2011-03-17 13:08
    OBC's PDF wrote:
    BST is also well suited for older Windows XP based computers which may have trouble compiling larger Propeller programs with Propeller Tool.
    Jeff, can you elaborate, please? I have WinXP SP1, and I've never had an issue compiling large Spin programs with the Prop Tool.

    -Phil
  • VaatiVaati Posts: 712
    edited 2011-03-17 13:27
    I just started using BST today with ubuntu 10.04, and it worked like a charm -- just download, extract, and its ready to go.

    And on a slightly unrelated note, its been ages since I was last on the forums! They sure have grown...
  • Heater.Heater. Posts: 21,230
    edited 2011-03-17 13:31
    You mean there are people out there still using Propeller Tool?:-)
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2011-03-17 13:39
    You mean there are people out there still using Propeller Tool?
    As long as I'm writing "officially sanctioned" code for Parallax or for the OBEX, I kinda feel like I have to ... as much as I'd like to switch. 'Rather ironic, though, isn't it: one of the Prop Tool's most persistent critics still using it. :)

    -Phil
  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2011-03-17 13:45
    Jeff, can you elaborate, please? I have WinXP SP1, and I've never had an issue compiling large Spin programs with the Prop Tool.

    -Phil

    Phil, it's not the SP1 or early windows installs that are the problem. I've witnessed machines which ran at 400mhz that could not completely transmit a large spin program to the Propeller without dropping out. When switched to BST, these problems vanished. I know that 400mhz machines are not as common as they once were, however, I do know of several people who are programming the Propeller with older laptops.

    OBC
  • Heater.Heater. Posts: 21,230
    edited 2011-03-17 13:46
    Phil,

    I agree about the "officialy sanctioned" part.

    I'm just in a mood to do some "winding up". Sorry.
  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2011-03-17 13:46
    Vaati wrote: »
    And on a slightly unrelated note, its been ages since I was last on the forums! They sure have grown...

    VAATI!! Welcome back! It's been a while since we've seen you!
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2011-03-17 14:16
    OBC wrote:
    I've witnessed machines which ran at 400mhz that could not completely transmit a large spin program to the Propeller without dropping out. When switched to BST, these problems vanished.
    Hmm, 'interesting observation. I'm sure both loaders use the computer's UART to transmit the pulse-coded data -- well, they'd have to. So I wonder where the difference lies. Maybe the Prop Tool just can't feed the UART fast enough.

    -Phil
  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2011-03-17 14:18
    The interesting part is that both programs (Propeller Tool/BST) were used after installing the Propeller Tool to establish FTDI support, etc. The problem appears to center around the speed of the Propeller Tool, not the UART or related drivers.

    OBC
  • davidsaundersdavidsaunders Posts: 1,559
    edited 2011-03-17 19:24
    Great Work. I like the beginning of a direct comparison.

    I would like to note an bug in your txt. You said:
    BST is also well suited for older Windows XP based computers
    The bug is that there is no such thing as a x86 PC-compatible computer "based on" any operating system, The operating system just runs on top of the HW.
  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2011-03-17 19:26
    Great Work. I like the beginning of a direct comparison.

    I would like to note an bug in your txt. You said:

    The bug is that there is no such thing as a x86 PC-compatible computer "based on" any operating system, The operating system just runs on top of the HW.

    Yes, I'm not happy with that wording either.. It'll be adjusted in the final text.

    Thanks!
    OBC
  • RS_JimRS_Jim Posts: 1,768
    edited 2011-03-18 06:39
    Jeff,
    Thanks for this, it is finally going to give me the courage to install BST!
    RS_Jim
  • AleAle Posts: 2,363
    edited 2011-03-18 07:46
    Obc: Brad said that one of his test machines was a 400 MHz G4 running Mac OSX... he said it was slow but he was sure it worked.
  • trodosstrodoss Posts: 577
    edited 2011-03-18 07:59
    @OBC,
    Looks good so far!

    One major differentiator is that BST also has extensions for condtional compiling (#define / #undef / #ifdef / #ifndef / #elseifdef / #elseifndef / #else / #endif).

    If you look in section 5 of the BST manual, you can find descriptions of all the extensions.
    http://www.fnarfbargle.com/bst/manual/bst_manual_0.04.pdf

    Are you also planning on comparing BSTC and Homesupn for command-line compilers?
  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2011-03-18 08:23
    Good point, I'll add the conditional compiling data as well.

    I considered the command-line compilers, but since this is only an introduction for a new user, I elected to keep things simple.

    OBC
  • Cluso99Cluso99 Posts: 18,069
    edited 2011-03-18 20:23
    OBC: Nice work but sorry I have not had time to look. However, for the record, I use PropTool when I am writing simple programs that others may use and bst when I am writing large programs or require conditional compilation. The conditional compilation is a fantastic reason for using bst, as is cross-platform. The other reason, is that bst has an inbuilt PST which switches in automatically after downloading (if you have the terminal open). This is great for testing where you use PST/terminal program for feedback.
    BTW I don't like command line interfaces any more. I use bst in the GUI mode.
  • Heater.Heater. Posts: 21,230
    edited 2011-03-18 23:07
    Cluso,

    Yes but command line interfaces are great. It means you can then easily use the compiler loader etc from other tools. Like Catalina and zog using Homespun and BST in their build systems.

    Or you can drop them into other GUI IDEs like Andrey is doing with PZST.
  • Dr_AculaDr_Acula Posts: 5,484
    edited 2011-03-19 06:48
    I use BST for the CP/M project because of the ifdefs, I use Homespun as part of the Catalina reloadable objects project, and I often have the Proptool open when writing quick and simple programs.

    One big difference between the proptool and other programs is those little arrows that show what links with what. I find I really can't write Spin without these, and I wrote a lot of the CP/M project in the Proptool prior to copying it over to BST. I usually had both programs open at the same time, as neither can do 100% of what I need.

    I am wonder if in the screenshots, you could include a little bit of code, as this lack of the arrows is a disadvantage for BST but it isn't entirely obvious when there is a screenshot with minimal code.
  • tdlivingstdlivings Posts: 437
    edited 2011-03-19 08:28
    @Dr_Acula What do you mean by those little arrows? The lines that show indentation level in say a Repeat statement or the are you refering to the heirecy window that
    that shows the structure of the program? Or I could be completely missing what you are refering to.

    Thank's
    Tom
  • SSteveSSteve Posts: 808
    edited 2011-03-19 12:07
    I'm guessing he means the indentation indicators. I opened the Propeller Tool under Parallels last night for the first time in quite a while. I forgot how useful those are. That's one of the advantages of writing a single-platform program from scratch. I'd be surprised if something like that was possible under the multi-platform framework that Brad uses.
  • AleAle Posts: 2,363
    edited 2011-03-19 12:13
    BST has the folding of code, so I'd guess that adding marking for indentation should be possible... but we should ask him...
  • Heater.Heater. Posts: 21,230
    edited 2011-03-19 12:15
    SSteve,

    I'd me surprised if a feature like that was not possible. I believe Andrey is about to do all thst with his Qt based PZST IDE for the Prop.
    Of course it would be better if Spin had block markers in the synyax rather than white space then we would not need this complication in the IDE:)
  • SSteveSSteve Posts: 808
    edited 2011-03-19 14:17
    I've always figured that these text-editing frameworks didn't include provisions for adding graphics. I'll be happy to be proven wrong!

    I'd also like to take a look at PZST as it's being developed, but I haven't had time to figure out what Qt stuff I need to download in order to compile PZST.
  • Duane DegnDuane Degn Posts: 10,588
    edited 2011-03-19 14:28
    Heater. wrote: »
    Of course it would be better if Spin had block markers in the synyax rather than white space then we would not need this complication in the IDE:)

    I'd think some sort of block marker syntax could be added to an IDE. It could hide the markers within comments in the actual file (not on the screen) so it would still work in other IDEs.

    I've seen other 3rd party programs (it was a CAD type program) add non-standard features that did this sort of thing.
  • DavidMDavidM Posts: 630
    edited 2011-03-19 15:06
    Hi,

    The Parallax font that is used HAS enough characters to be used as INDENTATION LINES, Instead of putting a "SPACE" Character, some of the built in font characters could be used, that way overlaying graphics would not be necessary.

    I think all thats needed is

    Horizontal bar,
    Vertical Bar,
    Vertical bar with Right Side Bar,
    Horizontal Bar With Vertical Bar to top,

    only a few characters , I dont think arrows are needed , just straight lines the same ones use to draw Schematics symbols,

    What Do you think?

    By the way , THIS IS the ONLY feature that is STOPPING me from using BST on the MAC, I would love to use it, but I can't work without the Indent markings, Its to hard to read and program, especially when you have lots of nesting/indents and long and complicated IF ..ELSE statements.

    Just my opinion

    Dave M
  • davidsaundersdavidsaunders Posts: 1,559
    edited 2011-03-19 15:32
    If one wished to implement such a feature in an IDE would not it be more sensible to use a graphics window and render the bitmapped font into that? This would make these types of features very simple. For most cross platform frameworks this is a lot easier than doing text, and if one were to use SDL even easier. And even if the framework being used is an exception to the rule (were in text is actually simple), it is always very simple to render a bitmapped font, to the point of often being quicker than using an Operating Systems/Windowing Systems font functions (and using a framework that has its own libs [dynamic or static] adds a layer to that). The only cases that I can think of that using a systems text rendering is quicker than rendering a bitmapped font to a graphics field are very old HW with systems that run in the hardware text mode (if the graphics card supports VESA LFB then it is still faster to do your own font rendering), and I do mean VERY OLD HardWare.
  • davidsaundersdavidsaunders Posts: 1,559
    edited 2011-03-19 16:06
    You can also test this speed difference by setting up a simple graphics field in your preferred toolkit, clearing it to white and using something like (15BPP, simple rectangular buffer):
    /*
    The MIT License
     Copyright (c) 2010 David Saunders
    
     Permission is hereby granted, free of charge, to any person obtaining a copy
    of this software and associated documentation files (the "Software"), to deal
    in the Software without restriction, including without limitation the rights
    to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
    copies of the Software, and to permit persons to whom the Software is
    furnished to do so, subject to the following conditions:
     The above copyright notice and this permission notice shall be included in
    all copies or substantial portions of the Software.
     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
    IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
    FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
    AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
    LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
    OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
    THE SOFTWARE.
    */
    
    char *fnt;  /*points to an 8 X 16 Bitmapped Font*/
    
    void PrntChar(short x, short, ychar c, short *buffer, short maxx, short maxy)
    {
      long p;
      short t, ty;
      if (y <  maxy - 15 && x < maxx - 7)
      {
        p = y * (maxx + 1) + x + 8;
        for (ty = 0; ty < 16; ty++)
        {
          for (t = 0; t < 8; t++)
          {
           if ((fnt[ty+(c << 4)] <<  t) & 0x80) buffer[p - t] = 0x0000;
          }
          p += p + maxx; p++;
        }
      }
    }
    
    void PrntStr(short x, short y,char *s, short *buffer, short maxx, short maxy)
    {
      long p;
      short t, ty, cnt = 0;
      char c;
      if (y <  maxy - 15 && x < maxx - 7)
      {
       p = y * (maxx + 1) + x + 8;
       while (s[cnt])
       {
         c = s[cnt];
         for (ty = 0; ty < 16; ty++)
         {
            for (t = 0; t < 8; t++)
            {
             if ((fnt[ty+(c << 4)] << t) & 0x80) buffer[p - t] = 0x0000;
            }
            p += p + maxx; p++;
          }
        }
        cnt++;
      }
    }
    
    I did not comment this as it is fairly self explanatory. If you compare this to using the text output functions of what ever lib/tk you use I think that you will find it to be significantly faster. The only down side is that you either have to include your own fonts (for all supported font sizes) or dynamically create your bitmap fonts at program start.

    NOTE0: This code is ANSI C, as such it may NOT compile with GCC.
    NOTE1: This code was typed in here by hand and may contain typographic errors.
    NOTE2: This code is modified to be very atomic. You could use a color parameter var, and you could move many of the parameters into global variables.
  • potatoheadpotatohead Posts: 10,261
    edited 2011-03-19 17:03
    re: Indentation indicators.

    Much of that functionality could be accomplished simply by displaying spaces in a slightly different color. I've used other editors, like Kedit, that do this, and it's pretty effective. I would appreciate seeing that in BST, because I miss the indent indicators too.
Sign In or Register to comment.