mess <...> -listmedia will show valid -hardN options.
MAME's command line is like Unix -- friendly, but chooses its friends wisely
a few samples:
choose an alternate ROM on a slot device: "-isa1 rom,bios=whatever"
attach a Covox to parallel port: "-isa2 pclpt -isa2:pclpt:lpt:centronics covox"