MAME's code actually does something extremely smart for a processor as complex as the 68000: it's a generator. Meaning you write a program that outputs the actual emulator source in your desired language. That means you can generate the emulator in various configurations without ugly #ifdefs or the like, and it also reduces the chance of things like copy/paste typos.