The cartridge port first appeared on the Electron's Plus One expansion; those on the Master vary the meaning of a few pins but are mostly compatible — ROMs should work without modification (subject to the software, of course), but hardware is likely to be machine specific. The full pinout, including documentation of the machine differences, is contained in this Acorn application note.
A hypothetical Master cartridge gets enough information to expose registers, receive and provide audio, track composite sync and provide input to the CRTC's light-pen pin (which causes current output position to be latched).
That being said, there wasn't anywhere near as much hardware available as for the Electron as I recall. So, mostly it was the defined software ROM types (as per Chapter 17 of the New Advanced User Guide, but possibly more easily digested from the Electron Advanced User Guide because the same topic is stretched to four chapters, 8–11, and that PDF has been OCRd):
- language ROMs — anything that provides an environment: Forth, Logo, BCPL and Lisp being popular options that were actual languages but also View (the word processor), ViewSheet (the spreadsheet), and other traditional applications;
- services ROMs — anything that provides transient functionality: filling systems mainly; and
- serially accessed ROMs — these approximately contain the byte image of a tape, which the OS then loads just as if it were a [fast] tape. Not that useful on a Master where the usual storage is fast anyway but you could use the Electron cartridges, which generally are the early Acornsoft games: Hopper, Starship Command, etc. Likely Master compatible, as they just select a mode and then go.