The following code reads: if trst is 1 then PARAM_TRST(cable) is 1 and if trst is 0 then PARAM_TRST(cable) is 0. The rest of the code mask bits and shifts it before sending it out.
PARAM_TRST(cable) = trst ? 1 : 0;
x = VarToTest ? true : false; <- The way it should be. I think that your thinking that the logical operation is the other way round. Just a guess??
Yes, the transistor is inverting the logic level so a 1 on the par port is a low on the JTAG interface nTRST.
I find that connecting nTRST only causes problems for what ever reason. This is on my Jeeni JTAG box as well as the wiggler schematic I use with various software tools. If works for you then great if not then try disconnecting it. YMMV.