# 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 locationfull expressionsimplified
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
# 20x20 map simplifications Flush 20x20 maps can be connected to achieve a seamless overworld. Take caution to make applicable corners use the same blocks as the opposite diagonal map's border tile. ## North ; NORTH to Example db GROUP_EXAMPLE, MAP_EXAMPLE dw Example_BlockData + EXAMPLE_WIDTH * (EXAMPLE_HEIGHT - 3) ; strip pointer dw OverworldMap + 3 ; strip destination db EXAMPLE_WIDTH ; strip length db EXAMPLE_WIDTH ; connected map width db EXAMPLE_HEIGHT * 2 - 1, 0 ; y, x offset dw OverworldMap + (EXAMPLE_WIDTH + 6) * (EXAMPLE_HEIGHT) + 1 ; window ## South ; SOUTH to Example db GROUP_EXAMPLE, MAP_EXAMPLE dw Example_BlockData ; strip destination dw OverworldMap + (EXAMPLE_WIDTH + 6) * (EXAMPLE_HEIGHT + 3) + 3 ; strip location db EXAMPLE_WIDTH ; strip length db EXAMPLE_WIDTH ; connected map width db 0, 0 ; y, x offset dw OverworldMap + EXAMPLE_WIDTH + 6 + 1 ; window ## West ; WEST to Example db GROUP_EXAMPLE, MAP_EXAMPLE dw Example_BlockData + EXAMPLE_WIDTH - 3 ; strip pointer dw OverworldMap + (EXAMPLE_WIDTH + 6) * 3 ; strip destination db EXAMPLE_HEIGHT ; strip length db EXAMPLE_WIDTH ; connected map width db 0, EXAMPLE_WIDTH * 2 - 1 ; y, x offset dw OverworldMap + EXAMPLE_WIDTH * 2 + 6 ; window ## East ; EAST to Example db GROUP_EXAMPLE, MAP_EXAMPLE dw Example_BlockData ; strip pointer dw OverworldMap + (EXAMPLE_WIDTH + 6) * 4 - 3 ; strip destination db EXAMPLE_HEIGHT ; strip length db EXAMPLE_WIDTH ; connected map width db 0, 0 ; y, x offset dw OverworldMap + EXAMPLE_WIDTH + 6 + 1