Newtronics makes an optical ignition unit. It works just fine. I had one installed on my bike but the rotor rubbed on the sensor and damaged it. I installed it wrong and didnt check for clearance. I ended up going back to original points.
https://yambits.co.uk/xs400-newtronics-electronic-ignition-system-p-54310.html
Points XS400s had a mechanical advance unit with a small cam that keys into the advance weights one-way. The TCI bikes have a fixed T-shaped rotor on the camshaft.
I had the Pamco with E-advance and it fried on me when the mechanical regulator malfunctioned. This happened right as Pamco Pete went missing or whatever happened to the business... I do not know?? I put it in the box, went back to points.
I do have a brand new Pamco ignition with a mechanical advance that I saw on EBay and had to buy it. I planned on reverse engineering the Pamco and researching better components but never got around to it. Electronics are not my strong suit and I dont really know how to read schematics though. It sits in the XS400 parts box waiting.
The E-advance Pamco has a fixed rotor on the camshaft. The mechanical advance Pamco uses the original advance weight assembly and you just replace the roller cam with the Pamco piece.
Just incase you happen to find loose parts on the web. Some advance boxes came as an aluminum case over a plastic one for better cooling.