There's a couple of things you could try.
First, if you haven't already got one, get a recent Linux live CD/DVD of any of the major distros - Mint or Ubuntu.
Boot into it and use gparted to create the partitions you want in the format you want. In fact, you could use FAT, because when XP auto installs, it's default will be NTFS and it may make the process easier.
If that doesn't work, I had a very similar problem recently on a laptop and it turned out to be one of the memory sticks had corrupted. Removing the faulty stick cured the problem. So if you think that may be a cause, again use your Live CD/DVD and when it starts to boot, go into the menu and run the memtest. If it starts showing a significant number of errors, that's almost certainly where your problem lays.
It's then just a question of finding which one (if there's two) is the culprit.