Shop OBEX P1 Docs P2 Docs Learn Events
“Open BASIC Stamp Editor” ?? — Parallax Forums

“Open BASIC Stamp Editor” ??

vaclav_salvaclav_sal Posts: 451
edited 2011-08-22 18:38 in General Discussion
If the product – in this case "BASIC Stamp Editor" – is free, why it cannot be “Open BASIC Stamp Editor” – with source code available?
This editor is Parallax specific for limited audience, not like MS VS express editions.
It would be to Parallax business advantage to have competent developers who use the product to drive its development.
For example it would be nice to add “comment / uncomment block “ ability and common RAM management for BS2e slots.
Vaclav
«1

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2011-04-08 10:22
    It would be nice to have some kind of documentation on the format of the Stamp interpretive code, but the features you mention could be done at the source level in an IDE that then produces a finalized source that's internally presented to the existing tokenizer for compilation and downloading. There's very little in the way of enhancements that couldn't be done at the source level.
  • chaugen1chaugen1 Posts: 6
    edited 2011-08-19 15:38
    Speaking of tokenizer, any way to get a 64-bit version of it? Preferably the .so for use in linux.
    Or just the source code, either way would be amazing!
  • RDL2004RDL2004 Posts: 2,554
    edited 2011-08-19 15:46
    I would settle for being able to change the default font.
  • Kevin WoodKevin Wood Posts: 1,266
    edited 2011-08-19 22:57
    There was a thread on this some time ago.

    Basically... Parallax licensed a Delphi component that is at the core of the Basic Stamp editor, and they are unable to release the source code for it. I believe that they contacted the component author to try and work something out, but it wasn't possible.
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2011-08-20 00:20
    One might just start from scratch for something in Linux

    http://dinosaur.compilertools.net/

    LEX and YACC are at the core of creating tokens. It is a lot easier to understand the process in Linux where tutorials are free and so is the software to make it happy.
  • localrogerlocalroger Posts: 3,451
    edited 2011-08-20 07:44
    Given that a PBasic program can read out the entire contents of the EEPROM, it seems like it shouldn't be too difficult for a suitably motivated person to reverse engineer the byte code language. With that and the download protocol you could do a completely clean-room clone of the editor.
  • PJAllenPJAllen Banned Posts: 5,065
    edited 2011-08-20 08:51
    OK, if a PBASIC program is written such as to read its eeprom and to send that to a terminal, or what have you, that's possible.
    If someone lost a program file but was only concerned with making more copies of that, the eeprom could be leaded out to practically any eeprom programmer to glom the code and burn that to other eeproms.
    Even with the raw code, the pin aliases and so on cannot be reconstructed.
  • Martin_HMartin_H Posts: 4,051
    edited 2011-08-20 08:59
    While Parallax can not release the source, they could release the specification on how code is translated to tokens. This should be enough to write a portable compiler. Would save someone the reverse engineering effort. I thought I saw a web page that detailed the upload protocol as well which would be needed to push tokens to the stamp.

    If you do want to reverse engineer the compiler, the easy way is to look at the memory map the compiler produces. It would be much easier than dumping the stamp EEprom.
  • PJAllenPJAllen Banned Posts: 5,065
    edited 2011-08-20 09:48
    Anything is possible; most anything is a matter of time and money.
    But, in all this time, and the BS2 has been around for nearly 20 years (what's the anniversary, anybody?), it's never been done.
    [I think releasing a spec is tantamount to releasing the source.]
    Anyway, why not just leave it go?
  • Martin_HMartin_H Posts: 4,051
    edited 2011-08-20 10:01
    It's never been done because most people have Windows machines and it isn't worth the effort to 90% of computer users. For Penguinistas there was a 32 bit compiler, but not a 64 bit one. I'm not a Mac user, but aren't they out of luck? So there's a small niche for a portable PBasic compiler.

    BTW A few years back I ran the PBasic editor under WINE on Linux. It worked except for the upload step. So I used that as an IDE and then used the 32 bit compiler to push it up to the stamp.
  • PJAllenPJAllen Banned Posts: 5,065
    edited 2011-08-20 10:21
    So there's a small niche for a portable PBasic compiler.

    Very small. Minute. Miniscule.
    (In a Hack-a-Day speak: Quite small. Quite minute. Quite miniscule.)


    It's Gates' world, Martin, we just live in it. :zombie:
  • Martin_HMartin_H Posts: 4,051
    edited 2011-08-20 10:31
    You're probably right. It's easier to switch to an Arduino for the Mac and Linux users.
  • PJAllenPJAllen Banned Posts: 5,065
    edited 2011-08-20 10:45
    It hasn't been a concern in 20 years or so.

    What's the beef? "MacBS2" doesn't work?

    You can't get everyone.

    Is an "open letter" a-la Dear Mr. Parallax Claus... in the offing here? (Barf.)
  • ZootZoot Posts: 2,227
    edited 2011-08-20 10:57
    Actually, bytecodes for the Stamp have been reverse engineered (though I think these are for Pbasic 2). See link below.

    Additionally, the Basic Stamp Editor is way past overdue for upgrades, primarily the lack of Mac/Linux support and the need for any kind of "include" especially for multi-slot Stamps. MacBS2 is OK, but it hasn't been updated in a long time, does not support all the available Stamps, is slow as molasses, and does NOT support DEBUGIN.

    http://mcmanis.com/chuck/robotics/stamp-decode.html
  • Martin_HMartin_H Posts: 4,051
    edited 2011-08-20 11:22
    Zoot, thanks for the pointer. If I recall correctly PBasic 2.5 was just syntactic sugar and the token language remained the same.

    PJ, don't look for me to write an open letter. Parallax is a business and they've probably decided to cash cow the BS2 while they invest in the Propeller and Propeller 2. My thinking was if I was a Mac or Linux only user, rather than write a PBasic compiler I would take the path of least resistance and use an Arduinio.
  • Kevin WoodKevin Wood Posts: 1,266
    edited 2011-08-20 11:28
    >>> While Parallax can not release the source, they could release the specification on how code is translated to tokens.

    The only part that they can't release is the Delphi component, which, if I remember correctly, has to do with the editing functionality.

    If the tokenizer source isn't released, it's most likely an IP issue. Which is fine... not everything needs to open-sourced. A good solution for the majority of users would be offering "official" command line tools to let people choose their own editor / IDE. For tools that don't change that often, the maintenance overhead should be very small.
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2011-08-21 10:30
    I have always thought that Parallax just did not want to release the source code, not that they couldn't. After all, the tokenizing of the programs and then having the BasicStamp chip using them is what Parallax has excelled at. It is the same thing all over with the Propeller. We have Spin, a tokenized language that is interpreted by the Propeller. Yes you can do assembly with the Propeller as well, but Spin load the software and often is much needed to fully communicate between cogs and OOP modules.

    Both the BasicStamp and the Propeller has something of a virtual machine that handles the tokens and makes everything work. That seems to be a trade secret. So be it. To me it is just an interesting puzzle and rather good success story for a small outfit in a world of barracudas.
  • Mike GreenMike Green Posts: 23,101
    edited 2011-08-21 11:03
    @Zoot,
    The link you posted is to a very well done reverse engineering effort for the BS1. Presumably, Proteus has done the same sort of thing for the BS2 series to develop their VSM, but their work is proprietary.

    MacBS2 is now broken. The latest MacOS no longer supports PowerPC programs which is how the most recent Mac tokenizer was compiled. Unless the tokenizer is recompiled by Parallax, there's no way for the author to update MacBS2. The only way to use a Mac now for Stamp development is to use Windows. Using Linux seems to depend on the distribution involved. The Linux tokenizer is compiled as a 32-bit library which can be used with some Linux distributions, but not all.
  • ZootZoot Posts: 2,227
    edited 2011-08-21 11:57
    Mike -- good point; I forgot about that pesky Lion upgrade (my own Mac right now is 10.5.8 so MacBS2 works more or less; my partner's Mac is more recent). At risk of harping on a point I've made before, the lack of official support by Parallax for any other platforms than Windows is becoming seriously problematic. The same is not true for WinAVR, Processing/Wiring, various GCC builds, Eclipse, etc., all of which are utterly cross-platform.
  • Mike GreenMike Green Posts: 23,101
    edited 2011-08-21 12:28
    Unfortunately, Parallax is in a difficult position. They have an "old technology" product that's still very useful, still sold in large volumes. They've never had great support for the Mac and for Linux, but it's been sort of adequate so far. Now the whole product line, maybe except for the BS2, is at "end-of-life" even though Parallax has large stocks of the SX chips needed. They're getting ready to put a Propeller-based Board of Education and presumably a PropBOE-based BoeBot as well on the market "sometime soon". Most of the future work on Propeller software will be open-source and cross-platform tools will be used. What to do with "legacy" tools, particularly with the limited resources available? My personal preference would be for Parallax to update the tokenizer by re-compiling for Windows and Linux 64-bit and MacOS Universal binaries. That way, others can package the tokenizer with whatever IDE they want.
  • Kevin WoodKevin Wood Posts: 1,266
    edited 2011-08-21 13:01
    >>> Unfortunately, Parallax is in a difficult position.

    They're only in a difficult position if they fail to respond to market demands, with a resulting loss of sales.
  • Tracy AllenTracy Allen Posts: 6,656
    edited 2011-08-21 14:01
    Brian Forbes did a thorough deconstruction of the BS2 tokens, and wrote up his results in a self-published 160 page book. The advertisement and description of Inside the BASIC Stamp II can still be found on the wayback machine. If you want a copy (highly recommended if you want a better appreciatin of how the Stamp works its magic), you can probably still obtain a copy from Brian at stamp2book@aol.com.

    It does not include the tokens that are specific to the multislot stamps, but it does cover all of the essential structures.

    As has been mentioned, Chuck McMannis wrote Decoding the BASIC Stamp, for BASIC Stamp I.

    Also mentioned, PBASIC 2.5 added several new control structures to the language, ones that were not present in earlier versions of PBASIC. Those are not new tokens for the chip itself, rather, they are compile time mixes of the existing tokens. I wrote an article here about how the new structures such as DO:LOOP are translated by the compiler into the old syntax of IF xxx :GOTO address.

    I can't see how it would behoove Parallax to further development of BASIC Stamp tools, given their EOL status. The existing tools have served shall I guess 99.99% of needs.

    I personally still use MacBS2 extensively on OS10.6.8, and I'll be a slow adopter of OS10.7 due to that and several other Power PC apps that I rely on. Maybe someone will come up with a port of Rosetta.
  • ZootZoot Posts: 2,227
    edited 2011-08-21 17:51
    Naturally, I'll take Dr. Allen's and Mike Green's info at face value (you both always seem to know what you're talking about), but where is EOL for the Stamps posted at Parallax.com? I don't see it there; is there something you know that we don't?
  • Tracy AllenTracy Allen Posts: 6,656
    edited 2011-08-21 18:57
    The situation definitely needs to be clarified and I don't want to mislead. The Stamp will be alive and available long into the future, probably longer still than most of the micro-controllers that you see today on the market. It is not the BASIC Stamp so much as the SX chip that is at end of life. The original announcement is here at SX-End-of-Life-(EOL)-Announcement. I believe that Parallax laid in a huge supply of SX chips for use in their own products, and the main ones would be the multi-slot BASIC Stamps, that is, the BS2sx, BS2e, BS2p, BS2pe, and BS2px, which use the SX28 or SX48 chips at their heart. There are many of us left who still use the SX chip in products, and so far there has not been a shortfall. Other products are migrating to the Propeller. And the flagship BASIC Stamp, the original BS2, is built around a venerable PIC chip, not the SX, so it can continue on its own life line.
  • GordonMcCombGordonMcComb Posts: 3,366
    edited 2011-08-21 19:06
    I gather the "EOL status," if it exists, is in regards to the SX chip. (On edit: Tracy responded while I was writing my post.)

    EOL is a dangerous term to use as it suggests an intention by a manufacturer to cease production after the current run (or production has already ceased and product is limited to what's currently in the pipeline). It usually connotes availability measured in months, not years. I prefer the term NFND (not for new design) for product that's been superseded but still in production.

    Since other microcontroller products have replicated most or all of PBasic I would assume if the market continued to exist for these products, a solution could always be found to provide one, should Microchip simply blow up and cease to exist. It all depends on whether the market is large enough to support the engineering and manufacturing effort.

    -- Gordon
  • Mike GreenMike Green Posts: 23,101
    edited 2011-08-21 19:48
    Tracy and Gordon,
    I'm sorry for perhaps exaggerating the situation. It is the SX processor that is EOL and Parallax does have large stocks on-hand, enough for years. Microchip presumably will continue making the PIC16C57, used in the BS2, for as long as people buy it in sufficient quantities. Nonetheless, given the limited programming resources at Parallax and the movement of Parallax's products to the Propeller, there's not a lot of incentive to do much with the Stamp's development tools vs. putting resources into the Propeller's tools. The Stamp Tokenizer hasn't even been updated to handle the BS2px which has been on the market for several years, so I don't really have an expectation that it will be updated to work with MacOS Lion or 64-bit Linux.
  • Kevin WoodKevin Wood Posts: 1,266
    edited 2011-08-22 03:02
    >>> ...there's not a lot of incentive to do much with the Stamp's development tools...

    The incentive should be to keep selling Basic Stamps...
  • Martin_HMartin_H Posts: 4,051
    edited 2011-08-22 07:08
    Over in the Projects sub-forum a Mac user asked how to connect a Parallax serial RFID reader to a Mac. I don't know about everyone else, but I can't in good conscience suggest a Basic Stamp 2 when the tool is completely broken on one flavor of the OS and partially broken on earlier ones.

    The Propeller chip is a separate issue. While BST lets you use it on a Mac, I'm not sure it's beginner friendly enough to suggest.
  • localrogerlocalroger Posts: 3,451
    edited 2011-08-22 17:47
    Martin_H wrote: »
    Over in the Projects sub-forum a Mac user asked how to connect a Parallax serial RFID reader to a Mac. I don't know about everyone else, but I can't in good conscience suggest a Basic Stamp 2 when the tool is completely broken on one flavor of the OS and partially broken on earlier ones.

    All you need to connect a serial RFID reader to any computer is a serial port for that computer, and possibly a level converter for TTL to RS232 (though for read only a series resistor should be good for that). I would be seriously shocked if there weren't low cost USB adapters with drivers available for Mac.
  • Mike GreenMike Green Posts: 23,101
    edited 2011-08-22 18:17
    FTDI makes and sells a variety of USB to serial adapters, some of which would work perfectly with the 5V logic RFID reader. There are drivers available on FTDI's website for a variety of Windows versions and MacOS versions and the drivers are built-in to most Linux distros.
Sign In or Register to comment.