CNT File not found

Make sure GBTD.CNT is in the same directory as GBTD.HLP.


Designing tiles


Using the mouse

You draw pixels by pressing either the left or right button when your cursor is in a block in the drawing grid. See Draw types for a description of the available draw types.

 Selecting other colors for the buttons is done by pressing the left or right button in one of the four colors located just under the drawing grid.

By pressing the left button, you will change the current color designated to the left button, which is presented by the color following the L. This will also select the color (see Colors for more information).

By pressing the right button, you will change the current color designated to the right button, which is presented by the color following the R.


Draw types

GBTD supports the following draw types;

Pen

With Pen selected, the current color  will appear at the location the cursor is pointing at. Pen can be selected via the vertical toolbar, pressing CTRL-P, or using the menu-option under Design.

Flood fill

Flood fill will replace all same-colored pixels in the surroundings of the selected pixel with the current color. Flood fill can be selected via the vertical toolbar, pressing CTRL-F, or using the menu-option under Design.


Colors

When drawing, you are actually setting color index-numbers. These are 0 upto 3. The actual colors these numbers represent (the "Object Palette") can be changed by using the up- and down arrows next to the four colors under the drawing grid.

First, select one of the four colors with the left button. A selection rectangle will appear around the color. Now use the up- and down arrows to change the selected color.


Design tools


Scrolling tiles

Tiles can be scrolled to any direction by using the buttons on the vertical toolbar or the Scroll menu-options under Design.

Tiles are scrolled rotationally; when you scroll to the left, the left line of pixels reappears on the right.


Flipping tiles

Tiles can be flipped horizontally or vertically by using the buttons on the vertical toolbar or the Flip menu-options under Design.


Cutting and Pasting

The currently selected tile can be Cut, Copied and Pasted by using the buttons on the horizontal toolbar, from the Edit menu option or by using the designated hotkeys.

A cut or copied tile is send to the Windows clipboard as a bitmap with a size of the currently selected tilesize. This bitmap can then be pasted in GBTD, or in most other Windows applications.

You can use Paste to import the current bitmap in the clipboard to the currently selected tile. Keep the following points in mind when doing so;

•	GBTD will ignore any pixels outsize the current tilesize; ie, when you paste a 100x100 sized bitmap into a 16x16 tile, GBTD will 'cut out' a 16x16 rectangle out of the bitmap, starting in the topleft corner.

•	Although GBTD will try to grayscale and remap gray-shades, its best to use an image-editor to grayscale the bitmap to a 16-color Windows palette.

When you cut a tile, GBTD will fill the current tile with color 0.


Clear tiles

This option, which is located under the Design menu, will fill all tiles in the tileset with the color 0.

Although GBTD will not ask you for confirmation, it will give you the opportunity to save the tileset if you changed it.


Viewing tiles


Tile size

You can change the size of your tiles under the View menu.

GBTD supports 8x8, 16x8, 16x16 and 32x32 as tile size.

When you change the size of your tiles, the tiles will not be lost, but are either merged or split up, depending on the new and old tile size.


Simple

The Simple option under the View menu determines if the multiple tiles showcase should be displayed.

The multiple tile showcase shows you how the tile relates to itself in a group. However, it takes up extra screen-space and can slow down your system due to the extra screen-updates.


Grid

The Grid option under the View menu determines if the grid should be displayed.


Nibble markers

The Nibble markers option under the View menu determines if the Nibble markers should be displayed.

Nibble markers are small crosses which appear after every four pixels.


Importing


Import options

The import window contains the following settings which you can use to customize the way in which GBTD will import tiles from other packages.

Filename

Specifies path and filename from which GBTD will import.

Type

Type of import-file. See Import file types for a list of supported file types.

First tile from import file

The first tile GBTD should import, beginning at 0.

First tile in GBTD

GBTD will store imported tiles starting at this tile; this number is based on the currently selected tile-size.

Tile count

The number of tiles to import.


Import file types

