Sorry mate, I tried replying from my phone. Didn't work too well.
Try the shaders here (Char count is 7913. No idea if this is including carriage returns or spaces it's 8176 bytes in total)
And do something like, move a line down, or expand a code block out. Eventually you get an $EOF error. It's definitely to do with Mame, as the same error causing file will work perfect in AttractMode and other programs.