For the red/black divide, you need two signals:
One on the black line, shortly before it merges with the other ones, in southward direction.
One on the red line, shortly before it merges with the other ones, in northward direction.
Both set to one-way.
That way, a train coming from the station won’t enter the black line (because the one-way signal prohibits that), and will take the red line. And vice versa, with a train coming from the north.
Unfortunately, you can’t decide which platform on a station is assigned to a line. You can fiddle around until you get what you want, but that’s hit-and-miss and will change every time you alter your line.