Even easier than microsquirt or megasquirt, if you were to purchase a programmer for your car, it would cost less and you wouldn't have to wire anything, although if your car does not have an OBD II jack plug, it wouldn't work. You would have to readjust your distributor manually with a timing light.
For example, the best tuner for my explorer is the SCT Xcal tuner that works for most ford fuel injected engines. It allows you to adjust the mixture, adjust ignition timing, and other small increments. It also has preset programs for mpg, hp, torque, etc.
We used to have emissions testing in the Louisville, Ky. area but they did away with it a few years ago. The local govt. finally realized the smog testing did almost nothing for air quality since 96+% of the cars tested passed anyway. The only people that where benefiting from the testing were the contractors running the testing stations and the small amount of tax revenue it generated.
Smog testing was a good idea 20 something years ago when most cars had big carburated v8s but todays cars do not need it.
well, then count yourself lucky... here in CA the smog testing is so strick that they had to exempt new vehicles for the first 6 model years off the lot because too many of them were failing on their first test at the 2nd year... now they have to test coming off the lot (before, they weren't tested off the lot) and then exempt for 6 model years with the original owner... otherwise its every 2yrs for any vehicle made after 1976... pre-1976 is exempt...
also, a number of years ago, we changed our smog testing to dyno based... smog is tested at idle, 25mph, and 45mph on a rolling dyno... as well as the smog machine being connected to the OBD port (can't have any stored codes in memory) and the sniffer up the tailpipe... that also includes a visual inspection (under hood and under car), vacuum test the gas cap, and verifying aftermarket components with CARB (CA Air Resource Board)... if a K&N air filter doesn't have a CARB number, you can't use it (just an example, K&N pays to have their stuff tested and certified by CARB)...
now if you fail any one of these tests, you can get your tags renewed on your car... you can get to a referee and get classified as a "gross poluter" but then you have to get tested every year and after 2yrs of that status, you either sell your car to the state for $1000 or you fix it or junk it...
it's not a perfect system... for the honest, all it does is give us a headache to deal with... for the dishonest, well, there are a couple of ways to get around it for a while... but usually within a year or two you get caught...