Maps & Tilesets
This page is a guide to the games/tbs/src/map/ folder of the Alchemy project,
where every town, dungeon, house interior, and outdoor path in Golden Sun: The
Broken Seal is stored as tab-separated map data.
This folder holds 182 map directories, each storing its tile layouts, terrain
heights, and treasure locations in open .tsv grids. All of them are listed in
ROM order in maps.tsv and wired into the game through the 186-row
MapsWork table in resources.s.
When Isaac walks behind a Vale roofline, climbs a staircase, or watches a waterfall rush past, those rules come from these tables. The sections below cover how three GBA layers fit into one grid, plus tile animations, World Map chunks, and runtime unpacking. How maps drive movement and height collision is described in World, Scenes & Maps.
Three layers in one .tsv grid

Each map is a 128×128 grid of 16×16-pixel
metatiles. Inside the
.tsv files, the three GBA background layers (ground, walls, and roofs) sit
side by side in one grid. Their column offsets, scroll ratios, and independent
drift rates, such as that of blowing desert haze, live in layers.tsv.
| File | Contents |
|---|---|
grid_picture.tsv | Metatile appearance indices into metatile_tiles.tsv |
grid_behavior.tsv | Metatile behaviour IDs (0 = plain ground, 240+ = universal behaviours, lower values = scene cue triggers) |
grid_shape.tsv | Ground height shape indices into shapes.tsv |
grid_actors.tsv | Metatiles overriding an actor's BG layer or OAM priority (for walking behind roofs with no script code) |
metatile_tiles.tsv, shapes.tsv | 2×2 tile definitions and per-pixel terrain height profiles |
spots.tsv | Candidate coordinates for chests and Psynergy Stones (spawned only if the active scene has a matching cue row) |
tileset_anims.tsv, blend.tsv | Timer-driven VRAM tile replacement animations and alpha-blend scripts |
header.tsv, layers.tsv, contents.tsv, tilesets.tsv | Map metadata, layer offsets and drift, and referenced palette and tileset resources |
Chests live in spots.tsv rather than the tile grid so multiple scenes sharing
one map can carry different treasure. Language-specific overrides sit beside the
base files (e.g., grid_picture_es.tsv).
Tile animations, World Map chunks, and runtime unpacking

- Tileset animation (
tileset_anims.tsv) and blend scripts (blend.tsv): Waterfalls and rivers repaintVRAMtiles on timers without altering metatiles, updating every square that uses those tiles at once. Blend scripts step layer alpha weights on timers the same way. - World Map chunks: The World Map spans four times a town's grid in each direction, cut into compressed 512×512-pixel squares. Only the four squares around the party stay unpacked in EWRAM, unpacking at most one new square per tick.
- Runtime unpacking (
field/map_grid_convert.s): Unpacks the three compressed planes ofmap.grid.lzwith ARM code in IWRAM and weaves them into one 32-bit word per metatile. Each word packsmetatile_tilesin the low 16 bits andbehaviorandshapein the high 16 bits. - Folder naming: Folders are named after the scene or place that uses them.
empty_map/is row 0 ofMapsWorkfor the Title, File Screen, and World Map, and two unnamed maps keep their resource numbers. Map-reading code lives in Field engine and tileset PNGs live in Graphics assets.