I can understand why the Joystick1 Button X code wouldn't show up if a GAMEPAD Encoder is not connected, but shouldn't they reappear when the GAMEPAD encoder is reconnected? Why is the Default.cfg file being altered when the GP-Wiz 49 is disconnected?
Surely this doesn't mean that I will have to remap controls everytime I swap panels does it?
The problem is that mame & mame32 aren't setup for hot-swapping joysticks. Most PC software is like this; directX directInput can workaround it with extra coding, but the normal, MS suggested directInput way doesn't.
Try completely exiting mame/mame32 before swapping and see if that helps. You also might try the same hot-swaps as you did before, but exit mame/mame32 and restart
before opening TAB and see if the joystick is still there. These are where a seperate FE might be better than the fused GUI of mame32: you can hot-swap inside the FE (without mame running), but you might have simular joystick problems within the FE.
FWIW, IMO you should use the
ctrlr cfg to store general "permanent" hand changed inputs. Mame/mame32 doesn't change them, and they transfer to newer mame's just as quitely as the cfg/default.cfg.