It took, and I kid you not, over 6 hours to produce a lighting model that I was content with.
I was having lots of trouble getting a worthwhile dynamic lighting contribution to a normalmapping project. I decided to start at the most basic level and build from there, by comparing results to the stock engine lighting and formulating the shader.
I can't believe how something that seems so simple can create such a headache.
This is lighting done in the vertex shader and them passed to the pixel shader.
Edit: I compiled with shader model 2.0. So that's the minimum requirement.
Download Demo Scene