For starters the platinum plugs SUCK in these engines. Use the standard copper core OEM recommended plug, they do work MUCH better. Check your cap and rotor, they do wear out. Also the plug wires may look ok but do wear out too. What were the results of your compression test? Black smoke indicates to much fuel, maybe a dodgy O2 sensor or leaking injector (would also cause an HC fail at idle). May be time for a fuel filter and an oil change, doing those right before an emissions test can often turn a fail into a pass. Its hard to mess up a compression test and damage an engine so chances are you have some kind of electrical/mechanical problem in the fuel and/or ignition system.