Hello,
I have noticed that signals on diagonal track have a but weird direction info. It should show the direction of exit from the tile, bit it shows the entry direction. See the screenshot here:
(http://list.extended.simutrans.org/~vladki/screenshots/simscr79.png)
The signal on left (choose signal) should have direction south, and the signal on right (distant) direction west.
I am not sure whether this is really solvable: Simutrans does not really have diagonals: what appear to be diagonals are actually treated in the game as a series of straight lines in a step formation, and the underlying directional information is based on this.
I thought just using a different value from the ribi might be enough, but I do not know enough about this par of code.