The spell mighty fortress is very specific about the size and shape of the castle it makes, but not about where walls are connected. Both are 120' square areas with four 20' turrets connected by 80' walls, but the second one you get more interior space and can access your turrets without leaving the outer walls.