The following file types are supported:

GBE file


GBE file

As GBE files do not contain any info regarding the tile-size, GBTD assumes the tile-size in the file is the same as the size of the current set. This means that First tile from import file and Tile count are based on the current tile set size.

The current color set will be changed to the color set supplied by the GBE file.

GBTD will import 8x8, 8x16, 16x16, and 32x32(new style) correctly; 32x32 (old style) will be out of sync.


Exporting


Export options

The export window (called by either Export or Export to..) contains the following settings which you can use to customize your export-file.

Filename

Specifies path and filename to which GBTD will export.

Type

Type of export-file. See Export file types for a list of supported file types.

Label

This will be used as label for your tiles. If you export your tiles as separate units, each tile will be labeled as this value + the tilenumber with no leading zeros.

Section

The section of the tileset. Currently only used by RGBDS.

Bank

The bank in which the tileset should be placed. Currently only in use by RGBDS.

From/To

The range of tiles which should be exported. These numbers are based on the numbers in the tilelist.

Export tiles as one unit

If checked, all tiles will be exported as a continues block of data, with the (optional) counter being based on the whole set. If not checked, each tile will be exported as its own block of data, with its own label and the counter being based on the tiles themselves.

Format

The data format which GBTD should use while exporting data. See Export data formats for a list of supported data formats.

Counter

If set to a value other than "none", GBTD will insert counter(s) inside the exported data. In essence, there are three ways of insertion and three counter-types:

Counter-types;

Byte-count

The total amount of bytes.

Tile-count

The total amount of tiles. ie: Exporting ten 16x16 tiles will result in a counter of 10; Exporting ten 8x16 tiles will also result in a counter of 10.

8x8-count

The total amount of 8x8 tiles. Exporting ten 16x16 tiles will result in a counter of (4 * 10) = 40; ten 8x16 tiles will result in (2 * 10) = 20.

Insertion;

as Byte

A byte will be inserted right before the data.

as Word

A word will be inserted right before the data.

as Constant

If applicable, GBTD will generate a constant containing the counter; the name of this constant will be the tile-label +"Len".


'Export' vs 'Export to..'

You can start exports in two ways;

Export to..

This option is located under the File menu; use this option to set up the desired Export options. This should be done at least once.

Export

This option is located under the File menu, has a button on the horizontal toolbar, or is called by using Ctrl-E. This will silently export data using the current settings. If the settings are invalid for any reason, GBTD will report this and display the Export options.

As GBTD saves your last settings in the GBR file, and the settings will generally not change, you can setup a GBR file according to your project needs, and do further exports using the faster Export.


Export data formats

You can export your data to any of the following formats:

Gameboy 4 color

8 pixels in a row, split up in two planes. This is standard GB video-memory format which can be moved to it on a byte-per-byte basis.

Gameboy 2 color

Exports 8 pixels in a row, but only one plane, containing color 0 and 3. Do a read and double write to fill up both planes in GB video-memory. This format is very suitable for black-and-white tiles like the alphabet.

Byte per color

Writes one byte for each color, containing 0x00 upto 0x03. Although not efficient for the GB itself, it is a good format for intermediate files in conjunction with the All-purpose binary file type.

Tiles are arranged in the following 8x8 manor:

8x8	8x16	16x16	32x32

0	0	0	2	0	2	8	10

1	1	3	1	3	9	11

4	6	12	14

5	7	13	15


Export file types

The following file types are supported:

RGBDS Assembly file

RGBDS Object file

TASM Assembly file

GBDK C file

All-purpose binary file


RGBDS Assembly file

This type generates two files; an assembly file and an include file. The include file can be used as reference to the assembly file by placing;

  INCLUDE "<include file>"

in your own source. Also, do not forget to compile the assembly file and include the resulting object-file in your project.

The include file contains a constant named  Label + 'Bank', which contains the bank to which the data will be allocated.

To export a tileset to the HOME bank, set Bank to 0.

