or better yet, treat all IO pins as both inputs and outputs. drive them as if they are inputs as you walk the state tree, but always check to see if the pin state matches what you are driving. if there is a mismatch, then the pin has been turned into an output and then you 1) record the actual pin state instead of the one you are trying to drive and 2) record that it has become an output so that you can create the IO.oe term correctly.
anyway i think i have this thing 99% figured out. something that stumped me for a bit is the bus connector here. all the signals are passed through from the Amiga side (blue/green connector) to the card edge side (going to the next sidecar expansion) with two exceptions -- see the weird pins that stick out.