I'm having a rather strange problem with my home build. It was functioning perfectly well until I put it in a storage locker (supposedly climate controlled) for a couple weeks and had it sitting in my new apartment for a month or so before setting it up (it has no wifi card, so I was using my laptop). Upon starting it, I noticed that the BIOS was taking way longer than usual to load, and that attempting to boot from my SSD would result in a boot error. According to setup, the SSD is being detected but it is not listed as the IDE1 Master. Also before entering setup the computer would usually list off the SSD and my CD drive (my two SATA drives) and then list "3rd Master Hard Disk Error" and prompt me to press F1. When I access the boot menu the SSD is usually (but not always) listed. Removing the SSD allowed BIOS to load normally. I checked the BIOS settings and verified that they were correct, and tried resetting them to defaults to no avail. I was able to successfully boot into DSL from a flash drive, but the SSD was not listed among the drives when I did so. I also was able to successfully boot a friend's computer from the SSD and checked that the main partition was marked as bootable, which it was, and ran fsck, which found no problems.
Here's where it gets weird, if it wasn't already. When I plugged the SSD back into my computer it booted just fine. After checking that everything was functioning, I decide to put back the screws holding the SSD in place (my case is home-built out of wood) and noticed that the SSD was upside-down relative to how the case was designed to hold it (it sits on its side, and when it is upside-down the SATA cable is in the way of a screw). Thinking nothing of this, I flip the SSD. My programs freeze immediately, with the exception of Windows Explorer which I assume is being run from RAM, and after a minute or so I get a BSOD. It then fails to boot. Flipping the SSD again allowed the computer to boot normally. It continued to work until the next time I booted it, when it booted fine but then froze and crashed in the same manner as before after ~15 minutes, without me touching the drive. It failed to boot afterwards until I tried several different orientations of the SSD, finally booting when I put it on end, but then crashed again after a few minutes. Trying different SATA connectors on the Motherboard sometimes gets it to run, but the CD drive seems to work fine from the SATA connector the SSD usually uses, except that it tries to open my arcade games in iTunes.
So here's my question: What the heck is going on, and how do I fix it?
Relevant computer stats:
Hard Drive: Crucial RealSSD C300 2.5 64GB (IDE mode)
Motherboard: ASRock M3A770DE
OS: Windows 7 Professional OEM
Hypotheses/Stabs in the dark:
Bad SATA or Power connector on SSD.
Bad SATA cable.
Bad-ish SATA connectors on the motherboard.