Resources | developer.brewmp.com Resources | developer.brewmp.com

Developer

resources

Creating binary resources

Raw binary data can be added as a resource for your application. Data can be specified directly in either hex or text format, or pulled in from a file.

To create binary resources

  1. From the Resource Manager window, click Insert > New Binary , or press Shift+Ctrl+B.

    All binary resources are listed with the new binary resource selected, and the new binary resource properties are displayed in the properties control pane.

  2. In the properties control pane, enter the following information for the new binary resource.
    Field Make this entry
    ID A number between 6001 and 7000 is assigned automatically; however, it can be changed if you want a specific ID assigned. The ID must be a unique integer among binary resources within the same resource file (CAR).
    Name The name must be an array of contiguous characters (no spaces between characters) that is valid for variable names in C/C++.

    Note: Name strings are not saved in the binary BAR file when it is compiled. When a BAR file is decompiled into a CAR format, all Name fields are automatically generated.

    Source Select one of the following formats to specify the type of source for the binary resource from the drop-down list.
    • Text : The data is in a text format. During the compilation the contents are encoded based on the Encoding attribute specified and written as a binary resource.
    • File: Specifies the data that is contained in a file. Currently only disk files are supported. During compilation, the contents are written "as is" in the binary resource.
    • Hex: The data is in hexadecimal format. Every two characters represent a single byte that is written to the binary resource during compilation.
    Filename The filename field becomes active when you select file in the Source field drop-down menu. Select Browse to browse to the location of the desired file. A default name is assigned to the resource you are creating. The name must be an array of contiguous characters (no spaces between characters) that is valid for variable names in C/C++.

    Note: Name strings are not saved in the binary BAR file when compiled. Thus, if a particular BAR file is decompiled back into a CAR format, all Name fields are automatically generated.

    Encoding This drop-down list is only enabled when the data source is Text. Select the text format from the drop-down list.

    Note: When KSC5601 is specified as the encoding format and the file is saved, CP949 is subsequently shown as the encoding format. This is because CP949 is a super-set of KSC5601.

    Note: For Text source data, the data is encoded prior to compiling the binary BAR file. No Brew MP-specific BOM is inserted for binary resources.

    Comment

    Enter any comments for the resource.

    Note: Comment strings are not saved in the binary BAR file when compiled. Thus, if a particular BAR file is decompiled back into a CAR format, all comment fields will be blank.

  3. To apply the edits to the resource, click File > Save.

    The Resource Manager performs data validation on the information and then updates the resource information in the list view.