I would avoid doing the PTY thing and instead do this (works on WSL if MAME is the windows version):
$ sudo socat TCP-LISTEN:1234,reuseaddr,fork EXEC:"/sbin/agetty -L - 9600 vt102",pty,setsid,ctty,stderr
$ mame -nomouse vt102 -rs232 null_modem -bitb socket.localhost:1234
You can do the same thing with a vt220.I've had an idea to try to write a sort of high-level-ish VT220 emulator that pokes and patches the ROMs and the system to let you control it with the mouse, paste and stuff, lets you just doubleclick it to get a terminal, etc... I forgot about that until seeing this. Nobody would use it for more than 5 minutes but it would be funny.