I maintain a little diff patch for MAME and MESS that I call emubrk. This is an opcode ($11FC) that will cause the debugger to pop up when it is encountered in the instruction stream. Attached you’ll find the patches for this useful little bit of functionality. If you find the patches no longer work, please email me and I’ll fix them up.
Erik Gavriluk has since taken the mantle for this and incorporated these features into his for of MAME.
Erik’s branch of MAME has not been kept up to date recently. So I created a branch in my GitHub fork:
Here are the instructions to clone MAMEDEV’s MAME and then apply my patch.
git clone https://github.com/mamedev/mame.git
git remote add tlindner https://github.com/tlindner/mame.git
git fetch tlindner
git merge tlindner/6x09_emubrk