I already put a timing light on it. That's why it's so confusing. I have better than average compression, a brand new fuel system, bright spark when I checked, and it is in time. Yet it ran weird. It has to be intermittent weak spark. If it was only when hot, I would think coils. It has to be either CDI, charging coil, sensor or the flywheel. I just replaced CDI last fall, and they are over a hundred bucks. If "outboard" sparkplug wire isn't anything special, I still have some 7mm automotive wire and terminals around somewhere. Actually the coil prong looks like a distributer terminal will work.
The only other thing is one time was a dirtbike that had a very similar problem. It had fuel, it had spark, and it had good compression. It turned out. A piece of the piston skirt broke off. How, and where it went is still a mystery. That bike still runs after a rebuild, so it didn't get to the bottom end. I couldn't find it in the pipe either. But when it happened, it was sudden, and wouldn't idle at all. Actually, aside from idle, it still ran great!
I'm going to the lake now.