Alright, first of all
jhyatt did exactly what I would suggest if you want two logical train lines for some reason (that implies having 2 depots, one for each train line).
Just using a green wire bus is by far the easiest approach, and it comes with zero downsides if you have the green wire running already. I do not know what
jhyatt did to make the circuit compatible with a green bus, I assume he used drivers to recolor the wire, as suggested (because actually changing the circuits is very finicky unless you have diagrams or reverse engineer the whole thing).
Regarding the "bit mask" suggestion: I don't see how a bitmask or "AND"ing the values would help.
Here's a quick rundown of what actually happens on the red wire, so you can see what would be necessary to make this work with two separate depots and two separate train lines. This is now about the new version, with requester and provider outposts.
1. The depot polls all requesters for demand. While this search is going on, the providers will advertise availability of goods on the red wire.
2. A requester will be selected that does demand a product which is currently available at a provider. We can easily make this match because the providers are advertising their products.
3. The requester, and all the products that the requester is interested in, will be stored in a register, and the polling will switch to the providers.
4. Similarly to step 2, a provider will now be selected that does provide one of the products that are requested. We are guaranteed to find such a provider, because the requester selected in step 2 was already pre-filtered for available products.
5. When a provider has been found, it will be notified of an incoming train and it will store the station number of the requester, so that it can send the train there when it has done loading the product.
6. The protocol ends here, all registers in the depot will be cleared and the next train can be serviced.
How will you apply "bit-masks" to all the information that is exchanged that way? It is not possible.
It is not enough to apply "bit-masks" to the station numbers, or use any other partition scheme. You also need to separate the actual information, about available products etc.
The only way I can think of is to run a COMPLICATED full-blown encoding of everything on the wire, and it would need to allow for signal being super-imposed (i.e. added) on the same wire without information getting lost.
Good luck with that, if you have a circuit with good documentation please post it here
. (I'm pretty sure it can be done, somehow, but it will be very complex and maybe use more combinators than the entire depot uses right now.)
As you can see, it is more complicated that just having a "Yellow" polling signal and then having the information appear "magically" at the depot and outpost circuits. The red wire bus is 100% occupied by the depot and the protocol running on it. You cannot run the same protocol a second time, simultaneously, from another depot, even if you change the polling signal.
What you can do, is to put signals on the red bus that are not used at all by the depot circuit, but ONLY signals that are never used.
This specifically EXCLUDES any product that you need to advertise on the bus. If your red-wire train line needs to talk about "iron ore", or "plastic bars", then these signals are completely off-limits for any other protocol that you are running on the red bus.
You can make another protocol, for example to run a second train line, but then you need to change all signals to be distinct (also the special purpose signals, such as "requester chest", "provider chest", etc. in version 2).
It's certainly possible to run a second protocol on the red bus for handling oil barrels, but this then has nothing to do with the current setup (as long as you're careful enough to avoid collisions).