If you export each tile as its own block of data (Export as one unit turned off), GBTD will still include a label named Label (without a number), which can be used as a 'main' entrance to your data.

This type generates the same output as the RGBDS Object file type; use this type for 'debugging', and the RGBDS Object file type for speed of compilation.

The default assembly file-extension is z80. The default include file-extension is inc. See INI file for information on how to change these default values.


RGBDS Object file

This type is RGBDS "OBJ1" compatible, which can be used by the linker of RGBDS 1.03.

As output is exactly the same as the uncompiled RGBDS Assembly file type, see this type for further information.

The default object file-extension is obj. The default include file-extension is inc. See INI file for information on how to change these default values.


TASM Assembly file

When using TASM file-type, only an assembly file is generated, as TASM does not have support for include-files. To use the file, place a;

 #INCLUDE "<Assembly file>"

in your own source.

If you export each tile as its own block of data (Export as one unit turned off), GBTD will still include a label named Label (without a number), which can be used as a 'main' entrance to your data.

The default file-extension is z80.  See INI file for information on how to change this default value.


GBDK C file

This type generates two files; a C-source file and a header file. The header file can be used as reference to the C-source file by placing;

  #INCLUDE <Header file>

in your source.  Also, do not forget to compile the C-source file and include the resulting object-file in your project.

Data is exported as type unsigned char[]. This means that if you have word-type counters, these will be stored as two bytes. To load the counter, either do two byte-loads of use a typecast.

The default C-source file-extension is c. The default header file-extension is h. See INI file for information on how to change these default values.


All-purpose binary file

This file-type will generate a binary dump, much like how it would appear in a ROM itself. This format is most useful if you need to do you own specific processing which GBTD can't do for you.

As this is just a binary dump, there are no labels or constants generated by this type.

The default file-extension is bin. See INI file for information on how to change this default value.


Miscellaneous


INI file

GBTD can (and will automatically) be customized by changing settings in a GBTD.INI file, which contains the following sections and settings;

[General]

GBRPath

Points to the path of the last opened GBR-file. This is the default path used in the Open-command. The default value is the current path.

BinExt

The extension used by All-purpose binary file types. The default value is bin.

[RGBDS]

AsmExt

The extension used by RGBDS Assembly file types. The default value is z80.

IncExt

The extension used by include files generated by RGBDS Assembly file and RGBDS Object file types. The default value is inc.

ObjExt

The extension used by RGBDS Object file types. The default value is obj.

[GBDK]

CExt

The extension used by GBDK C file types. The default value is c.

HExt

The extension used by header files generated by GBDK C file types. The default value is h.

[TASM]

AsmExt

The extension used by TASM Assembly file types. The default value is z80.

[Recently used files]

Storage for Reopen. This section is managed by GBTD and should not be changed manually.


Contacting me and others

You can contact me by mailing to:

hpmulder@worldonline.nl.

For updates and info about GBTD, look at:

http://www.worldonline.nl/~hpmulder/gbtd.html

Others:

RGBDS

RGBDS ("Rednex Gameboy Development System") is an assembly-package best suited for large projects; it has build-in bank-support and an assembler<->linker setup, which gives you MAKE capabilities. You can find RGBDS at:

http://www.matilde.demon.co.uk/rgbzone.htm

GBDK

GBDK ("Gameboy Development Kit") includes an ANSI C compiler. If you want to program in a higher level language, have a look at this one. You can find GBDK at :

http://lsewww.epfl.ch/~felber/GBDK/

Jeff Frohwein's GameBoy Tech Page

Next to being the most active hub for Gameboy development, this site also contains TASM, which is an assembler best suited for smaller projects. It is located at:

http://fly.hiwaay.net/~jfrohwei/gameboy/home.html

GBE

GBE ("Gameboy Editor") is another tile designer, which operates under DOS. You can find GBE (and other Gameboy related projects) at:

http://www.geocities.com/SiliconValley/Heights/7673/index.html