have you tried resetting the BIOS to all its defaults? i think you have something on the motherboard that has died and it's failing during device detection. since it is out of warrantee, i think you need to take it to a place that knows how to repair HP computers or possibly just replace it. you can try locating diagnostics for the computer and see if you can run them to detect problems, but most computers these days don't have them anymore. while you are at it, you might as well have the place test the hard drive.
Herb...
I have a HP Pavilion 523w with a Pentium4 2.0 GHz/400, 512 ram and 80gig HD. The computer went out of warranty and three weeks later I couldn't boot up, it would get to the windows logo and then lock up on a black screen.The only thing I could do at that point was get into safe mode.
I called HP and they had me do a destructive system recovery which screwed up my system even more,I then couldn't even get into safe mode. Then they sent me 2 sets of recovery cds and 2 different recovery console cds. I followed everything they told me to do with the cds and it would get to the windows logo with a please wait on it. I waited and waited and nothing happened at all. Atthat point I went and got an XP cd and tried to do a clean install and it moves very slow and takes forever. After about 12 hours it gets to completing installation with 23 minutes remaining and will not go any further.
I called HP again for the 10th time and they said it NOW sounds like a hard drive problem, that it is bad. So I replaced the hard drive and tried the recovery cds first and the same thing happened with the please wait and then a tried another clean install with the XP cd and I have been sitting at 23 minutes remaining for 12 hours now.
I can't get any support from HP for this problem, Mircrosoft won't help either. I have searched all over the web for any kind of help but nothing works. I am at my wits end.
Any help anyone could give me would be very much appreciated. Thank you in advance for any help.

Chowhound
Comic Vine
GameFAQs
GameSpot
Giant Bomb
TechRepublic