On ODBII cars secondary lambda will not cause DTCs related to misfres. The O2 after the catalyst is for emission / feedback. A primary lambda flaking out will cause misfires, however..
If the car is the 1.8L, price is 70$ for OEM Denso, If the 1.6 the price is 121$ OEM.
You can also buy a universal type and splice it in.
Got the prices from,
www.oxygensensors.com
To make your own O2 sim,
http://www.bobblick.com/techref/projects/o2sensor/o2sim/o2sim.html
HTH
Nate