I had a look at the DIN/DOUT connection PDFs and my MB-6582 mods have infiltrated into there…
For your own reference, you can reduce the number of DIN and DOUT modules you need by wiring all LEDs and switches into a matrix (like what I did with MB-6582). e.g. four DINs for 15 rotary encoders, one DIN for switch inputs, two DOUT for LED outputs and one DOUT for current sinking both LEDs and switches in the matrix. You don’t need the MB-6582 PCB to do this, but you can use the wiring diagrams as a reference for your own wiring (scroll down to Control Surface Wiring :
Then you can use the setup_mb6582.asm as a base… this will have the settings to enable the “SRM” (shift register matrix) and you can customize the tables to suit your own wiring.