I've got a 1991 XJ600 and on the way home today it broke down.  First there was a loss of electrical power to the indicators, then a few miles later it lost power to the headlights and I heard a knocking noise.  Stupidly, I continued on to see if I could nurse it home (a mile away), but the knocking got worse and the engine became jerky.  I had to pull in and leave the bike because it became un-rideable.  I tried to start the engine again to see if I could hear the rattle, but the battery was flat. 
 
Does anyone know what this might be?  Had the alternator chewed itself up?