Finished making the electrical test work -- I had failed to realize that I have to ignore the ground shorts once they have been found -- otherwise they reappear against EVERY tested pin (because they are always low and I'm testing for low pins -- duh!). Anyway, it was showing way too many shorts, and that's why. Now I independently can find shorts between separate pins without getting flooded with the ground shorts too. Only thing that's missing is the VCC shorts, but I can't do that without pullups (to my knowledge)
I'm not completely done with the electrical test because it only counts errors right now. So I need to implement a framework to determine which pins are shorted rather than just counting them.
It does add some complexity to the code. I may be going through a chain of calls just to turn the CS pin on, for instance. Hopefully I'm not going too crazy with this.
Anyway, this means that I can control the ports from a SIMM electrical test routine using the same types of functions that the actual programming controlling code would use, without having to duplicate a bunch of port definitions and bit manipulation. I made sure to add all the functions I can think of needing to the ports module. We'll see if I got them all!