Shop OBEX P1 Docs P2 Docs Learn Events
Looking for a BS2sx eeprom reader. — Parallax Forums

Looking for a BS2sx eeprom reader.

Rambo777Rambo777 Posts: 1
edited 2014-01-30 12:00 in BASIC Stamp
I am in need of or how-to-make an EEPROM reader for the BS2sx chip, software or hardware or both. I have the Propeller kit and the Parallax Professional Developer board, can I use either of these to read the programs on the BS2sx chips I currently have in use? I use the BS2sx chips and Basic Stamp Super Carrier board modules to control air valves and motor control modules. Any help is greatly appreciated.

Thank you,
Steve Blake

Comments

  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2014-01-30 08:11
    Steve,

    There are several programs out there for reading an EEPROM using a BS2. These programs should also run on the BS2sx. What I am puzzled about though is if you're trying to get code for the BS2sx itself or if you're trying to read the data off an EEPROM for the BS2sx.
  • Mike GreenMike Green Posts: 23,101
    edited 2014-01-30 09:36
    The quick answer is that you can't read the programs off the BS2sx (or any other Stamp model). There are built-in statements for reading and writing data from/to the built-in EEPROM (READ and WRITE), but you have to load a new program into the Stamp to do so and that program will overlay part of the existing program in the Stamp so you'll only be able to read part of the existing program (what's not overlaid). Not only that, but what's stored in the EEPROM is not readily understandable. It's a highly compressed and compiled form of the original program with labels and variable names removed. Many of the original statements (like FOR/NEXT and DO) are transformed into more primitive operations. There's no public documentation on the format of this compiled code, so you're on your own in terms of making sense of it.
  • GadgetmanGadgetman Posts: 2,436
    edited 2014-01-30 12:00
    Can we assume that you have a BS2sx-based system, but not the original source code?

    What happened to the source?

    In theory, you could desolder the EEPROM from the BS2sx module and connect it to either another BS2(sx), the Propeller board, or even a PC with the right reader(the chip can be read with the I2C protocol), and download the program that way, but...

    That will only get you a very, very compressed binary. As has been mentioned, labels has been replaced/removed, variables are no longer reference by names, and commands has been replaced by a varying number of 'tokens'. And to make it extra fun, not all tokes are the same size, either.

    Even if a 'decompiler' exists, the resulting 'source' code will not loo like the original. And that assumes that it can handle the commands and tokens that are specific to the BS2sx.

    I ccasionally enjoy decompiling ROMs from old 8bit computers to find out how they work, but to decompile a BS2 binary... no...
    Not that masochistic...
Sign In or Register to comment.