I see the 'shield wall' as intrinsic to the phalanx and the turtle formation. If a dwarf with a shield is given orders to defend, he can go into the shield wall formation. The shield wall formation takes X*AC
2 bonus turns to get into or out of. The shield wall bonus is +1 AC to all units within 1 square. The cost is slower attack and maybe lower accuracy.
In a tight formation, this means:
Time: The first guy in line will get into formation quickly, but the next guy will take a significantly longer time. It will take X*8
2 turns for a guy in the center to get out, or 64 times normal.
Bonus: The frontline guys will be defended by 5 other guys for a total bonus of +5. Knockback attacks will be rendered ineffective due to the bracing of the guys behind them (modeled as guys standing behind them)
The guy in the middle of the pack will have a +8 AC bonus (versus arrows, obviously)
Cost: There is no dodge capability for people in the formation, since they have nowhere to go
Bonus: The exact same algorithm will model surrounding the king (King gets +8 AC, walls get +4 or +2 AC) or a squire supporting a knight (knight gets +1 AC, but squire doesn't attack so much)
* By +AC, I mean increased block chance or however that gets modeled
If you want to get really complicated, different shields could have different ranges.
Now lets make this a little more complicated. Guys with spears have a defensive stance 'angled spears'. It would have a shorter time to get into, but a lower AC bonus (+.5?). Or the same bonus (+1) but only good for ranged attacks.
and for the phalanx, the back rows angle their spears for defense, the front relied on their wall of shields.
Even better, since the dwarf in the front would be more nervous about melee attacks and thus use the shield defense stance to get the bonus versus all attacks. The later rows would decide that the time vs. melee bonus wasn't worth it, and use the ranged stance. The front row would get +5 vs ranged, +2 vs melee. Second row would get +3 vs melee, +8 vs ranged. Third and further rows would get +8 vs ranged. Certain crazies may decide to throw up thier shield in the crowd, but oh well.
Flying wedge is free though... It's bonus is purely offensive and based on formation mechanics. Just set all members to 'push'