First thought was the mbr was on the mechanical drive, but that wouldn't explain why the machine boots without the mechanical drive connected.
The bsod is generally what you would see when switching a drive from ide to ahci after windows has already been installed. Did you have the mechanical drive connected when you installed Windows to the ssd, and did it have a prior version of Windows installed on it?
It's a hassle, but the easiest way to get through the mess you've got now may be to reinstall Windows with only the ssd connected (in ahci), then connect the mechanical drive once you've got everything working properly.
Maybe someone else will have a better option on fixing this though.