408-754-4176 | info@reachtech.com

by Reach Technology, a Novanta Company
Support > Frequently Asked Questions > How can I recover macros and bitmaps from a .bin file?

How can I recover macros and bitmaps from a .bin file?

Question: We had a consultant generate our bitmaps and macros, and then left us only with the .bin file? Now you need to make a change, and can’t get the consultant to do it in time because of other commitments, vacation, etc.

Answer: Here’s a way to capture those macros and bitmaps:

  1. Use BMPLoad.exe to load the .bin file from your PC and then connect to your SLCD. Click the “Store into SLCD” button. Now your bitmaps and macros are in the SLCD. You can use a terminal program to coax the SLCD into telling you what’s there.
  2. Connect a terminal program (TeraTerm works well) and set it up to capture text into a file.
  3. Issue the command “lsmac” and the SLCD will list out all of its macros, and you will have captured them into a file, which you can then edit and use as your new macros.txt file.
  4. Set the text capture feature of your terminal program to save new text into another text file.
  5. Issue the command “lsbmp” and the SLCD will list out details for all your bitmaps, and you will have captured them into another file (bitmap_info.txt), which you’ll want for future reference (most importantly, for the dimensions of each bitmap).
  6. Now you can disable the text capture feature of your terminal program. Now it’s going to get a little tedious.
  7. What you’ll need to do from here on out is display a bitmap on the SLCD display and then use the “GetScreen” feature of BMPLoad to capture a bitmap of the display.  The resulting bitmap file can then be edited to cut out the background and keep just the desired bitmap data (referring to the bitmap_info.txt file for the index of each bitmap and its corresponding Width and Height.  For example:
    1. Connect your terminal program to the SLCD.
    2. Issue the “z” command to clear the SLCD display.
    3. Issue the command “xi 1 0 0” to display bitmap number 1 in the upper left corner of the display (0,0).
    4. Disconnect your terminal program from the SLCD and connect the BMPLoad program to the SLCD.
    5. Click on GetScreen and specify a file to save the screen to (Warning: It will be about 150K and will take a couple of minutes); in this case, I’d suggest naming the file “disp_bm_1.bmp”.
    6. Disconnect the BMPLoad program.
    7. Repeat 7.1 through 7.6 for bitmaps 2 — N, where N is the index of the last bitmap in the bitmap_info.txt file.
    8. You now have a collection of display sized bitmap files, which you can now edit with your favorite .bmp editor, keeping only the actual bitmap and discarding the background.
  8. Now that you’ve captured your macros and bitmaps, archive them. Create a new folder and copy the archived files into it, and then you can make changes. When you’re done, you can use BMPload to put your new macros and bitmaps into your SLCD and move ahead.  Be sure to contact that consultant, though, and get the original macros and bitmaps, just in case.