# definitions
*strip pointer* is the address of the first tile drawn from the blockdata of the new map that appears in a connection strip. Strips are always drawn starting from the top-left.
*strip destination* is the address of the first tile of the connection strip on the current map struct. The strip destination for a given connection will point to the location in the $c800 map to start drawing the connection strip.
*connection strip length* is the height of the strip in east/west connections, and the width of the strip in north/south connections. The opposite dimension is 3 blocks.
*window block* is the address of the block in the new map struct that is supposed to be at the top-left of the screen when you enter the new map. This is used as a reference to draw new tiles to the bg map. Vertical (east/west) and horizontal (north/south) distance from the edge of the map are factored in at runtime.
*x offset* and *y offset* adjust the player's position when entering the new map. This generally means placing the player at the opposite end of the map in the direction they entered from.
# diagram
(it's from tauwasser)
# blockdata addresses
Here's a handy cheat sheet for common addresses used when making connections. Note that there is a 3 block border around the current map at all times.
* top left block of top left 3x3 is $c800
* top left block of top 3xw is $c800 + 3
* top left block of top right 3x3 is $c800 + 3 + w
* middle left block of top left 3x3 is $c800 + 3 + w + 3
* middle left block of top 3xw is $c800 + 3 + w + 3 + 3
* middle left block of top right 3x3 is $c800 + 3 + w + 3 + 3 + w
* bottom left block of top left 3x3 is $c800 + 3 + w + 3 + 3 + w + 3
* bottom left block of top 3xw is $c800 + 3 + w + 3 + 3 + w + 3 + 3
* bottom left block of top right 3x3 is $c800 + 3 + w + 3 + 3 + w + 3 + 3 + w
* top left block of left hx3 is $c800 + 3 + w + 3 + 3 + w + 3 + 3 + w + 3
block location | full expression | simplified |
top left block of top left 3x3 | $c800 | $c800 |
top left block of top 3xw | $c800 + 3 | $c800 + 3 |
top left block of top right 3x3 | $c800 + 3 + w | $c800 + w + 3 |
middle-row leftmost-column block of top left 3x3 | $c800 + 3 + w + 3 | $c800 + w + 6 |
middle-row leftmost-column block of top 3xw | $c800 + 3 + w + 3 + 3 | $c800 + w + 9 |
middle-row leftmost-column block of top right 3x3 | $c800 + 3 + w + 3 + 3 + w | $c800 + (w * 2) + 9 |
bottom left block of top left 3x3 | $c800 + 3 + w + 3 + 3 + w + 3 | $c800 + (w * 2) + 12 |
bottom left block of top 3xw | $c800 + 3 + w + 3 + 3 + w + 3 + 3 | $c800 + (w * 2) + 15 |
bottom left block of top right 3x3 | $c800 + 3 + w + 3 + 3 + w + 3 + 3 + w | $c800 + (w * 3) + 15 |
top left block of left hx3 | $c800 + 3 + w + 3 + 3 + w + 3 + 3 + w + 3 | $c800 + (w * 3) + 18 |
top left block of hxw (current map) | $c800 + 3 + w + 3 + 3 + w + 3 + 3 + w + 3 + 3 | $c800 + (w * 3) + 21 |
top left block of right hx3 | $c800 + 3 + w + 3 + 3 + w + 3 + 3 + w + 3 + 3 + w | $c800 + (w * 4) + 21 |
bottom left block of left hx3 | ... | $c800 + (w * 3) + (w * (h - 1)) + (2 * (h * 3)) + 15 |
bottom left of bottom left 3x3 | $c800 + (2 * (3 * w)) + (2 * (3 * h)) + (w * h) + 36 - 3 - w - 3 | ... |
bottom left of bottom 3xw | $c800 + (2 * (3 * w)) + (2 * (3 * h)) + (w * h) + 36 - 3 - w | ... |
bottom left of bottom right 3x3 | ... | $c800 + (2 * (3 * w)) + (2 * (3 * h)) + (w * h) + 36 - 3 |
bottom right block | ... | $c800 + (2 * (3 * w)) + (2 * (3 * h)) + (w * h) + 36 - 1 |