-Logic virus. How the hell does this work? It seems to come and go as pleased? Why was 9S infected at the end? Why did it infect the bunker? Why did it infect the YoRHa squad at the start of Route C? Why did it infect the other machines at random (like the cultists or Pascal's village)?
It just seemed to come and go, and yet it was introduced more logically (pardon the pun) when 9S was infected in Route A as he was hacking the machines in that case.
- He put 2B's arm onto himself, so he got infected because she already was. It infected the bunker because that was the whole point of Project YoRHa. They allow the androids to get to a point where they're able to score a decisive victory against the machines, but self-sabotage themselves by having the Bunker have a backdoor that the machines put the logic virus through. The YoRHa squad was connected to their network, so they all got infected. If you recall, 9S didn't sync up, so he was saved. And he got halfway done with 2B, which is why it took longer for her to be infected.
As for the machines, they got infected because... actually I sort of forget. Think it had to do with Eve being killed, as well as the appearance of the towers.
-What exactly are the mechanics of how the deeper revelations of Project YoRHa are supposed to work?
If the base is meant to be attacked after so long, is this on a repeating cycle, and if so, how is the YoRHa base repopulated then? Or does this imply that the cycle hinted at in Ending E did indeed keep continuing?
Or has it not actually happened before, and this the first time that the bunker was attacked?
So to start off, this whole machine war is a part of the loop of endless wars that the machines and androids have been fighting. Each loop they presumably do something different to self-sabotage one another. This time, their method of self-sabotage was Project YoRHa. So this is their first time doing this specific plan. And no, we do not know who came up with Project YoRHa.
So basically, the androids had this prime opportunity to beat the machines, but they self-sabotaged themselves through the project, just like they've done in the past. As for the machine side of things, they have nothing to do with Project YoRHa other than being aware of it. However, in their pursuit to evolve even further, they more or less refuse to destroy the androids. So both sides basically need each other.
-How many times did 2B kill 9S? Was she aware of this element of her programming?
We don't know how many times she has killed 9S. It's been several times though...
She is aware. Remember her opening line at the beginning of the game of wanting to kill god? Remember how she balled up her fist shortly after finding out 9S lost his memories after the factory battle? Remember her saying "It always ends like this..." after killing 9S at the end of Route A/B? Remember her saying "emotions are prohibited, yet only 2B actually follows this mantra?" And so on. She is fully aware of her position, and she absolutely hates her role in having to kill 9S. She hates to the point where him dying by other means still fucking sucks for her, because she doesn't like him losing his memories, as it effectively restarts their entire relationship.
-How did humanity come to be wiped out?
Play the first game. ;D
-How did the machines come to learn of Project YoRHa's deeper meanings? Was this part of it's learnings giving birth to N2?
I dunno when exactly they learned it, but they revealed that they knew to A2. You'll see this when you read the info off of the terminal that Anemone gives A2 access to.
-Why was Emil hiding inside a machine when he was introduced?
*shrugs