Exit Table. This connects doors and exit-enabled pipes to their correct entrances.
The index for this exit table is the position of the exit (relative to layer 1) divided by 256. If layer 1 is vertical, then use the Y position of the exit, else use the X position. This is also known as the current screen number.
For primary exits, the value in this exit table is the low 8 bits of the level number of the destination room. For secondary exits, the value in this exit table is the index to the secondary entrance ROM tables; and ROM table $05:F800/0x2FA00 provides the low 8 bits of the room number.