You will want to download the KBFDUMP Utility, that can extract the data from the KBF file, and optionally, extract the data and re-create source files, usable by the Build-A-Board builder.
IMPORTANT - the following is ONLY for 2.10 KBF files
Download KBFDUMP.EXE command-line utility KBFDUMP.EXE (56K) (MD5: 6FD0E051602E06DDD7A50043CBEA3E83)
Download KBFDUMP.EXE command-line utility as ZIP file: KBFDUMP.ZIP (22K) (MD5: FAAC0E95FF3CCB37CB3FDAA165075F75)IMPORTANT - the following is ONLY for 2.20 KBF files (see specific instructions below)
Download KBFDUMP.EXE (beta) command-line utility as ZIP file: KBFDUMP220.ZIP (22K) (MD5: 099D1FB026F9DA6630A76DD94B6D83C1)
KBFDUMP.EXE for 2.10 files Usage Notes:
Usage: KBFDUMP [KBFFileName]
(If no file name specified, KEYBOARD.KBF is used)
To extract SOURCE projects from KBF files, use "-extract"
Usage: KBFDUMP -extract [KBFFileName]
(If no file name specified, KEYBOARD.KBF is used)
Extracted project files will be saved to ExtractedKBFProject[#]
These source files will be located in Build-A-Board\Source folder
- Instructions (if running Build-A-Board 2.10 Version / Build-A-Board 2.20 NOT installed):
- Download the KBFDUMP.EXE utility, and place in the \Program Files\Build-A-Board\Bin folder
- From the command-line (CMD project), in \Program Files\Build-A-Board\Bin, run KBFDUMP on the existing KBF file you have, e.g. KBFDUMP -extract "\My Documents\KEYBOARD.KBF"
- Now go into the Build-A-Board Builder
- Use File | Open, and select and open ExtractedKBFProject
- From the opened ExtractedKBFProject, use File | Save As… and select a new name for the project (Example: MyLostProjectt)
- Use File | Close to close (& save) the project
- Now copy the \Program Files\Build-A-Board\Source\MyLostProject\MyLostProject.zip to a safe place, and repeat "I will always backup my source files" as many times as necessary
- Instructions (if Build-A-Board 2.20 installed):
- Download the KBFDUMP.EXE utility, and place in the \Program Files\Build-A-Board\Bin folder (or \Program Files (x86)\Build-A-Board\Bin if on a 64-bit system)
- Identify the 2.10 KBF file you want to convert
- Locate your SOURCE folder for your system (e.g. \Users\Public\Documents\Build-A-Board\SOURCE), then make a new folder for the project (i.e. OldLayout)
- Copy the 2.10 KBF into the OldLayout folder
- At the CMD prompt, change to the OldLayout folder, then run \Program Files\Build-A-Board\BIN\KBFDUMP.exe -extract KEYBOARD.KBF (or name of KBF file)
- Edit the new PROJECT.TXT to exactly match the folder you are in (here OldLayout) (e.g. Notepad PROJECT.TXT) The file should have one line and it MUST match the folder name, e.g. OldLayout) (Note: This should be an ANSI text file, not a UNICODE text file - if already UNICODE, you should restart and NOT convert before changing project file - once PROJECT.TXT is a Unicode file, Build-A-Board will treat it as non-2.10 project)
- Now go into the Build-A-Board Builder
- Scroll down and select the OldLayout project
- Note: If you get an Error Allocating Memory listing MWF00001.MWF, you did not name the PROJECT.TXT file correctly. The project has been converted incorrectly, you need to delete the folder (e.g. OldLayout folder) from the SOURCE folder, AND delete the "OldLayout original 2.10 files", and then close Build-A-Board, and start at the top).
- When prompted, select Yes to Convert to 2.20, or say No, and keep as a 2.10 target project
KBFDUMP.EXE for 2.20 files Usage Notes:
Usage: KBFDUMP [KBFFileName]
(If no file name specified, KEYBOARD.KBF is used)
To extract SOURCE projects from KBF files, use "-extract"
Usage: KBFDUMP -extract [KBFFileName]
(If no file name specified, KEYBOARD.KBF is used)
Extracted project files will be saved to ExtractedKBFProject[#]
These source files will be located in Build-A-Board\Source folder
- Instructions (Build-A-Board 2.20 must be installed):
- Download the KBFDUMP.EXE utility, and place in the \Program Files\Build-A-Board\Bin folder (or \Program Files (x86)\Build-A-Board\Bin if on a 64-bit system)
- Identify the 2.20 KBF file you want to convert
- At the CMD prompt, change to the folder that contains the KBF file you want to obtain the source, then run \Program Files\Build-A-Board\BIN\KBFDUMP.exe -extract KEYBOARD.KBF (or name of KBF file)(e.g. C:\SomeFolderwitha220KBFFile>\Program Files\Build-A-Board\BIN\KBFDUMP.exe -extract MyLostSource.KBF[Enter]
- Now run Build-A-Board (if Build-A-Board is running, right-click and Refresh View to update projects)
- Find the ExtractKBFProject[#] project and open it.
- Important Note: You may see some errors (STT file, etc.) These can be ignored, but the VERY FIRST thing you do once the project has been opened is select File | Save As... and rename/save as a different project, e.g. MySourceThatIWillSaveForever
- At this point, you should be able to build/modify/save/close project. If there are any errors, you will need to redo the kbfdump steps from the KBF file
Extracting File from KBF (Linux command line example)
In this example, we will use dd (Linux command line utility) to extract IMG00000.PNG from an existing KBF.
If you use kbfdump FILENAME.KBF[Enter] you will get a listing of headers, files, and offsets. Record the Startoffset from KBF header (1102), and the Startoffset from the file interested in (57534), as well as the file size (524138) - relevant output results below:
===========
KBF HEADER
===========
BYTE Sig[2] = M+
BYTE Ver[3] = 220
DWORD Startoffset = 1102 | 0x044E
BYTE Level = 2 | 0x0002
... ...
... ...
... ...
======================
KBF Files/Offsets 44
======================
BYTE FileName[13] = IMG00000.PNG
DWORD Startoffset = 57534 | 0xE0BE
DWORD Length = 524138 | 0x7FF6A
Now, at Linux command prompt in directory containing KBF file:
dd if=FILENAME.KBF of=WANTEDIMG.PNG bs=1 count=524138 skip=58636[Enter]
Explanation:
- dd - main command (Data Description/Disk Dump/Data Dump to copy/convert data)
- if=FILENAME.KBF - Input File is our KBF file name FILENAME.KBF
- of=WANTEDIMG.PNG - Output File is the PNG file name
- bs=1 - Block Size is 1 byte
- count=524138 - Count of blocks (here, bytes) - file size of wanted PNG file
- skip=58636 - Skip blocks 1102+57534 (data start offset + file start offset)
IMPORTANT NOTES
- Be sure to use a copy of the original .KBF file - save/copy/backup your original files before processing / using this sequence (the original will remain untouched, but it helps to have the original as a reference if you keep the same file name and build an updated .KBF with the same name)
- If needed, you can remove SOURCE folders with extracted files by using Windows Explorer and going to \Users\Public\Documents\Build-A-Board\SOURCE. If doing this, it is suggested to close Build-A-Board Builder first, and be careful deleting folders from the SOURCE folder - you may want to move to a different location rather than deleting. Also note there is a matching [Folder Name].BMP file that should be removed.
- For 210 KBFs: You will want to convert 2.10 files to the 2.20 version for best results - refer to Build-A-Board help for notes on staying/building 2.10 targets from the 2.20 Build-A-Board.
- Other notes:
- For 2.10 KBFDUMP.exe: This utility is also in the Developer's Kit 1.78 Release 2, available in the Developer's corner, and there are further detailed notes on the utility.
- For 2.20 KBFDUMP.exe: This utility is still in development and not available (except here as a beta) for any release prior to Build-A-Board 2.20 Release 5.
- By default, the utility also dumps to the screen the data values of the KBF file. You can use output redirection to save to a file, e.g. KBFDUMP > KBF.TXT
- We can't stress the importance of backing up your source files enough.
Category: Integrating(Developing) | Type: Question/Answer | Product: Build-A-Board | Version: 2.10 |
Notes:
As seen in ...