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, vacations, etc.
Answer:
Here’s a way to capture those macros and bitmaps.
- 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.
- Connect a terminal program (Tera Term works well) and set it up to capture text into a file.
- 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.
- Set the text capture feature of your terminal program to save new text into another text file.
- 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).
- Now you can disable the text capture feature of your terminal program. Now it’s going to get a little tedious.
- 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:
- Connect your terminal program to the SLCD.
- Issue the “z” command to clear the SLCD display.
- Issue the command “xi 1 0 0” to display bitmap number 1 in the upper left corner of the display (0,0).
- Disconnect your terminal program from the SLCD and connect the BMPLoad program to the SLCD.
- 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”.
- Disconnect the BMPLoad program.
- 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.
- 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.
- 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. You can use BMPload to put your new macros and bitmaps into your SLCD and move ahead when you’re done. Contact that consultant, though, and get the original macros and bitmaps, just in case.