Ok the XS650 never in it's life ever had a CDI, it uses a TCI but those are ignition systems and have nothing to do with charging.
The reg/rec is a 7 wire unit with a finned aluminum body. The TCI is a plastic box with either 6 or 7 wires. The reg/rec is mounted to the frame just behind the engine. The TCI box is mounted on the bottom of the battery box. Well that's on a stock bike. On yours having been bobbed they can be put anywhere.
On the 80 up bikes they all used the same reg/rec It has 7 wires 3 white, black, red, green and brown.
Out of your stator there are 5 wires, 3 white, a green and a brown. Now to hook the two together you hook the three whites to the three whites.
From the stator you hook the green to the reg/rec green. On the brown wires you hook them together then run a brown wire from this joint to power after the main switch.
From the reg/rec you should hook the red to battery +, the black to ground.
The way your alternator works is power is fed on the brown wire to the reg/rec, this is a voltage sencing wire. The reg uses this voltage reference to determine what the battery voltage is. If low it charges the battery if ok it won't.
The brown wire to the stator feeds battery voltage to the brush, from the brush through the rotor, out the other brush on the green wire to the reg/rec.
When the reg/rec sences a low voltage on the brown wire it grounds the green wire to let power flow, This power flow creates the magnetic feild the stator needs to create electricity. When the voltage on the brown wires reaches 14.5 volts the reg/rec ungrounds the green wire, cutting the power flow so no charging.
It cycles the power through the rotor on/off to keep the battery voltage at 14.5 volts.
Oh, peanut the rotor was never fed on a red wire. The early bikes with the mechanical reg, power went to the reg on a brown wire. The reg used this brown wire as both a voltage sencing wire and a power feed to the rotor. When it senced low voltage it sent battery voltage out on the green wire to the brush, through the rotor to the other brush where it was grounded to the stator housing with the three steel screws and out on the black wire to the harness ground.
Leo