Often a game calls for a table in ROM containing a series of entries with multiple pieces of information stored per entry. As usual, the most efficient way to do this on a 6502 is with parallel arrays but these are annoying to create in ROM, because you have a number of tables that must all be kept synchronized if any entries are moved, removed or added.
The tblmake utility included in the tools directory makes this easier. It's called with input.txt output.s as its arguments and the input file is a series of commands, one per line.
Sample:
# this file defines the metatiles used in this game I M_FIRST_SPECIAL_MISC = Metatiles::LADDER I M_FIRST_COLLECTIBLE = Metatiles::COIN I M_LAST_COLLECTIBLE = Metatiles::CHIP I M_FIRST_SPECIAL_WALL = Metatiles::LOCK_RED I M_FIRST_SPECIAL_CEILING = Metatiles::PRIZE E Metatiles L MetatilePalettes I .pushseg I .code L MetatileFlags I .popseg L MetatileUL L MetatileLL L MetatileUR L MetatileLR R EMPTY C .byt M_PAL_0 C .byt M_EMPTY C .byt $3f C .byt $3f C .byt $3f C .byt $3f R BRICKS C .byt M_PAL_2 C .byt M_SOLID_ALL|M_SOLID_TOP|M_BRICKS C .byt $00 C .byt $01 C .byt $02 C .byt $03
# - A comment.
E - Defines an enum containing the names of all the rows.
R - New row. Defines an entry and gives it a name.
L - New list. Defines a type of information that rows contain.
C - New column. Fills out a piece of data for the row, in the same order as the lists were defined.
I - Directly insert a line of assembly into the generated source file.