IMG Developer's Kit: Developer's Kit Guide and Technical Documentation; Version 1.90; User's Guide | ||
---|---|---|
Prev | Chapter 8. Developer Tools and Examples | Next |
FOLDER: KBFDUMP
TYPE: Utility / Stand-alone executable
SOURCE: N/A
LANGUAGE: C / Windows API
IDE: N/A
KBFDUMP.EXE is a 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. This is for the 2.10 KBF files created by Build-A-Board 2.10 only - it will not operate with KBF files prior to 2.00, or later than 2.10.
KBFDUMP.EXE 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
Copy 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
Notes
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
If an ExtractedKBFProject folder already exists, a new ExtractedKBFProject1 folder will be created, then ExtractedKBFProject2, ExtractedKBFProject3, etc.
Example
The KBF structure is fairly well documented here - this is an example of a one-key, one panel, one window layout from Build-A-Board 2.10 - in general the actual dump text isn't that useful, where the -extract option which recreates the source files has been requested numerous times.
===========
KBF HEADER
===========
BYTE Sig[2] = M*
BYTE Ver[3] = 210
DWORD Startoffset = 94 | 0x005E
BYTE Level = 1 | 0x0001
======================
KBF Files/Offsets 0
======================
BYTE FileName[13] = MWF00001.MWF
DWORD Startoffset = 0 | 0x0000
DWORD Length = 109 | 0x006D
======================
KBF Files/Offsets 1
======================
BYTE FileName[13] = MPF00001.MPF
DWORD Startoffset = 109 | 0x006D
DWORD Length = 37 | 0x0025
======================
KBF Files/Offsets 2
======================
BYTE FileName[13] = MBF00001.MBF
DWORD Startoffset = 146 | 0x0092
DWORD Length = 25 | 0x0019
======================
KBF Files/Offsets 3
======================
BYTE FileName[13] = KEY00000.KEY
DWORD Startoffset = 171 | 0x00AB
DWORD Length = 71 | 0x0047
==================
MWF structure
==================
BYTE Sig[2] = MW
BYTE Version = 1 | 0x0001
BYTE Level = 1 | 0x0001
DWORD PanelStructure = 1 | 0x0001
BYTE Measure = 1 | 0x0001
WORD Width = 640 | 0x0280
WORD Height = 488 | 0x01E8
WORD PosX = 200 | 0x00C8
WORD PosY = 200 | 0x00C8
BYTE Position = 1 | 0x0001
BYTE Frame = 4 | 0x0004
BYTE Background = 7 | 0x0007
BYTE Highlight = 15 | 0x000F
BYTE Shadow = 8 | 0x0008
BYTE Border = 1 | 0x0001
BYTE BorderColor = 0 | 0x0000
BYTE FontFaceName =
BYTE FontHeight = 0 | 0x0000
BYTE FontWidth = 0 | 0x0000
WORD FontWeight = 0 | 0x0000
DWORD dwStyle = 3 | 0x0003
==================
Panels List
==================
MPF00001.MPF
==================
MPF structure
==================
BYTE Sig[2] = MP
BYTE Version = 1 | 0x0001
BYTE Level = 1 | 0x0001
BYTE cMBFFILE[13] = MBF00001.MBF
BYTE Measure = 1 | 0x0001
WORD Top = 0 | 0x0000
WORD Left = 0 | 0x0000
WORD Width = 640 | 0x0280
WORD Height = 488 | 0x01E8
BYTE Position = 1 | 0x0001
BYTE Frame = 3 | 0x0003
BYTE Background = 1 | 0x0001
BYTE Highlight = 15 | 0x000F
BYTE Shadow = 8 | 0x0008
BYTE Border = 1 | 0x0001
BYTE BorderColor = 0 | 0x0000
UINT Keys = 0 | 0x0000
==================
MBF structure
==================
BYTE Sig[2] = MB
BYTE Version = 1 | 0x0001
BYTE Level = 1 | 0x0001
DWORD KeyStructures = 1 | 0x0001
===========================
KEYS - KEY 0 (1 of 1)
===========================
KEY00000.KEY
WORD X = 118 | 0x0076
WORD Y = 100 | 0x0064
=========================
KEY Structure - KEY 0
=========================
BYTE Sig[2] = MK
BYTE Version = 1 | 0x0001
BYTE Level = 1 | 0x0001
BYTE bDown = 0 | 0x0000
BYTE Measure = 0 | 0x0000
BYTE Width = 410 | 0x019A
BYTE Height = 290 | 0x0122
BYTE BtnType = 2 | 0x0002
BYTE BtnLabel = KeySymbol
BYTE BtnShift = ShiftSymbol
BYTE BtnAction = keyaction
BYTE BtnFace = 7 | 0x0007
BYTE BtnText = 0 | 0x0000
BYTE BtnHigh = 15 | 0x000F
BYTE BtnShad = 8 | 0x0008
Version 1.78 Release 2 - 6/5/2007
Copyright © 1993-2007 by Innovation Management Group, Inc.
All Rights Reserved.
As seen in ...