I was wondering what values were legal for the IO support field in the standard Sega ROM header so I poked around a bit. This page from the official docs gives quite a few of them, but omits newer peripherals. Looking at the games in my collection I was able to fill in a few gaps and come up with the following list

J = 3-button gamepad

O = 2-button SMS/Mark III pad

6 = 6-button gamepad

4 = Sega Team Player (Note games that only support the EA 4-Way Play tap don't seem to indicate that in this header at all)

"3" seems to be a misunderstanding from a developer and actually means the same as "J". Meanwhile "D" is a mistery (Sega Game Library has it so you'd think it stands for "download"... but Rambo III includes it too which is WTF worthy)

Also many games have pure garbage here, so don't trust this field too much.

EDIT: also on M and B, they aren't necessarily aliases. Sure, the Sega Mouse (not Mega Mouse) acts as both, but games normally support only one of the two modes, which is what the header is referring to. Also the distinction was done early on (before the mouse was released), so it's likely that it was originally intended to be a discrete trackball.