Head off the road if you have to. Anything to avoid a head on collision.
WTH were you thinking stopping in the middle of the road? Seriously is that the spot you choose to die? You should do some serious contemplation about riding.
Sorry to be harsh but that was a terrible decision.
Forget honking your horn, flashing your lights, etc. You're relying on the other guy to notice his mistake. First course of action always is to save your bacon. Being paralyzed with indecision will get your killed.
Judging his reaction as terrible is pretty presumptuous... None of us were there except for cavenger, so we don't know all the other conditions, like what was the side of the road (though he said it was a steep shoulder), how far the guy was from him, etc...
I probably would have done the same thing, slow down to a near stop, and start flashing my brights or honking (more likely honking), while I prepare to jump off the bike and out of the way if necessary (maybe jumping up and letting him take out your bike if it's not a truck). I have done this many times for cars in the city that do basically the same thing (on skinny 2 lane roads with cars parked along both sides, people drift across the double yellows ALL THE TIME...), and the vast majority of the time the driver sees/hears me and veers back into their lane. Keep in mind I have a Denali sound blaster, so in a neighborhood, it's hard to not hear my horn... very attention grabbing.
I have also noticed that if I occupy the right side of my lane, oncoming drivers will often drift across the double yellows. If I ride the left side of my lane, close to the double yellows, cars tend to stay in their lane better.
I have watched hundreds of motorcycle crash videos (very educational IMO!), and there are tons of this same situation and most of the time the car swerves back into his lane, or the biker goes to his outside just barely missing the car in his lane. But sometimes the car continues across the oncoming lane and goes to the outside of the motorcycle, sometimes crashes off the road, sometimes not. Lots of times, especially for cars turning in front of bikes, the biker veers to the right, natural reaction to try to go around the car (car coming from the left, so they try to go right of the car), but all they end up doing is matching the turning car's rate of turn, and hits right into the middle of the turning car.
Because you don't know if they guy is going to self correct or continue drifting, you don't know if you should commit to one direction or the other. To me the most predictable thing is to stay in your lane (perhaps venture to the outside of your lane just in case...), and just honk and flash as much as you can. I would not continue at your same speed though as that reduces the time for them to see you and react. That said, don't slam on the brakes if there's drivers behind you... you don't want to set them up to rear end you either...
All this requires you to be ready to do something last ditch to get your body out of the way. I figure for a short car, I can jump of the pegs enough to not get completely impacted by the car (assuming I've prepared in the second or 2 that I'm watching the guy come at me). For a truck, there's not much you can do to get out of the way unless you can safely get WAY off the road.
Aww crap... That got long winded and it makes me look like I'm on a soap box... I think about this stuff alot because I do 80mi/per day minimum, and new england drivers are some of the least attentive/most self-centered I have ever seen. I dont' mean to be on a soap box or anything; I'd love to hear counter arguments if people have some sounds points. My goal is to not die (among others...), so I'm open to better ways to achieve that goal